Hardware watchdogs (patch for discussion only)
Hi:
I want to share an unfinished patch with the list just to make sure that I'm heading in the right direction.
This patch aims to implement a virtual hardware watchdog device. A hardware watchdog in a real machine is a device that must be tickled periodically by a userspace process to prove that the machine's userspace is (in some sense) "alive". If the device isn't tickled then after some timeout, it reboots the machine.
These devices are generally very simple. I picked two devices to
emulate: the IBase 700, which is almost trivial, an ISA port to enable and set the timeout, and another ISA port to disable. And the Intel 6300ESB, a PCI device which represents a mid-high end range of features and is very well documented. Both have clean Linux device drivers:
http://lxr.linux.no/linux+v2.6.28.5/drivers/watchdog/ib700wdt.c
http://lxr.linux.no/linux+v2.6.28.5/drivers/watchdog/i6300esb.c
(Both also come with Windows drivers which I haven't tested)
The attached patch contains a working emulation of the Intel 6300ESB. The IB700 is simpler, but I haven't got around to implementing it yet. Save/restore/migration is also on the to-do list.
I have tested my emulated Intel device using the Linux watchdog program, and it appears to work.
http://sourceforge.net/projects/watchdog/
Any comments?
Rich.
Signature · 4 lines
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top
Makefile.target +1 -0
@@ -584,6 +584,7 @@ OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o OBJS += device-hotplug.o pci-hotplug.o +OBJS+= wdt_ib700.o wdt_i6300esb.o CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif ifeq ($(TARGET_BASE_ARCH), ppc)
vl.c +13 -0
@@ -42,6 +42,7 @@#include "migration.h" #include "kvm.h" #include "balloon.h" +#include "watchdog.h" #include <unistd.h> #include <fcntl.h>
@@ -4072,6 +4073,8 @@ "-old-param old param mode\n"#endif "-tb-size n set TB size\n" +"-watchdog ib700|i6300esb[,action=reboot|shutdown|pause|exit]\n" +" enable virtual hardware watchdog [default=none]\n" "-incoming p prepare for incoming migration, listen on port p\n" "\n" "During emulation, the following keys are useful:\n"
@@ -4183,6 +4186,7 @@ QEMU_OPTION_startdate, QEMU_OPTION_icount, QEMU_OPTION_echr, + QEMU_OPTION_watchdog, QEMU_OPTION_virtiocon, QEMU_OPTION_show_cursor, QEMU_OPTION_semihosting,
@@ -4308,6 +4312,7 @@ { "startdate", HAS_ARG, QEMU_OPTION_startdate }, { "icount", HAS_ARG, QEMU_OPTION_icount }, { "echr", HAS_ARG, QEMU_OPTION_echr }, + { "watchdog", HAS_ARG, QEMU_OPTION_watchdog }, { "virtioconsole", HAS_ARG, QEMU_OPTION_virtiocon }, { "show-cursor", 0, QEMU_OPTION_show_cursor }, #if defined(TARGET_ARM) || defined(TARGET_M68K)
@@ -5082,6 +5087,14 @@ serial_devices[serial_device_index] = optarg; serial_device_index++;break ; +case QEMU_OPTION_watchdog: +if (wdt_option) { +fprintf (stderr, +"qemu: only one watchdog option may be given\n" ); +exit (1 ); + } + wdt_option = optarg; +break ;case QEMU_OPTION_virtiocon:if (virtio_console_index >=MAX_VIRTIO_CONSOLES ) {fprintf (stderr,"qemu: too many virtio consoles\n" );
Makefile +1 -0
@@ -85,6 +85,7 @@ OBJS+=bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o OBJS+=buffered_file.o migration.o migration-tcp.o net.o qemu-sockets.o OBJS+=qemu-char.o aio.o net-checksum.o savevm.o cache-utils.o +OBJS+=watchdog.o ifdef CONFIG_BRLAPI OBJS+= baum.o
watchdog.c +191 -0
191 lines not on this page · raw message
qemu-doc.texi +35 -0
@@ -1158,8 +1158,43 @@ @item -echr 20 @end table +@item -watchdog @var{model}[,action=@var{action}] +Create a virtual hardware watchdog device. Once enabled (by a guest +action), the watchdog must be periodically polled by an agent inside +the guest or else the guest will be restarted. + +The @var{model} is the model of hardware watchdog to emulate. Choices +for model are: @code{ib700} (iBASE 700) which is a very simple ISA +watchdog with a single timer, or @code{i6300esb} (Intel 6300ESB I/O +controller hub) which is a much more featureful PCI-based dual-timer +watchdog. Choose a model for which your guest has drivers. + +The @var{action} controls what QEMU will do when the timer expires. +The default is +@code{reboot} (forcefully reboot the guest). +Other possible actions are: +@code{rebootnice} (attempt to gracefully reboot the guest). +@code{shutdown} (forcefully shutdown the guest), +@code{shutdownnice} (attempt to gracefully shutdown the guest), +@code{pause} (pause the guest), or +@code{exit} (immediately exit the QEMU process). + +Note that the @code{rebootnice} and @code{shutdownnice} actions +require that the guest responds to ACPI signals, which it may not be +able to do in the sort of situations where the watchdog would have +expired, and thus these actions are not recommended for production +use. + +Use @code{-watchdog ?} to list available hardware models. Only one +watchdog can be enabled for a guest. + +@table @code +@item -watchdog ib700 +@item -watchdog i6300esb,action=exit @end table +@end table + @c man end @node pcsys_keys
watchdog.h +54 -0
54 lines not on this page · raw message
wdt_i6300esb.c +498 -0
498 lines not on this page · raw message
wdt_i6300esb.h +28 -0
@@ -0,0 +1,28 @@ +/* +* Virtual hardware watchdog. +* +* Copyright (C) 2008 Red Hat Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +* +* By Richard W.M. Jones ([email protected]). +*/ + +#ifndef _QEMU_WDT_I6300ESB_H +#define _QEMU_WDT_I6300ESB_H + +extern void wdt_i6300esb_init (void ); + +#endif /* _QEMU_WDT_I6300ESB_H */
wdt_ib700.c +101 -0
101 lines not on this page · raw message
wdt_ib700.h +28 -0
@@ -0,0 +1,28 @@ +/* +* Virtual hardware watchdog. +* +* Copyright (C) 2008 Red Hat Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +* +* By Richard W.M. Jones ([email protected]). +*/ + +#ifndef _QEMU_WDT_IB700_H +#define _QEMU_WDT_IB700_H + +extern void wdt_ib700_init (void ); + +#endif /* _QEMU_WDT_IB700_H */
pc.c +7 -0
@@ -37,6 +37,9 @@#include "virtio-balloon.h" #include "virtio-console.h" #include "hpet_emul.h" +#include "wdt_ib700.h" +#include "wdt_i6300esb.h" +#include "watchdog.h" /* output Bochs bios info messages */ //#define DEBUG_BIOS
@@ -1001,6 +1004,10 @@ } } +wdt_ib700_init (); +wdt_i6300esb_init (); +watchdog_pc_init (pci_bus); +for (i =0 ; i < nb_nics; i++) {NICInfo *nd = &nd_table[i];
Quoted 18 lines · Richard W.M. Jones
Hi:
I want to share an unfinished patch with the list just to make sure that I'm heading in the right direction.
This patch aims to implement a virtual hardware watchdog device. A hardware watchdog in a real machine is a device that must be tickled periodically by a userspace process to prove that the machine's userspace is (in some sense) "alive". If the device isn't tickled then after some timeout, it reboots the machine.
These devices are generally very simple. I picked two devices to
emulate: the IBase 700, which is almost trivial, an ISA port to enable and set the timeout, and another ISA port to disable. And the Intel 6300ESB, a PCI device which represents a mid-high end range of features and is very well documented. Both have clean Linux device drivers:
Quoted 5 lines
http://lxr.linux.no/linux+v2.6.28.5/drivers/watchdog/ib700wdt.c
http://lxr.linux.no/linux+v2.6.28.5/drivers/watchdog/i6300esb.c(Both also come with Windows drivers which I haven't tested)
A quick note WRT the possible actions
Quoted 13 lines
(quoted diff) +4
-0@@ -4072,6 +4073,8 @@ "-old-param old param mode\n" #endif "-tb-size n set TB size\n" + "-watchdog ib700|i6300esb[,action=reboot|shutdown|pause|exit]\n" + " enable virtual hardware watchdog [default=none]\n" "-incoming p prepare for incoming migration, listen on port p\n" "\n" "During emulation, the following keys are useful:\n" +/* This actually performs the "action" once a watchdog has expired, + * ie. reboot, shutdown, exit, etc.
Review
Quoted 10 lines
(quoted diff) +10
-0+ */ +void +watchdog_perform_action (int action) +{ + fprintf (stderr, "qemu: watchdog %s!\n", string_of_action (action)); + + switch (action) { + case WDT_REBOOT: + qemu_system_reset (); + break;
This one shouldn't be called directly. qemu_system_reset_request() sets a flag to interrupt the CPU, and then the main loop when seeing the flag set, will call qemu_system_reset().
It also doesn't actally do a reboot. It hard resets the CPU and devices. The guest OS doesn't do a controlled shutdown.
watchdog.c line 87
Quoted 7 lines
watchdog.c +7
-0+case WDT_REBOOTNICE : +qemu_system_reset_request (); +break ; + +case WDT_SHUTDOWN : +qemu_system_powerdown (); +break ;
Likewise here - this is called indirectly by the main loop after qemu_system_powerdown_request() sets the powerdown flag.
Quoted 14 lines
watchdog.c +12
-0+case WDT_SHUTDOWNNICE : +qemu_system_powerdown_request (); +break ; + +case WDT_PAUSE : +vm_stop (0 ); +break ; + +case WDT_EXIT : +exit (0 ); + } +}
watchdog.c
Quoted 10 lines
watchdog.c +10
-0+ +The @var{action} controls what QEMU will do when the timer expires. +The default is +@code{reboot} (forcefully reboot the guest). +Other possible actions are: +@code{rebootnice} (attempt to gracefully reboot the guest). +@code{shutdown} (forcefully shutdown the guest), +@code{shutdownnice} (attempt to gracefully shutdown the guest), +@code{pause} (pause the guest), or +@code{exit} (immediately exit the QEMU process).
I think we can only support the following options
- shutdown - graceful shutdown of guest via ACPI event via qemu_system_powerdown_request()
- poweroff - hard immediate power off of guest machine via qemu_system_shutdown_request()
- reset - hard reset of the guest machine via
qemu_system_reset_request()
- pause - stop the guest CPU(s)
Don't think we ned an 'exit' event, because I believe 'poweroff' should cause the emulator to exit
Regards,
Daniel
Signature · 4 lines
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
Quoted 9 lines · Daniel P. Berrange
I think we can only support the following options
- shutdown - graceful shutdown of guest via ACPI event via
qemu_system_powerdown_request()
- poweroff - hard immediate power off of guest machine viaqemu_system_shutdown_request()
- reset - hard reset of the guest machine via
qemu_system_reset_request()
- pause - stop the guest CPU(s)
Thanks.
My experiments show that qemu_system_powerdown_request does nothing visible, even for a recent (F-10) guest running acpid. "system_powerdown" in the monitor also does nothing for the same guest. Maybe this is a recent regression in QEMU?
Anyway, I had a look at what monitor.c is doing and came up with this list of actions / functions:
voidwatchdog_perform_action (int action)
{
fprintf (stderr, "qemu: watchdog %s!\n", string_of_action (action));
switch (action) {
case WDT_RESET: /* same as 'system_reset' in monitor */
qemu_system_reset_request ();
break;
case WDT_SHUTDOWN: /* same as 'system_powerdown' in monitor */
qemu_system_powerdown_request ();
break;
case WDT_POWEROFF: /* same as 'quit' command in monitor */
exit (0);
break;
case WDT_PAUSE: /* same as 'stop' command in monitor */
vm_stop (0);
break;
}
}I have tested all four combinations, and they all work correctly except for the 'shutdown' option.
Rich.
Signature · 4 lines
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into Xen guests. http://et.redhat.com/~rjones/virt-p2v
Quoted 12 lines · Richard W.M. Jones
Quoted 9 lines · Daniel P. Berrange
I think we can only support the following options
- shutdown - graceful shutdown of guest via ACPI event via
qemu_system_powerdown_request()
- poweroff - hard immediate power off of guest machine viaqemu_system_shutdown_request()
- reset - hard reset of the guest machine via
qemu_system_reset_request()
- pause - stop the guest CPU(s)
Quoted 6 lines
Thanks.
My experiments show that
qemu_system_powerdown_requestdoes nothing visible, even for a recent (F-10) guest running acpid. "system_powerdown" in the monitor also does nothing for the same guest. Maybe this is a recent regression in QEMU?
It's only implemented on Sparc32 and even there Linux does not have a driver for the power fail interrupt. The idea was that power supply, power button press or UPS would notify the OS that power will fail and the system should be shut down.
On Sparc32 actually the power fail interrupt doesn't exactly indicate what I thought it does, there are two power supplies and the other one may fail but system can still be running for a long time.
Quoted 4 lines · Daniel P. Berrange
I think we can only support the following options
- shutdown - graceful shutdown of guest via ACPI event via
qemu_system_powerdown_request()
I wonder how many times the guest will be healthy enough to respond to this and how many times it will have crashed badly enough that this does no good.
Perhaps we could have a second timer such that if, on asking the guest to shut down via ACPI, the guest does not respond within a certain time limit with an ACPI request to turn the power off we go for one of the other options below?
Quoted 5 lines
- poweroff - hard immediate power off of guest machine via
qemu_system_shutdown_request()
- reset - hard reset of the guest machine via
qemu_system_reset_request()
- pause - stop the guest CPU(s)
Thinking a little more on this I can see two use cases for a watchdog:
1. Ensure continuity of service. When a guest OS gets stuck for some reason make sure it is re-started. This is probably the only use case on a real physical machine.
2. Limit the resource consumption of a crashed guest when the host serves other guests. This probably only of concern for virtual machines, i.e. it is specific to the emulated watchdog and its interaction with qemu rather than being part of how a physical watchdog works.
Looking at the actions proposed by Daniel shutdown, poweroff and pause support the second use case whereas reset supports the first.
Do we want to offer the guest the option of a clean shutdown if it can still manage that and then reboot, i.e. the shutdown option but for use case 1?
If so we need to be able to turn the APCI power off request into a reset instead. We already have the -no-reboot option to turn a reboot into a power off - this is the opposite.
In fact, some people may find that option useful anyway even without the watchdog. In an environment where someone has privileged access to a guest but no direct access to the host OS he could shut down a guest accidentally when intending to reboot (or logoff). It may be useful to trap that and turn the shutdown into a reboot.
Regards,
Steve.
Quoted 10 lines · Steve Fosdick
Quoted 4 lines · Daniel P. Berrange
I think we can only support the following options
- shutdown - graceful shutdown of guest via ACPI event via
qemu_system_powerdown_request()I wonder how many times the guest will be healthy enough to respond to this and how many times it will have crashed badly enough that this does no good.
[...]
Quoted 3 lines
Do we want to offer the guest the option of a clean shutdown if it can still manage that and then reboot, i.e. the shutdown option but for use case 1?
The Intel 6300ESB in fact offers this possibility already. As with other high-end watchdog hardware, it can be configured to send a "pretimer interrupt". For example, if the watchdog is set to expire after 60 seconds, you can get an interrupt N seconds before this, which you can use to try a graceful shutdown.
Having said that, Linux watchdog software doesn't support this feature ...
Rich.
Signature · 4 lines
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
Quoted 7 lines · Richard W.M. Jones
The Intel 6300ESB in fact offers this possibility already. As with other high-end watchdog hardware, it can be configured to send a "pretimer interrupt". For example, if the watchdog is set to expire after 60 seconds, you can get an interrupt N seconds before this, which you can use to try a graceful shutdown.
Having said that, Linux watchdog software doesn't support this feature ...
Am I right in thinking that the kernel will not respond to an ACPI event that indicates a power button has been pressed but forward it to userspace where something (acpid) should respond?
If so there isn't much point in making the pre-timer interrupt do that as we are assuming userspace is dead. Perhaps instead it could use the Alt-SysRq mechanism to do an emergency sync,reboot?
Regards,
Steve.
Quoted 4 lines · Steve Fosdick
Perhaps we could have a second timer such that if, on asking the guest to shut down via ACPI, the guest does not respond within a certain time limit with an ACPI request to turn the power off we go for one of the other options below?
Good idea. ACPI is notoriously flaky, especially on a guest which has already crashed its kernel...
Quoted 3 lines
1. Ensure continuity of service. When a guest OS gets stuck for some reason make sure it is re-started. This is probably the only use case on a real physical machine.
For real continuity of service you'd also want QEMU itself to have a watchdog. Either a software watchdog internally (SIGALRM => kill/exec self, or child process expecting regular pings over a pipe), or by QEMU itself becoming a client of the host watchdog.
I say this because I've experienced KVM lock up several times.
Quoted 5 lines
2. Limit the resource consumption of a crashed guest when the host serves other guests. This probably only of concern for virtual machines, i.e. it is specific to the emulated watchdog and its interaction with qemu rather than being part of how a physical watchdog works.
Related to this is "omg the database guest has crashed - and frankly we don't rtust the automatic recovery process - stop it for now and we'll inspect for damage manually before starting it again".
Quoted 7 lines
Do we want to offer the guest the option of a clean shutdown if it can still manage that and then reboot, i.e. the shutdown option but for use case 1?
If so we need to be able to turn the APCI power off request into a reset instead. We already have the -no-reboot option to turn a reboot into a power off - this is the opposite.
Interesting idea.
Quoted 5 lines
In fact, some people may find that option useful anyway even without the watchdog. In an environment where someone has privileged access to a guest but no direct access to the host OS he could shut down a guest accidentally when intending to reboot (or logoff). It may be useful to trap that and turn the shutdown into a reboot.
I've done that a few times. It's only minorly annoying in that you lose the VNC connection and have to login and restart the VM.
Side notes: It would be nice to be able to change the "shutdown-when-asked-to-reboot" (et al) option from the monitor. It would also be nice to "pause-when-asked-to-shutdown/reboot", which is useful during automatic OS installs - the host script changes the media and/or hardware at each reboot.
-- Jamie
Quoted 4 lines · Jamie Lokier
For real continuity of service you'd also want QEMU itself to have a watchdog. Either a software watchdog internally (SIGALRM => kill/exec self, or child process expecting regular pings over a pipe), or by QEMU itself becoming a client of the host watchdog.
So many possibilities - one, two, or three watchdogs?
If we want to cater for the situation where one host is running more than one guest we would not want a single watchdog with a communication path from one of the guests to a hardware watchdog on the host because this would cause the host to reboot if any one of the guests failed thus rebooting guests that were still working.
A two-watchdog solution could work though.
The host would be protected with a normal hardware watchdog and this would use a normal user-space process to tickle that watchdog rather than QEMU.
For QEMU there is a software watchdog that looks to the guest like a hardware watchdog and therefore uses the already written driver and a normal user space process on the guest.
The timer part of the QEMU software watchdog is implemented as a second userspace process on the host which communicates with the main QEMU process. When the guest tickles the watchdog the tickle is forwarded to the separate watchdog process which resets the timer. When the timer goes off the watchdog sends a message back to QEMU to perform the configured action which QEMU must confirm is happening with a further message back to the watchdog process. If QEMU does not respond the watchdog process uses host OS-level facilities to kill and re-start it.
The three watchdog solution uses the host hardware watchdog, a software watchdog within QEMU as implemented by Richard and another watchdog that sits in a separate process which can 'ping' QEMU and, if it does not respond, uses host OS-level facilities to kill and re-start it.
Quoted 8 lines
Quoted 5 lines
In fact, some people may find that option useful anyway even without the watchdog. In an environment where someone has privileged access to a guest but no direct access to the host OS he could shut down a guest accidentally when intending to reboot (or logoff). It may be useful to trap that and turn the shutdown into a reboot.
I've done that a few times. It's only minorly annoying in that you lose the VNC connection and have to login and restart the VM.
I suspect most of the people using QEMU have access to the host OS too which means as you say that it is no big deal.
In some corporate environments accidentally shutting down a guest means submitting a job to another team and then waiting while they get round to restarting it. A watchdog is one feature that takes QEMU in the direction of being suitable for a business production environment and this feature seemed like it would also be useful in such an environment.
Quoted 5 lines
Side notes: It would be nice to be able to change the "shutdown-when-asked-to-reboot" (et al) option from the monitor. It would also be nice to "pause-when-asked-to-shutdown/reboot", which is useful during automatic OS installs - the host script changes the media and/or hardware at each reboot.
Seems like a useful feature.
This is beginning to like a complete matrix rather than a simple option i.e. QEMU could be configured to do any of the stop/reset/poweroff/reset etc. options for any of the requests from the guest.
Regards,
Steve.
Quoted 7 lines · Steve Fosdick
Quoted 4 lines · Jamie Lokier
For real continuity of service you'd also want QEMU itself to have a watchdog. Either a software watchdog internally (SIGALRM => kill/exec self, or child process expecting regular pings over a pipe), or by QEMU itself becoming a client of the host watchdog.
So many possibilities - one, two, or three watchdogs?
IMHO external watchdog (i.e. ones that monitor qemu itself) are out of scope. We should restrict this to internal watchdog devices within a VM.
There already exist several solutions for external fencing. Traditionally these are used in a clustered environment, where physical machines are connected to remote power switches (or equivalent management cards). Making these system kill/restart virtual machines seems like it should be a very minor tweak.
Paul
Quoted 3 lines · Paul Brook
IMHO external watchdog (i.e. ones that monitor qemu itself) are out of scope. We should restrict this to internal watchdog devices within a VM.
I agree. The thing of interest is whether the guest is running, not whether QEMU is running.
It would be good for the internal watchdog device to have the option of no effect except for its status to be available in the QEMU monitor, so management apps can see when the guest has crashed.
Steve's idea of a matrix (Guest event -> QEMU action) is a good one, and could include "watchdog not pinged" as a guest event.
-- Jamie
Am 28.02.2009 um 22:34 schrieb Jamie Lokier:
Quoted 11 lines
Quoted 3 lines · Paul Brook
IMHO external watchdog (i.e. ones that monitor qemu itself) are out of scope. We should restrict this to internal watchdog devices within a VM.
I agree. The thing of interest is whether the guest is running, not whether QEMU is running.
It would be good for the internal watchdog device to have the option of no effect except for its status to be available in the QEMU monitor, so management apps can see when the guest has crashed.
...or when the guest runs into ENOSPC. ;)
Quoted 3 lines · Paul Brook
IMHO external watchdog (i.e. ones that monitor qemu itself) are out of scope. We should restrict this to internal watchdog devices within a VM.
Yes -- this patch just tries to emulate existing hardware devices. As you say, checking if QEMU is up is a separate matter.
BTW does anyone want to review the patch?
http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg01434.html
Rich.
Signature · 4 lines
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top