Bug 735553
| Summary: | libvirt should check for ABI compatibility of snapshots | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Eric Blake <eblake> |
| Component: | libvirt | Assignee: | Eric Blake <eblake> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2 | CC: | ajia, dyuan, mzhan, nzhang, rwu, veillard, whuang |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-0.9.4-12.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-06 11:28:21 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 638510, 743047 | ||
|
Description
Eric Blake
2011-09-03 13:54:35 UTC
Getting this fixed, at least to the point of recognizing incompatible ABI, is a prereq to bug 638510 support for live snapshots via the snapshot_blkdev qemu monitor command. Upstream does not yet have a solution for VIR_DOMAIN_SNAPSHOT_REVERT_FORCE implemented, so depending on time constraints, we may have to split that half into a separate BZ for later enhancement. Got an error when revert from created snapshot, move back to ASSIGNED.
# virsh start foo
Domain foo started
# virsh snapshot-create-as foo snap
Domain snapshot snap created
# virsh snapshot-dumpxml foo snap
<domainsnapshot>
<name>snap</name>
<state>running</state>
<creationTime>1315915439</creationTime>
<domain type='kvm'>
<name>foo</name>
<uuid>d3782e1f-e34a-bf7c-414b-4f74d3837e96</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='rhel6.1.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='writeback'/>
<source file='/var/lib/libvirt/images/foo.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/boot/cdrom.img'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='fdc' index='0'/>
<interface type='bridge'>
<mac address='52:54:00:85:15:ce'/>
<source bridge='rhevm'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='spice' autoport='yes'>
<image compression='auto_glz'/>
<jpeg compression='auto'/>
<zlib compression='auto'/>
<playback compression='on'/>
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>
</domainsnapshot>
# virsh destroy foo
Domain foo destroyed
# virsh setmaxmem foo 1048576
# virsh start foo
Domain foo started
# virsh snapshot-revert foo snap
error: operation failed: Error -22 while loading VM state
Aha - the ABI compatibility checking was incomplete, and we happened to trip on one of the few places where the change is guest-visible but the code didn't flag it. Proposed this upstream: https://www.redhat.com/archives/libvir-list/2011-September/msg00471.html Back in POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-September/msg00458.html Tested with libvirt-0.9.4-12.el6.x86_64, already been fixed. Move to VERIFIED.
[root@localhost ~]# virsh start foo
Domain foo started
[root@localhost ~]# virsh snapshot-create-as foo snap
Domain snapshot snap created
[root@localhost ~]# virsh snapshot-list foo
Name Creation Time State
------------------------------------------------------------
snap 2010-02-08 20:58:16 -0500 running
[root@localhost ~]# virsh snapshot-dumpxml foo snap
<domainsnapshot>
<name>snap</name>
<state>running</state>
<creationTime>1265680696</creationTime>
<domain type='kvm'>
<name>foo</name>
<uuid>5035868c-6f23-63d1-d05c-1fc5ff963134</uuid>
<memory>524288</memory>
<currentMemory>524288</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='rhel6.2.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/foo.img'/>
<target dev='vda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</controller>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:11:df:7f'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='pty'>
<target type='virtio' name='org.linux-kvm.port.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
</devices>
</domain>
</domainsnapshot>
[root@localhost ~]# virsh destroy foo
Domain foo destroyed
[root@localhost ~]# virsh setmaxmem foo 1048576
[root@localhost ~]# virsh start foo
Domain foo started
[root@localhost ~]# virsh snapshot-revert foo snap
error: unsupported configuration: Target domain max memory 524288 does not match source 1048576
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1513.html |