Bug 1463066 - "Clone this disk" button should disable for scsi disk guest in virt-manager GUI
"Clone this disk" button should disable for scsi disk guest in virt-manager GUI
Status: ASSIGNED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager (Show other bugs)
7.4
x86_64 Unspecified
low Severity low
: rc
: ---
Assigned To: Pavel Hrdina
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-19 23:49 EDT by zhoujunqin
Modified: 2017-08-10 03:40 EDT (History)
4 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 zhoujunqin 2017-06-19 23:49:52 EDT
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.

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