libvirt and watchdog notification: missing notifications on the host - libvirt

I am trying to get my guest VM's watchdog fired notifications on host using the following python script.
https://github.com/wiedi/libvirt/blob/master/examples/domain-events/events-python/event-test.py
I tried the following in my Ubuntu guest VM in order to get notifications on the host:
-- configured the watchdog to ping an unreachable host and just syslog if there is no response; used "watchdog -q" command for this.
-- configured the watchdog to ping an unreachable host and reboot if there is no response; used "watchdog -b" command for this.
In both cases, the watchdog fires because the WD is trying to ping a random IP address. I see the syslog that the watchdog fired because there is no response from the IP address.
But on the host, there is no notification whatsoever. In the second case above (watchdog -b), the guest reboots and the script gets a "myDomainEventRebootCallback" notification while i was expecting "myDomainEventWatchdogCallback".
Any idea how to get watchdog fired notifications on the host?
Thanks for your time.

You haven't mentioned whether you actually added a virtual watchdog device in the guest configuration ? The libvirt watchdog event notifications only occur if you have added a virtual watchdog device.
If you haven't, then the guest watchdog device will just be using a NMI to emulate a watchdog and this merely triggers a normal guest OS reboot.
So you need to make sure you have a i6300esb device added as shown in this example:
https://libvirt.org/formatdomain.html#elementsWatchdog

Related

Zabbix agent Interrupted system call

Recently, there is a host which indicates me the error message :
Get value from agent failed: cannot connect to [] interrupted system call
I do not understand what happens to it, this host uses an agent zabbix on the port 10050.
Except that on my 10 other hosts which are also with a zabbix agent there is no problem, it's really only on one that I have this problem.
I've tried to search on the web but nothing works.
Could it be a problem with the agent installed on the host?

Acces Point unavailable by ICMP Ping Zabbix Monitoring

Using Zabbix 4.2 I detect that a device, more specifically, an Access Point, shows an alert saying that, the mentioned device is unavailable by ICMP Ping.
Does this mean that the mentioned device is offline or that it has been turned off?

how QEMU guest can send packets to NIC of the host?

i'm trying to test XDP program but the test environment was provided by the client consists of one server and qemu guest running on it and act as a traffic generator ( using scapy or DPDK ). and to have this test run successfully,the packets from the guest should arrive/be injected to the NIC driver ( XDP working in native mode ) of the host. is there's any configs/hacks that can make the traffic goes from the guest to the host driver?
edit :
some points to be cleared as #vipin suggested,
on the host, the NIC is connected to virbr0 on kernel.
the XDP is running on the physical NIC.
i'm using bpf_redirect_map for redirecting as we still in simple stage.
anyway, i got a work around is just to add a physical router to the lab setup and it's enough for this stage of test.
XDP (Express Data Path) supported in Linux is for RX side, and there were patches for TX but not integrated. Based on the current update XDP-eBPF is on Physical NIC. So all RX packet on physical NIC is processed.
But as per the question shared packets from the guest should arrive/be injected to the NIC driver ( XDP working in native mode ) of the host.. If one needs to run the logic for traffic coming from GUEST OS, XDP has to be loaded to emulator or TAP or Bridge interface. This will allow to redirect packets based on Kernel NIC id to Physcial NIC.

How to run a QEMU monitor command from inside the guest?

For example, I'm running a Linux guest, and I want to do something like this in my init script just after boot:
savevm-somehow
run-lengthy-benchmark
I know how to use the monitor from the host, but it is hard to stop at the correct point to do the savevm: I could GDB step debug until there and then connect to the monitor, but that would be annoying.
In theory you could tell QEMU to put its monitor on a TCP port, and then also tell QEMU's networking to forward that port to the guest, and then from the guest connect to the forwarded port. I would worry about the possibility of deadlocks in this setup, though...
An approach I've used in the past is to script the QEMU monitor prompt using expect. There's an example here:
https://translatedcode.wordpress.com/2015/07/06/tricks-for-debugging-qemu-savevm-snapshots/
which uses a hardcoded delay time, but you ought to also be able to get expect to look at the serial port output to decide when to send the commands.

Zabbix agent on is unreachable for 5 minutes

I used zabbix 2.4 and it worked perfectly. I decided to upgrade server and all agents to 3.0 LTS. I did not change any settings in agents and server conf-files and did not change any settings wia web.
But now I receive messages
Zabbix agent %servername% on is unreachable for 5 minutes
This agent works on the same machine with zabbix-server. More strange that I receive other messages from this agent. So I can see that agent works and server can communicate with it.
After I started to receive this error message I tried to change IP of agent. First it was 127.0.0.1, after I changed address to network's IP: 192.168.x.x. Nothing changed. I receive unreachable message every 6-7 minutes with the other messages from this agent. And also this agent is green via web-interface.
zabbix_get -s 127.0.0.1 -k agent.ping
also returns 1.
How to fix problem?
I increased Timeout and error has gone
take zabbix server restart and it will work.
You can check also zabbix_agentd.conf and replace valid IP and name