Bug 1106416
Summary: | No internal snapshot should be created when guest xml with snapshot='no' | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Shanzhi Yu <shyu> | ||||
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | ||||
Status: | CLOSED ERRATA | QA Contact: | Han Han <hhan> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 7.0 | CC: | dyuan, eblake, hhan, jdenemar, mzhan, pkrempa, rbalakri, xuzhang | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | libvirt-2.5.0-1.el7 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-08-01 17:06:41 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: | |||||||
Attachments: |
|
Description
Shanzhi Yu
2014-06-09 09:48:49 UTC
Peter may have already fixed this; if not, it should be an easy analysis and fix. Internal snapshots are still created with with the old monitor API that does not support skipping certain disks for internal snapshot. We will need to implement the support for blockdev-snapshot-internal-sync to achieve this functionality. This was already fixed a while ago: commit 91b7e06865d8f630f2ac9e07435ba92520248af4 Author: Peter Krempa <pkrempa> Date: Tue May 20 14:22:25 2014 +0200 qemu: snapshot: Forbid empty snapshots If neither disks nor memory are selected for snapshot we'd record metadata in case of external snapshot and do a disk snapshot in case of external disk snapshot. Forbid this as it doesn't make much sense. additionally, commit: commit 03b4da131a95e4cc83cfdfcf21a701ba3ca04a5e Author: Peter Krempa <pkrempa> Date: Tue May 20 14:04:23 2014 +0200 qemu: snapshot: Forbid partial internal snapshots qemu's savevm command does a snapshot of all non readonly disks of a VM. Libvirt though allowed disabling snapshot for certain disk of a VM. disallows partial internal snapshots since it's not currently possible. Verified on libvirt-3.1.0-2.el7.x86_64: 1. Prepare an inactive guest with snapshot='no': + virsh dumpxml BZ1106416 + awk '/<disk/,/<\/disk/' <disk type='file' device='disk' snapshot='no'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/BZ1106416.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> 2. Try to create internal snapshot when VM is inactive: + virsh snapshot-create-as BZ1106416 s1 error: unsupported configuration: nothing selected for snapshot + virsh dumpxml BZ1106416 + awk '/<disk/,/<\/disk/' <disk type='file' device='disk' snapshot='no'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/BZ1106416.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> 3. Try to create internal snapshot when VM is active: + virsh start BZ1106416 Domain BZ1106416 started + virsh snapshot-create-as BZ1106416 s1 error: unsupported configuration: internal snapshots and checkpoints require all disks to be selected for snapshot + virsh dumpxml BZ1106416 + awk '/<disk/,/<\/disk/' <disk type='file' device='disk' snapshot='no'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/BZ1106416.qcow2'/> <backingStore/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> The result is expected. 4. Set disk as readonly mode, rerun as step1~3. Get the same result when creating internal snapshot. Bug verified. Created attachment 1261448 [details]
Verification script
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://access.redhat.com/errata/RHEA-2017:1846 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://access.redhat.com/errata/RHEA-2017:1846 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://access.redhat.com/errata/RHEA-2017:1846 |