Bug 1150609 - libvirt misreport live snapshot capability
Summary: libvirt misreport live snapshot capability
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.6
Hardware: Unspecified
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1149667
Blocks: 1002699 rhev35betablocker 1153323 rhev35rcblocker rhev35gablocker
TreeView+ depends on / blocked
 
Reported: 2014-10-08 14:04 UTC by Jan Kurik
Modified: 2014-12-11 16:13 UTC (History)
29 users (show)

Fixed In Version: libvirt-0.10.2-46.el6_6.1
Doc Type: Bug Fix
Doc Text:
In Red Hat Enterprise Linux 6.6, support was added for libvirt to report whether QEMU is capable of creating snapshots. However, libvirt did not probe for the snapshot capability properly. As a consequence, the snapshot capability of KVM Guest Image in VDSM was reported as unavailable even when it was available, and creating a disk snapshot in some cases failed. With this update, libvirt no longer reports QEMU snapshot capability, and therefore does not cause the described problem.
Clone Of: 1149667
Environment:
Last Closed: 2014-10-27 09:37:03 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1720 normal SHIPPED_LIVE libvirt bug fix update 2014-10-27 13:36:48 UTC

Description Jan Kurik 2014-10-08 14:04:19 UTC
This bug has been copied from bug #1149667 and has been proposed
to be backported to 6.6 z-stream (EUS).

Comment 7 Shanzhi Yu 2014-10-17 10:01:03 UTC
1. libvirt-0.10.2-46.el6_6.1.x86_64 + qemu-kvm-rhev-0.12.1.2-2.448.el6.x86_64

1.1 Check snapshot capabilities report 

#virsh capabilities |grep snapshot

1.2 Try to create external disk snapshot

1) with running guest

# virsh snapshot-create-as rhel6.5 s1  --disk-only 
Domain snapshot s1 created

# virsh snapshot-dumpxml rhel6.5 s1 
<domainsnapshot>
  <name>s1</name>
  <state>disk-snapshot</state>
  <creationTime>1413537638</creationTime>
  <memory snapshot='no'/>
  <disks>
    <disk name='vda' snapshot='external'>
      <driver type='qcow2'/>
      <source file='/var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.s1'/>
    </disk>
  </disks>


2) with shut off guest

#virsh snapshot-create-as rhel6.5 s2 --disk-only 
Domain snapshot s2 created

# virsh snapshot-dumpxml rhel6.5 s2 
<domainsnapshot>
  <name>s2</name>
  <state>shutoff</state>
  <parent>
    <name>s1</name>
  </parent>
  <creationTime>1413537689</creationTime>
  <memory snapshot='no'/>
  <disks>
    <disk name='vda' snapshot='external'>
      <driver type='qcow2'/>
      <source file='/var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.s2'/>
    </disk>
  </disks>

1.3 Try to create external system checkpoint snapshot

1) with running guest
# virsh snapshot-create-as rhel6.5 s3 --diskspec vda,file=/var/lib/libvirt/images/s3.disk  --memspec file=/var/lib/libvirt/images/s3.mem
Domain snapshot s3 created

# virsh snapshot-dumpxml rhel6.5 s3
<domainsnapshot>
  <name>s3</name>
  <state>running</state>
  <parent>
    <name>s2</name>
  </parent>
  <creationTime>1413537819</creationTime>
  <memory snapshot='external' file='/var/lib/libvirt/images/s3.mem'/>
  <disks>
    <disk name='vda' snapshot='external'>
      <driver type='qcow2'/>
      <source file='/var/lib/libvirt/images/s3.disk'/>
    </disk>
  </disks>

2) with shut off guest

# virsh snapshot-create-as rhel6.5 s4  --diskspec vda,file=/var/lib/libvirt/images/s4.disk  --memspec file=/var/lib/libvirt/images/s4.mem
error: XML error: memory state cannot be saved with offline or disk-only snapshot


2. libvirt-0.10.2-46.el6_6.1.x86_64 + qemu-kvm-0.12.1.2-2.448.el6_6.x86_64

2.1 Check snapshot capabilities report 

#virsh capabilities |grep snapshot

2.2 Try to create external disk snapshot

1) with running guest

# virsh snapshot-create-as rhel6.5 ss1  --disk-only 
error: Operation not supported: live disk snapshot not supported with this QEMU binary

2) with shut off guest

# virsh snapshot-create-as rhel6.5 ss1  --disk-only 
Domain snapshot ss1 created

# virsh snapshot-list rhel6.5  --external
 Name                 Creation Time             State
------------------------------------------------------------
 ss1                  2014-10-17 17:17:01 +0800 shutoff

2.3 Try to create external system checkpoint snapshot

1) with running guest

# virsh list 
 Id    Name                           State
----------------------------------------------------
 3     rhel6.5                        running


# virsh snapshot-create-as rhel6.5 ss3 --diskspec vda,file=/var/lib/libvirt/images/ss3.disk  --memspec file=/var/lib/libvirt/images/ss3.mem
error: Operation not supported: live disk snapshot not supported with this QEMU binary

2) with shut off guest 

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel6.5                        shut off


# virsh snapshot-create-as rhel6.5 ss3 --diskspec vda,file=/var/lib/libvirt/images/ss3.disk  --memspec file=/var/lib/libvirt/images/ss3.mem
error: XML error: memory state cannot be saved with offline or disk-only snapshot

Comment 8 Shanzhi Yu 2014-10-17 10:22:56 UTC
# virsh capabilities

<capabilities>

  <host>
    <uuid>93968eaa-9fda-4b27-9510-07e086704e95</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Opteron_G3</model>
      <vendor>AMD</vendor>
      <topology sockets='1' cores='4' threads='1'/>
      <feature name='invtsc'/>
      <feature name='ibs'/>
      <feature name='osvw'/>
      <feature name='3dnowprefetch'/>
      <feature name='cr8legacy'/>
      <feature name='extapic'/>
      <feature name='cmp_legacy'/>
      <feature name='3dnow'/>
      <feature name='3dnowext'/>
      <feature name='pdpe1gb'/>
      <feature name='fxsr_opt'/>
      <feature name='mmxext'/>
      <feature name='ht'/>
      <feature name='vme'/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
    </power_management>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='1'>
        <cell id='0'>
          <cpus num='4'>
            <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
            <cpu id='1' socket_id='0' core_id='1' siblings='1'/>
            <cpu id='2' socket_id='0' core_id='2' siblings='2'/>
            <cpu id='3' socket_id='0' core_id='3' siblings='3'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <secmodel>
      <model>selinux</model>
      <doi>0</doi>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine>rhel6.6.0</machine>
      <machine canonical='rhel6.6.0'>pc</machine>
      <machine>rhel6.5.0</machine>
      <machine>rhel6.4.0</machine>
      <machine>rhel6.3.0</machine>
      <machine>rhel6.2.0</machine>
      <machine>rhel6.1.0</machine>
      <machine>rhel6.0.0</machine>
      <machine>rhel5.5.0</machine>
      <machine>rhel5.4.4</machine>
      <machine>rhel5.4.0</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/libexec/qemu-kvm</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
      <pae/>
      <nonpae/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine>rhel6.6.0</machine>
      <machine canonical='rhel6.6.0'>pc</machine>
      <machine>rhel6.5.0</machine>
      <machine>rhel6.4.0</machine>
      <machine>rhel6.3.0</machine>
      <machine>rhel6.2.0</machine>
      <machine>rhel6.1.0</machine>
      <machine>rhel6.0.0</machine>
      <machine>rhel5.5.0</machine>
      <machine>rhel5.4.4</machine>
      <machine>rhel5.4.0</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/libexec/qemu-kvm</emulator>
      </domain>
    </arch>
    <features>
      <cpuselection/>
      <deviceboot/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
    </features>
  </guest>

</capabilities>

Comment 10 errata-xmlrpc 2014-10-27 09:37:03 UTC
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.

https://rhn.redhat.com/errata/RHBA-2014-1720.html


Note You need to log in before you can comment on or make changes to this bug.