Bug 1467859 - Inappropriate error info when creating internal snapshot for a vm only with a readonly disk
Inappropriate error info when creating internal snapshot for a vm only with a...
Status: ASSIGNED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.4
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Peter Krempa
Meina Li
:
: 1467861 1467862 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-05 07:04 EDT by jiyan
Modified: 2017-09-12 09:04 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jiyan 2017-07-05 07:04:56 EDT
Description of problem:
Inappropriate error info when creating internal snapshot for a domain only with a readonly disk


Version-Release number of selected component (if applicable):
libvirt-3.2.0-14.el7.x86_64
qemu-kvm-rhev-2.9.0-14.el7.x86_64
kernel-3.10.0-686.el7.x86_64


How reproducible:
100%


Steps to Reproduce:
1.Edit the vm's dumpxml as follows, the vm only with 1 disk element.
# virsh dumpxml rhel |grep "<disk" -A 8
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/rhel1.qcow2'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <readonly/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>


2.Start the vm
# virsh start rhel
Domain rhel started

# virsh -q list |grep rhel 
 8     rhel                           running


3.Create external snapshot for the vm
# virsh snapshot-create-as rhel ss --memspec snapshot=external,file=/tmp/s1 --diskspec sda,snapshot=external,file=/tmp/s2
error: internal error: unable to execute QEMU command 'transaction': Could not create file: Permission denied


4.Create internal snapshot for the vm
# virsh snapshot-create-as rhel 
error: unsupported configuration: internal snapshots and checkpoints require all disks to be selected for snapshot


Actual results:
As step4 above shows


Expected results:
As step3 above shows


Additional info:
Comment 2 Xuesong Zhang 2017-07-05 11:33:52 EDT
*** Bug 1467862 has been marked as a duplicate of this bug. ***
Comment 3 Xuesong Zhang 2017-07-05 11:34:11 EDT
*** Bug 1467861 has been marked as a duplicate of this bug. ***
Comment 4 Peter Krempa 2017-09-12 09:04:30 EDT
The message in step 4 is expected. All read-only disks are excluded from internal snapshot, thus you have no other disk to do the snapshot (at least 1 read-write qcow-formatted disk is required).

On the other hand, the error in step 3 is not that good. But you should not attempt to snapshot read-only drives anyways.

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