[Libguestfs] [PATCH 3/3] Shut down the appliance cleanly

Richard W.M. Jones rjones at redhat.com
Tue Aug 17 11:51:04 UTC 2010


On Tue, Aug 03, 2010 at 05:20:13PM +0100, Matthew Booth wrote:
> When guestfsd exits, or the user exits the virt-rescue shell, the init script
> exits which causes the kernel to panic. This is really a functional issue, as
> all useful work is done by this point. However, it does cause virt-rescue to
> display an unsightly error message.
> 
> This patch adds a new utility, guestfs_poweroff, to the appliance. This powers
> off (reboots really: read the comment) the appliance, preventing init from
> exiting, and therefore the kernel panic.
> 
> We also ignore errors returned by launch() in virt-rescue. launch() expects
> guestfsd to start, which it never does in virt-rescue, so it always returns an
> error about the appliance shutting down unexpectedly.

Can't you just run some existing command, like 'shutdown -P now'?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.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/




More information about the Libguestfs mailing list