[Libguestfs] [PATCH] Shut down the appliance cleanly
Richard W.M. Jones
rjones at redhat.com
Thu Aug 26 14:05:44 UTC 2010
On Thu, Aug 26, 2010 at 02:34:44PM +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 isn't 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 causes the appliance to power off cleanly before the init script
> exits. Note it actually does a reboot rather than a poweroff. This is because
> ACPI is disabled in the appliance, meaning poweroff doesn't work, but qemu is
> configured not to restart on reboot.
> ---
> appliance/init | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/appliance/init b/appliance/init
> index 90da1cb..1c01195 100755
> --- a/appliance/init
> +++ b/appliance/init
> @@ -110,8 +110,8 @@ else
> bash -i
> echo
> echo "virt-rescue: Syncing the disk now before exiting ..."
> - echo "(Don't worry if you see a 'Kernel panic' message below)"
> echo
> fi
>
> sync
> +/sbin/reboot -f
> --
> 1.7.2.2
Thanks. Patches 2/4 and 3/4 (this one) will be pushed shortly.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.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
More information about the Libguestfs
mailing list