Bug 1565106 - Error creating virtual machine clone 'xxx': missing source information for device xxx
Summary: Error creating virtual machine clone 'xxx': missing source information for de...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 12:08 UTC by Xiaodai Wang
Modified: 2019-08-06 13:08 UTC (History)
7 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:


Attachments (Terms of Use)
virt-manager debug log (36.18 KB, text/plain)
2018-04-09 12:08 UTC, Xiaodai Wang
no flags Details


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 Xiaodai Wang 2018-04-09 12:08:04 UTC
Description of problem:
Error creating virtual machine clone 'rhel7.5-3-clone': missing source information for device vdb

Version-Release number of selected component (if applicable):
virt-manager-1.4.3-3.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Prepare a guest has two disks, one of them is readonly.
2. Open virt-manager to clone the guest.
3. In Clone virtual machine dialog, choose 'Clone this disk' for the readonly disk.
4. Click 'clone' button.

Actual results:
[Mon, 09 Apr 2018 07:56:09 virt-manager 27646] DEBUG (error:99) error dialog message:
summary=Error creating virtual machine clone 'rhel7.5-3-clone': missing source information for device vdb
details=Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/clone.py", line 855, in _async_clone
    self.clone_design.start_duplicate(meter)
  File "/usr/share/virt-manager/virtinst/cloner.py", line 478, in start_duplicate
    dom = self.conn.defineXML(self.clone_xml)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3676, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirtError: missing source information for device vdb

Expected results:
The guest should be cloned successfully.

Additional info:

Comment 1 Xiaodai Wang 2018-04-09 12:08:30 UTC
Created attachment 1419199 [details]
virt-manager debug log

Comment 5 Pavel Hrdina 2019-03-06 16:20:27 UTC
Upstream commit:

commit a02fc0d02272ade8aea851be4e0f7c7ec38de2fe
Author: Pavel Hrdina <phrdina@redhat.com>
Date:   Tue Mar 5 10:16:06 2019 +0100

    virtManager: clone: build default clone path if we know how

Comment 8 ysu@redhat.com 2019-04-29 07:14:16 UTC
I can reproduce this issue with package:
virt-manager-1.4.3-3.el7.noarch

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-12.el7.x86_64
qemu-kvm-rhev-2.12.0-26.el7.x86_64
libvirt-python-4.5.0-1.el7.x86_64

Steps:

1. Prepare a guest has two disks, one of them is readonly.
 
<disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/rhel7.6-1.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/rhel7.6-bios.qcow2'/>
      <target dev='vdb' bus='virtio'/>
      <readonly/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</disk>


1.1. Open virt-manager to clone the guest.
1.1.1 Launch virt-manager.
1.1.2 Choose the shutdown guest you want to clone and right click to choose 'clone'.

1.3. In Clone virtual machine dialog, choose 'Clone this disk' for the readonly disk.

1.4. Click 'clone' button.
Result: Clone is success,then start the new guest to check.

1.5  Check disk's configuration in guest's xml file
#virsh dumpxml rhel7.6-bios-clone

<disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/rhel7.6-bios-clone.qcow2'/>
      <backingStore/>
      <target dev='vdb' bus='virtio'/>
      <readonly/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</disk>

Result:Virt-clone can  prepare the default path for user when they want to clone  ReadOnly disk.
Clone is success and the newly cloned guest can start successfully.

I move this bug from ON_QA to VERIFIED based on above testing.

Comment 10 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.