Bug 1081148

Summary: libvirt does not emit any domain event when a snapshot revert changes the VM XML
Product: [Fedora] Fedora Reporter: Jorge Fábregas <jorge.fabregas>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 22CC: berrange, clalancette, crobinso, itamar, jforbes, laine, libvirt-maint, samo_dadela, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-17 20:27:54 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 Jorge Fábregas 2014-03-26 16:23:18 UTC
Description of problem:  When you take an offline snapshot (snapshot of a shutoff VM), add/modify some of its hardware properties afterwards & later decide to revert to this snapshot, the previously added hardware (after snapshot was taken) still remains.


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

# rpm -qa | egrep '(virt|qemu|kernel|spice)' | sort | uniq
abrt-addon-kerneloops-2.2.0-1.fc20.x86_64
ipxe-roms-qemu-20140303-1.gitff1e7fc7.fc20.noarch
kernel-3.13.4-200.fc20.x86_64
kernel-3.13.5-200.fc20.x86_64
kernel-3.13.6-200.fc20.x86_64
kernel-headers-3.13.6-200.fc20.x86_64
kernel-modules-extra-3.13.4-200.fc20.x86_64
kernel-modules-extra-3.13.5-200.fc20.x86_64
kernel-modules-extra-3.13.6-200.fc20.x86_64
libgovirt-0.3.0-3.fc20.x86_64
libreport-plugin-kerneloops-2.2.0-1.fc20.x86_64
libvirt-1.2.2-2.fc20.x86_64
libvirt-client-1.2.2-2.fc20.x86_64
libvirt-daemon-1.2.2-2.fc20.x86_64
libvirt-daemon-config-network-1.2.2-2.fc20.x86_64
libvirt-daemon-config-nwfilter-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-interface-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-libxl-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-lxc-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-network-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-nodedev-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-nwfilter-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-qemu-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-secret-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-storage-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-uml-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-vbox-1.2.2-2.fc20.x86_64
libvirt-daemon-driver-xen-1.2.2-2.fc20.x86_64
libvirt-daemon-kvm-1.2.2-2.fc20.x86_64
libvirt-gconfig-0.1.7-2.fc20.x86_64
libvirt-glib-0.1.7-2.fc20.x86_64
libvirt-gobject-0.1.7-2.fc20.x86_64
libvirt-python-1.2.2-1.fc20.x86_64
qemu-common-2.0.0-0.2.rc0.fc20.x86_64
qemu-guest-agent-2.0.0-0.2.rc0.fc20.x86_64
qemu-img-2.0.0-0.2.rc0.fc20.x86_64
qemu-kvm-2.0.0-0.2.rc0.fc20.x86_64
qemu-system-x86-2.0.0-0.2.rc0.fc20.x86_64
spice-glib-0.23-2.fc20.x86_64
spice-gtk3-0.23-2.fc20.x86_64
spice-server-0.12.4-3.fc20.x86_64
spice-vdagent-0.15.0-1.fc20.x86_64
virt-install-1.0.1-1.fc20.noarch
virt-manager-1.0.1-1.fc20.noarch
virt-manager-common-1.0.1-1.fc20.noarch
virt-viewer-0.6.0-1.fc20.x86_64


How reproducible: always


Steps to Reproduce:
1. shut off VM
2. take snapshot
3. add some hardware (soundcard, new disk etc)
4. revert to snapshot

Actual results:
The hardware you added (after snapshot was taken) remains.


Expected results:
All hardware/config added after the snapshot was taken should be removed. Also, any new file created (as a result of adding some hardware, like a new disk) should be removed from filesystem as well.


Additional info:

This is on Fedora 20 with latest updates using the Virt Preview Repo (fully updated).

Comment 1 Jorge Fábregas 2014-03-26 16:25:20 UTC
Forgot to add that all my tests were performed with virt-manager.

Comment 2 Cole Robinson 2014-04-24 12:45:38 UTC
*** Bug 1090814 has been marked as a duplicate of this bug. ***

Comment 3 Fedora End Of Life 2015-05-29 11:22:36 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Cole Robinson 2015-06-06 22:56:12 UTC
Still the same on F22. What's happening is that the XML is actually changing, but libvirt doesn't emit any event to tell us that... it will emit events if the snapshot causes a VM state change, but nothing WRT to the XML.

Comment 5 Cole Robinson 2016-03-16 23:34:25 UTC
patches are upstream now:

8047d45704a3af77a2c4b88f48e3c98d853813b8
c5e81090eaf40d5735402f94a7446ced3e78a7df

Comment 6 Cole Robinson 2016-03-17 20:27:54 UTC
Since this is tied to an API adjustment, I don't want to backport it. So just closing as UPSTREAM, these patches will be in f24+