qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Hardware watchdogs (patch for discussion only)


From: Richard W.M. Jones
Subject: Re: [Qemu-devel] Hardware watchdogs (patch for discussion only)
Date: Thu, 26 Feb 2009 13:55:21 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Thu, Feb 26, 2009 at 10:51:06AM +0000, Daniel P. Berrange wrote:
> 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)

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:

void
watchdog_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.

-- 
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]