Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1177099

Summary: Use virt-clone failed to clone guest with disk type volume
Product: Red Hat Enterprise Linux 7 Reporter: zhoujunqin <juzhou>
Component: virt-managerAssignee: Giuseppe Scrivano <gscrivan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: dyuan, gscrivan, mzhan, tzheng, xiaodwan
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-1.2.0-1-el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 05:22:59 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:
Attachments:
Description Flags
Screenshot for step2.2
none
Change storage path dialogue none

Description zhoujunqin 2014-12-24 07:48:36 UTC
Created attachment 972681 [details]
Screenshot for step2.2

Description of problem:
Use virt-clone failed to clone guest with disk type volume

Version-Release number of selected component (if applicable):
virt-manager-1.1.0-10.el7.noarch
virt-install-1.1.0-10.el7.noarch
libvirt-1.2.8-11.el7.x86_64
qemu-kvm-rhev-2.1.2-17.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a guest with disk type volume.
# virsh dumpxml rhel6.5-test-iptables-off
...
    <disk type='volume' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source pool='default' volume='rhel6.5-test-iptables-off-sda'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
...

2. Clone this guest:

Scenario 1: via command
1.1. Clone the guest called "rhel6.5-test-iptables-off" and auto generating a new name and disk clone path.
# virt-clone -o rhel6.5-test-iptables-off --auto-clone

Scenario 2: via virt-manager
2.1. Launch virt-manager, click the guest and open. Then click "Virtual Machine"---> "Clone", a window called "Clone Virtual Machine" pop up.
2.2. Choose item "Storage" to "Details", then try to edit the New Path custom.

Actual results:
Scenario 1: via command
Failed to clone guest:
# virt-clone -o rhel6.5-test-iptables-off --auto-clone
ERROR    Could not determine original disk information: Disk path '/root/rhel6.5-test-iptables-off-sda' does not exist.

Scenario 2: via virt-manager
After step2.2, failed to edit "New Path", cannot input path in window. (Detail see Screenshot)


Expected results:
1. Virt-clone should clone guest with disk type volume successfully.
2. Via virt-manager can custom "New Path" for guest with disk type volume.

Additional info:
1. I will attach Screenshot for virt-manager.
2. Virt-clone command work well for guest with:
...
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/snapshot1.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>

...

# virt-clone  -o snapshot1 --auto-clone
Allocating 'snapshot1-clone1.qcow2'                                                                                                                                                         | 8.0 GB  00:01:23    

Clone 'snapshot1-clone1' created successfully.

3. Via virt-manager, can clone this guest successfully when choosing "Share disk with rhel6.5-test-iptables-off".

Comment 1 Giuseppe Scrivano 2015-02-24 13:53:09 UTC
fixed upstream by:

commit 86682c8c5464c27c3f5e86d3a2dc87d7a4adfd0f
Author: Cole Robinson <crobinso>
Date:   Sat Dec 6 16:22:00 2014 -0500

    virt-install: Support --disk source_pool,source_volume
    
    For setting type=volume disks. This requires some reworking of
    devicedisk bits

Comment 3 Xiaodai Wang 2015-06-24 09:31:30 UTC
I can reproduce this bug with package:
virt-install-1.1.0-10.el7.noarch.rpm  
virt-manager-1.1.0-10.el7.noarch.rpm  
virt-manager-common-1.1.0-10.el7.noarch.rpm


Steps:
1. Prepare a guest with disk type volume.
# virsh dumpxml rhel6.5-test-iptables-off
...
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw'/>
      <source pool='default' volume='rhel6u7-snapshot1-spice.img'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
...

2. Set current working directory to home directory and clone this guest:
Scenario 1: via command
1.1. Clone the guest called "rhel6u7_spice" and auto generating a new name and disk clone path.
# virt-clone -o rhel6u7_spice --auto-clone

Scenario 2: via virt-manager
2.1. Launch virt-manager, click the guest and open. Then click "Virtual Machine"---> "Clone", a window called "Clone Virtual Machine" pop up.
2.2. Choose item "Storage" to "Details", then try to edit the New Path custom.


Result:
Scenario 1: via command
Failed to clone guest:
# virt-clone -o rhel6u7_spice --auto-clone
ERROR    Could not determine original disk information: Disk path '/root/rhel6u7-snapshot1-spice.img' does not exist.

Scenario 2: via virt-manager
After step2.2, failed to edit "New Path", cannot input path in window. (Detail see Screenshot)



Then try to verify with latest build:
virt-install-1.2.1-2.el7.noarch.rpm  
virt-manager-1.2.1-2.el7.noarch.rpm  
virt-manager-common-1.2.1-2.el7.noarch.rpm

Result:
Scenario 1: via command
# virt-clone -o rhel6u7_spice --auto-clone
Allocating 'rhel6u7-snapshot1-spice-clone.img'                                                                                                                                          | 6.0 GB  00:01:30     

Clone 'rhel6u7_spice-clone' created successfully.

Scenario 2: via virt-manager
The New Path can be edited (See the attachment for details)

According to the result above in the latest version of virt-manager, move this bug from ON_QA to VERIFIED.

Comment 4 Xiaodai Wang 2015-06-24 09:32:17 UTC
Created attachment 1042678 [details]
Change storage path dialogue

Comment 6 errata-xmlrpc 2015-11-19 05:22: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://rhn.redhat.com/errata/RHBA-2015-2206.html