RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1463066 - "Clone this disk" button should disable for scsi disk guest in virt-manager GUI
Summary: "Clone this disk" button should disable for scsi disk guest in virt-manager GUI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.4
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-20 03:49 UTC by zhoujunqin
Modified: 2019-08-06 13:08 UTC (History)
4 users (show)

Fixed In Version: virt-manager-1.5.0-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:07:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2232 0 None None None 2019-08-06 13:08:11 UTC

Description zhoujunqin 2017-06-20 03:49:52 UTC
Description of problem:
"Clone this disk" button should disable for scsi disk guest in virt-manager GUI

Version-Release number of selected component (if applicable):
virt-manager-1.4.1-1.el7.noarch
virt-manager-common-1.4.1-1.el7.noarch
virt-install-1.4.1-1.el7.noarch
libvirt-3.1.0-2.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
Testing environment preparation according to Bug 1420190.

1. Installed a guest with disk on scsi pool.
# virsh dumpxml rhel7.2-juzhou
...
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/disk/by-path/pci-0000:18:00.1-fc-0x203500a0b85b0acc-lun-0'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
...

2. Then clone it to rhel7.2-juzhou-clone, which should use volume:  unit:0:0:1 via virt-manager GUI.
2.1 Select guest: rhel7.2-juzhou
2.2 Right click guest: rhel7.2-juzhou
2.3 Select 'Clone' to clone guest.

3. In  "Clone Virtual Machine" page, change Storage to "Clone this disk" then click "Clone".

Actual results:
Failed to clone guest with error:
Error creating virtual machine clone 'rhel7.2-juzhou-clone': missing source information for device vda

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/clone.py", line 860, in _async_clone
    self.clone_design.start_duplicate(meter)
  File "/usr/share/virt-manager/virtinst/cloner.py", line 482, in start_duplicate
    dom = self.conn.defineXML(self.clone_xml)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3564, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirtError: missing source information for device vda

Expected results:
Disable this item if not supported.

Additional info:
I.
I can also reproduce bug issue with guest installed with iscsi pool.

II.
And for glusterfs pool, we'll meet another kind of error:
1. Clone this disk (enable)-> failed
Uncaught error validating input: [Errno 2] No such file or directory: 'gluster://10.66.4.131/gluster-vol1'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/clone.py", line 821, in finish
    if not self.validate():
  File "/usr/share/virt-manager/virtManager/clone.py", line 800, in validate
    cd.setup_clone()
  File "/usr/share/virt-manager/virtinst/cloner.py", line 437, in setup_clone
    self._setup_disk_clone_destination(orig_disk, clone_disk)
  File "/usr/share/virt-manager/virtinst/cloner.py", line 363, in _setup_disk_clone_destination
    clone_disk.validate()
  File "/usr/share/virt-manager/virtinst/devicedisk.py", line 863, in validate
    self._storage_backend.validate(self)
  File "/usr/share/virt-manager/virtinst/diskbackend.py", line 353, in validate
    err, msg = self.is_size_conflict()
  File "/usr/share/virt-manager/virtinst/diskbackend.py", line 390, in is_size_conflict
    vfs = os.statvfs(os.path.dirname(self._path))
OSError: [Errno 2] No such file or directory: 'gluster://10.66.4.131/gluster-vol1'

2. Customize a path - >failed
Uncaught error validating input: Clone onto existing storage volume is not currently supported: 'gluster://10.66.4.131/gluster-vol1/test-qcow2.img'


As a summary, for pool type doesn't support volume creation should choose 'Share disk with xxx' as default, and disabled other items.

Comment 3 Pavel Hrdina 2019-03-04 12:29:30 UTC
Upstream commit:

commit 26a433fc421b7c23e02deb8fe84cdedc21fd8f95
Author: Pavel Hrdina <phrdina>
Date:   Thu Feb 28 11:47:40 2019 +0100

    virtManager: clone: check which storage pools supports volume cloning

Comment 6 ysu@redhat.com 2019-05-09 01:16:16 UTC
I can reproduce this issue with package:
virt-manager-1.5.0-1.el7.noarch

Steps to Reproduce:
1. Installed a guest with disk on iscsi pool.
# virsh dumpxml rhel7.6-iscsi
...
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/disk/by-path/ip-10.73.194.15:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-8771f7d03-573263eebf54d2c2-s1-rwu-v2v-libvirt-lun-0'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
...    

2. Then clone it to rhel7.6-iscsi-clone.
2.1 Select guest: rhel7.6-iscsi
2.2 Right click guest: rhel7.6-iscsi
2.3 Select 'Clone' to clone guest.

3. In  "Clone Virtual Machine" page, change Storage from the defualt item 'Share disk with rhel7.6-iscsi' to "Clone this disk" then click "Clone".

Result:
Clone failed with error:Error creating virtual machine clone 'rhel7.6-iscsi-clone': missing source information for device vda 

Then try to verify this bug with new build:
virt-manager-1.5.0-3.el7.noarch
virt-install-1.5.0-3.el7.noarch
libvirt-4.5.0-16.el7.x86_64
qemu-kvm-rhev-2.12.0-27.el7.x86_64
libvirt-python-4.5.0-1.el7.x86_64

1.Check that the iscsi pool does not support cloning.
1.1 Select guest: rhel7.6-iscsi
1.2 Right click guest: rhel7.6-iscsi
1.3 Select 'Clone' to clone guest.

2. In  "Clone Virtual Machine" page, all options to clone or share disk is disabled.

Result:as expected results,unable to clone with warning info: Storage can not be shared or cloned.

I also did tests for cloning guests with gluster pool,scsi pool and disk,please have a look when you have time.Thank you so much.
https://docs.google.com/spreadsheets/d/1dUS_dvQiPuz024xLEd0IO67C8hDBuP2F2_WeUSHH-pI/edit#gid=0

Comment 7 Pavel Hrdina 2019-05-17 16:32:17 UTC
Hi, thanks for that detailed testing:

dir: OK

disk: The issue here is that virt-manager doesn't know how to create default volume name as
      it has to follow kernel naming rules (/dev/sda1, /dev/nvme0n1p1, ...) so by default it
      will fail with that error message.  When I selected the target volume manually it faild
      with error message that cloning to existing volume is not supported.
      
      This should be probably fixed by not allowing to clone the disk.

fs: OK

gluster: Works for me as expected, I can only select share disk.

iscsi: Works for me as expected, cloning disk is disable.  I should check if we can allow
       sharing for iscsi.

logical: OK

netfs: OK

rbd: not supported

scsi: Works for me as expected, cloning disk is disable.  I should check if we can allow
      sharing for scsi.

sheepdog: not supported

zfs: not supported

Comment 8 ysu@redhat.com 2019-05-20 09:18:54 UTC
Hi Pavel,

Thank you so much for your checking.
If a new bug occurs in the above scenario, we will report it instead of continuing to add it to a new comment on the current bug.

Comment 9 ysu@redhat.com 2019-05-23 07:34:29 UTC
I remove the bug status from ON_QA to VERIFIED based on above results.

Comment 11 errata-xmlrpc 2019-08-06 13:07:59 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://access.redhat.com/errata/RHBA-2019:2232


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