[libvirt-users] Changing <on_reboot> in the domain XML file

Sam Varshavchik mrsam at courier-mta.com
Sun Jul 30 01:08:18 UTC 2017


Using virsh edit, I made the following change to the domain XML file:

<on_reboot>destroy</on_reboot>

But this appears to do nothing. The VM guest is Windows 10, and when  
directing it to reboot, it still reboots, instead of shutting off the VM.

I was trying to work around some kind of a bug, somewhere, that started  
happening after updating to Fedora 26 and qemu 2.9, where a reboot throws my  
Windows 10 guests into some kind of a bizarre automatic recovery mode, which  
then claims that the hard drive is hosed. It's not, and a forced shutdown  
followed by a cold start boots everything back up like nothing has happened  
(which I didn't figure out until reinstalling one of the guests, sigh...),  
and everything is peachy once again.

So, anyway, I was trying to figure out a way around it, and  
<on_reboot>destroy</on-reboot> seemed to be exactly what I was looking for.

Perusing qemu's man page, it seems that this option should result in a -no- 
reboot option getting added to qemu's command line. But, looking at the  
actual command line, after starting the VM, it's nowhere to be seen.

A bit more Google-fu found this:

http://blog.vmsplice.net/2011/04/how-to-pass-qemu-command-line-options.html

And I manually added a -no-reboot option to the domain XML file that way.

And you know what? After doing that, telling Windows 10 to reboot simply  
shuts off the VM. Wonderful.

But that still leaves me wondering: what's up with the <on_reboot> tag? Why  
didn't it work? Is this a PEBCAK, or something worth throwing a ticket for?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20170729/7ddd0d64/attachment.sig>


More information about the libvirt-users mailing list