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 1177210 - "Use --force to override" should not in the warning for virt-clone since "--force" option isn't available for virt-clone
Summary: "Use --force to override" should not in the warning for virt-clone since "--f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.1
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: 2014-12-25 06:51 UTC by zhoujunqin
Modified: 2015-11-19 05:23 UTC (History)
5 users (show)

Fixed In Version: virt-manager-1.2.0-1-el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:23:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2206 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2015-11-19 08:17:29 UTC

Description zhoujunqin 2014-12-25 06:51:47 UTC
Description of problem:
"Use --force to override" should not in the warning for virt-clone since "--force" option isn't available for virt-clone

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 health guest.
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     kvm-rhel6.6-i386-raw           shut off

2. Use virt-clone to clone this guest.
# virt-clone -o kvm-rhel6.6-i386-raw -n kvm-rhel6.6-i386-raw-clone -f /var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone
Allocating 'kvm-rhel6.6-i386-raw-clone'                                                                                                                                                     | 6.0 GB  00:01:47    

Clone 'kvm-rhel6.6-i386-raw-clone' created successfully.

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     kvm-rhel6.6-i386-raw           shut off
 -     kvm-rhel6.6-i386-raw-clone     shut off

3. Undefine new guest.
# virsh undefine kvm-rhel6.6-i386-raw-clone
Domain kvm-rhel6.6-i386-raw-clone has been undefined

# ls /var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone
/var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone

4. Repeat step2 again with same disk file.
# virt-clone -o kvm-rhel6.6-i386-raw -n kvm-rhel6.6-i386-raw-clone -f /var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone
ERROR    This will overwrite the existing path '/var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone' (Use --force to override)

# virt-clone -o kvm-rhel6.6-i386-raw -n kvm-rhel6.6-i386-raw-clone -f /var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone  --force
WARNING  This will overwrite the existing path '/var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone'
ERROR    Clone onto existing storage volume is not currently supported: '/var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone'

5. Remove existing disk image and repeat step2 with "--force" option.

# rm -rf kvm-rhel6.6-i386-raw-clone

# virt-clone -o kvm-rhel6.6-i386-raw -n kvm-rhel6.6-i386-raw-clone -f /var/lib/libvirt/images/kvm-rhel6.6-i386-raw-clone --force
Allocating 'kvm-rhel6.6-i386-raw-clone'                                                                                                                                                     | 6.0 GB  00:02:10     

Clone 'kvm-rhel6.6-i386-raw-clone' created successfully.


Actual results:
There is no --force in both virt-clone help and manual,I didn't find any patch to remove this option.
1. After step4, when clone a guest to an existing disk, it will report warning message:
"Use --force to override"

2. After step5, clone guest finished successfully and with no warning message.

Expected results:
If "force" option is not supported by rhel7, please improve warning message.
If it is supported always, please add it to virt-clone manual and help and fix function.

Additional info:

Comment 1 Pavel Hrdina 2015-06-19 12:55:59 UTC
Upstream commit:

commit 93f826a8b2ca21e9cb91a870acef1c37f43dfda3
Author: Cole Robinson <crobinso>
Date:   Sat Apr 11 19:25:46 2015 -0400

    cli: Replace add --check option (bz 1063471)
    
    For fine grained enabling/disabling validation checks. Use this to
    replace the heavy handed --force option.

Comment 2 Xiaodai Wang 2015-06-25 03:41:34 UTC
I can reproduce this bug with package:
virt-manager-1.1.0-13.el7.noarch

Steps:
1. Prepare a health guest.
# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     vm1                            shut off

2. Use virt-clone to clone this guest.
# virt-clone -o vm1 -n vm1-clone -f /var/lib/libvirt/images/vm1-clone

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     vm1                            shut off
 -     vm1-clone                      shut off

3. Undefine new guest.
# virsh undefine vm1-clone
Domain vm1-clone has been undefined

# ls /var/lib/libvirt/images/vm1-clone 
/var/lib/libvirt/images/vm1-clone

4. Repeat step2 again with same disk file.
# virt-clone -o vm1 -n vm1-clone -f /var/lib/libvirt/images/vm1-clone
ERROR    This will overwrite the existing path '/var/lib/libvirt/images/vm1-clone' (Use --force to override)


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


Result:
# virt-clone -o vm1 -n vm1-clone -f /var/lib/libvirt/images/vm1-clone
ERROR    This will overwrite the existing path '/var/lib/libvirt/images/vm1-clone' (Use --check path_exists=off or --check all=off to override)

# virt-clone -o vm1 -n vm1-clone -f /var/lib/libvirt/images/vm1-clone --check path_exists=off
WARNING  This will overwrite the existing path '/var/lib/libvirt/images/vm1-clone'
ERROR    Clone onto existing storage volume is not currently supported: '/var/lib/libvirt/images/vm1-clone'

# virt-clone -o vm1 -n vm1-clone -f /var/lib/libvirt/images/vm1-clone --check all=off
WARNING  This will overwrite the existing path '/var/lib/libvirt/images/vm1-clone'
ERROR    Clone onto existing storage volume is not currently supported: '/var/lib/libvirt/images/vm1-clone'

According about info, This bus is fixed.

Comment 4 Xiaodai Wang 2015-07-09 02:24:50 UTC
Move the bug to VERIFIED based on #comment 2.

Comment 6 errata-xmlrpc 2015-11-19 05:23:12 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


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