
Hi list, I'm having an issue with snapshot creation. Scenario: qemu 1.1 libvirt 0.9.12 I create a domain, and start it. The domain has 1 IDE cdrom device defined (see below). When started, I want to mount an ISO file to it. So I do updateDeviceFlags in libvirt-python or update-device in virsh (both have the same problem). This works fine, the ISO image becomes available to the domain. Now I create a snapshot on the still running domain using snapshotCreateXML in libvirt-python or snapshot-create in virsh. The command returns immediately without error (a normal snapshot takes several seconds to complete). If I revert to this snapshot this command also returns immediately without error, but the snapshot is not actually reverted to, the domain remains running in the same state as if nothing had happened (I test this by verifying console output and checking if a testfile is present on the domain). If I do not use the update device commands prior to creating a snapshot, all is well. If I remove the source from the cdrom device using update device, the snapshots work properly again. Any idea what causes this? Steps to reproduce using virsh: virsh # start 4d5d722b-864c-657e-0f39-55d1bafc760e Domain 4d5d722b-864c-657e-0f39-55d1bafc760e started virsh # snapshot-create 4d5d722b-864c-657e-0f39-55d1bafc760e Domain snapshot 1348653920 created virsh # snapshot-revert 4d5d722b-864c-657e-0f39-55d1bafc760e 1348653920 All is good, the snapshot is reverted to properly. Now I update the cdrom device: virsh # update-device 4d5d722b-864c-657e-0f39-55d1bafc760e deb.xml Device updated successfully virsh # snapshot-create 4d5d722b-864c-657e-0f39-55d1bafc760e Domain snapshot 1348654116 created Command returns instantly. virsh # snapshot-revert 4d5d722b-864c-657e-0f39-55d1bafc760e 1348654116 No errors, but the snapshot is not reverted to. Now I remove the <source .../> again and do an update-device. virsh # update-device 4d5d722b-864c-657e-0f39-55d1bafc760e deb-off.xml Device updated successfully virsh # snapshot-create 4d5d722b-864c-657e-0f39-55d1bafc760e Domain snapshot 1348654540 created virsh # snapshot-revert 4d5d722b-864c-657e-0f39-55d1bafc760e 1348654540 Snapshot is created and reverted to properly. virsh # dumpxml 4d5d722b-864c-657e-0f39-55d1bafc760e <domain type='kvm' id='135'> <name>4d5d722b-864c-657e-0f39-55d1bafc760e</name> <uuid>4d5d722b-864c-657e-0f39-55d1bafc760e</uuid> <memory unit='KiB'>786432</memory> <currentMemory unit='KiB'>786432</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64' machine='pc-1.1'>hvm</type> <boot dev='hd'/> <boot dev='cdrom'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/kvm</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/data/images/debian-live-6.0.4-amd64-standard.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/data/domains/2f8baacd-563c-b747-b621-c0ddb4aa84bd'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <controller type='usb' index='0'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='bridge'> <mac address='52:54:00:39:86:29'/> <source bridge='br0'/> <target dev='vnet2'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5902' autoport='yes'/> <video> <model type='vga' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </memballoon> </devices> <seclabel type='none'/> </domain> deb.xml: <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/data/images/debian-live-6.0.4-amd64-standard.iso'/> <target dev='hdc' bus='ide'/> </disk> deb-off.xml: <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hdc' bus='ide'/> </disk> Thanks much, - Jasper