Bug 1106419
Summary: | No snapshot should be created when create external disk snapshot without specify disk while guest is shut off | ||
---|---|---|---|
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: |
Description
Shanzhi Yu
2014-06-09 09:52:58 UTC
similar to bug 1106416 (which was about internal snapshots); probably a single code change will fix both, in which case I may mark this as a duplicate bug. 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. Hi Peter. Verify as failed. It doesn't forbid to create external snapshot when snapshot='no' Version: qemu-kvm-rhev-2.8.0-6.el7.x86_64 libvirt-3.1.0-2.el7.x86_64 For disk xml with snapshot='no': <disk type='file' device='disk' snapshot='no'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/BZ1106416.qcow2'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> It doesn't forbid create external snapshot with --disk-only --diskspec: # virsh domstate BZ1106416 shut off # virsh snapshot-create-as BZ1106416 s1 --disk-only --diskspec hda,file=/tmp/xxo Domain snapshot s1 created # virsh snapshot-dumpxml BZ1106416 s1|awk '/<disk/,/<\/disk/' <disks> <disk name='hda' snapshot='external' type='file'> <driver type='qcow2'/> <source file='/tmp/xxo'/> </disk> <disk type='file' device='disk' snapshot='no'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/BZ1106416.qcow2'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> That is expected. --diskspec overrides the default set via the 'snapshot' attribute. The attribute applies only if --diskspec does not cover the given drive. As comment8 and comment9. Bug verified on libvirt-3.2.0-2.el7.x86_64 1. Prepare a running VM with snapshot='no' in its disk xml: <disk type='file' device='disk' snapshot='no'> <driver name='qemu' type='qcow2'/> <source file='/var/lib/libvirt/images/q35.qcow2'/> <backingStore/> <target dev='sda' bus='sata'/> <alias name='sata0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 2. Try creating internal or external snapshot # virsh snapshot-create-as q35 [sudo] password for hansolo: error: unsupported configuration: internal snapshots and checkpoints require all disks to be selected for snapshot # virsh snapshot-create-as q35 --disk-only error: unsupported configuration: nothing selected for snapshot As above. Bug fixed. Correct a typo in comment10: 'a running VM' should be 'a shutoff VM'. 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 |