From: "Richard W.M. Jones" <rjones(a)redhat.com>
---
appliance/init | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/appliance/init b/appliance/init
index 681e59b..5e1fac4 100755
--- a/appliance/init
+++ b/appliance/init
@@ -171,4 +171,9 @@ else
fi
sync
-reboot -f
+
+if ! grep -sq guestfs_noreboot=1 /proc/cmdline; then
+ # qemu has the -no-reboot flag, so issuing a reboot here actually
+ # causes qemu to exit gracefully.
+ reboot -f
+fi
--
1.8.3.1