Bug 889082 - [RFE] virt-v2v should check whether guest with same name exist on target first then transfer the disk
Summary: [RFE] virt-v2v should check whether guest with same name exist on target firs...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
Whiteboard: V2V
Depends On:
Blocks: 1205796 1250961 1257030
TreeView+ depends on / blocked
Reported: 2012-12-20 07:45 UTC by tingting zheng
Modified: 2015-11-19 06:56 UTC (History)
9 users (show)

Fixed In Version: libguestfs-1.28.1-1.35.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1257030 (view as bug list)
Last Closed: 2015-11-19 06:56:45 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2183 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-11-19 08:18:42 UTC

Description tingting zheng 2012-12-20 07:45:12 UTC
Description of problem:
[RFE]virt-p2v should check whether guest with same name exist on target first then transfer the disk

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Use virt-p2v to convert a physical machine,on the virt-p2v client GUI,type the guest name which already exists on target host.

2.Click convert.The conversion will begin,after spending a lot of time to transfer the whole disk,error shows:virt-v2v: libvirt error code: 9, message: operation failed: domain 'demo-test' already exists with uuid 40bf1863-1740-539c-88df-032a62cef740

3.Use virt-v2v to convert a guest with the name which already exists on target,it checks the target and quits instead of transferring the disk.
# virt-v2v -ic qemu+ssh:// -os default -b br0 test
root@'s password: 
virt-v2v: Domain test already exists on the target.

Actual results:
As steps describe.

Expected results:
virt-p2v works as virt-v2v,check whether guest with same name exist on target first then transfer the disk.

Additional info:

Comment 1 Matthew Booth 2012-12-21 12:44:37 UTC
Yup. virt-v2v does this, virt-p2v should do it too.

Comment 2 RHEL Program Management 2013-10-14 04:29:27 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Richard W.M. Jones 2015-05-05 14:45:05 UTC
Although the bug mentions virt-p2v, in fact it's the job of
virt-v2v to check on the target for the guest with the same
name.  (virt-p2v uses virt-v2v, so hopefully that will solve
the problem for virt-v2v too.)

I have adjusted the summary accordingly.

Comment 6 Richard W.M. Jones 2015-05-05 18:07:31 UTC
Patch posted:

Comment 7 Richard W.M. Jones 2015-05-06 17:07:42 UTC
Upstream commits:


Comment 9 Richard W.M. Jones 2015-05-12 21:23:22 UTC
This fix introduced a memory leak.  The memory leak is fixed by:

Comment 11 tingting zheng 2015-06-18 06:14:40 UTC
Tested with:

1.Make sure on my host,there is guest named "esx6.0-win2008-x86_64" exist.
# virsh list --all
 Id    Name                           State
 36    win7-vcenter                   running
 -     esx6.0-win2008-i386            shut off
 -     esx6.0-win2008-x86_64          shut off
 -     p2v-network-test               shut off
 -     rhel6.7-x64                    shut off
 -     rhel7.1-x64                    shut off

2.Use virt-v2v to convert guest which already exist on the host.
# virt-v2v -ic vpx://root@ -os default -b virbr0  --password-file /tmp/passwd2 esx6.0-win2008-x86_64
[   0.0] Opening the source -i libvirt -ic vpx://root@ esx6.0-win2008-x86_64
[   1.0] Creating an overlay to protect the source from being modified
[   2.0] Opening the overlay
[  14.0] Initializing the target -o libvirt -os default
virt-v2v: error: a libvirt domain called 'esx6.0-win2008-x86_64' already 
exists on the target.

If using virt-v2v directly, use the '-on' option to select a different 
name. If using virt-p2v, select a different 'Name' in the 'Target 
properties'. Or delete the existing domain on the target using the 'virsh 
undefine' command.

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

There is error about guest already exists on the target before conversion.

Tried about virt-p2v,the similar error showed and conversion didn't start.

Refer to the above comments,move the bug to VERIFIED.

Comment 13 errata-xmlrpc 2015-11-19 06:56:45 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.


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