Bug 1476866

Summary: Non-functioning on_reboot setting in the domain XML file.
Product: [Fedora] Fedora Reporter: Sam Varshavchik <mrsam>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: agedosier, berrange, clalancette, crobinso, itamar, laine, libvirt-maint, mprivozn, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-04 15:10:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sam Varshavchik 2017-07-31 16:25:00 UTC
Description of problem:

<on_reboot>destroy</on_reboot> in the domain XML file does not appear to take effect. Win 10 guest VM with this setting still reboots automatically.

Version-Release number of selected component (if applicable):

3.1.2-4

How reproducible:

Always

Steps to Reproduce:
1. Edit the domain XML configuration file for a Windows 10 guest, setting on_reboot to destroy.
2. Choose "Restart" from the VM.

Actual results:

Guest shuts down and reboots.

Expected results:

Guest shuts down, and stops.

Additional info:

Using

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

and

  <qemu:commandline>
    <qemu:arg value='-no-reboot'/>
  </qemu:commandline>

is a temporary workaround.

Comment 1 Michal Privoznik 2017-08-03 07:37:43 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2017-August/msg00116.html

Comment 2 Michal Privoznik 2017-08-16 14:39:06 UTC
Another attempt:

https://www.redhat.com/archives/libvir-list/2017-August/msg00449.html

Comment 3 Michal Privoznik 2017-08-29 10:45:03 UTC
I've just pushed the patch upstream:

commit 3ee9bdbe351c0b80d4c469571ef31df3f1b148ea
Author:     Michal Privoznik <mprivozn>
AuthorDate: Mon Jul 31 16:55:58 2017 +0200
Commit:     Michal Privoznik <mprivozn>
CommitDate: Tue Aug 29 11:33:38 2017 +0200

    qemu: Honour <on_reboot/>
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1476866
    
    For some reason, we completely ignore <on_reboot/> setting for
    domains. The implementation is simply not there. It never was.
    
    Signed-off-by: Michal Privoznik <mprivozn>

v3.6.0-238-g3ee9bdbe3

Comment 4 Fedora Update System 2017-09-16 19:16:25 UTC
libvirt-3.2.1-6.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ff7b30a42d

Comment 5 Fedora Update System 2017-09-17 10:52:45 UTC
libvirt-3.2.1-6.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ff7b30a42d

Comment 6 Fedora Update System 2017-10-12 02:52:59 UTC
libvirt-3.2.1-6.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.