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):
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://10.66.6.128/system -os default -b br0 test
virt-v2v: Domain test already exists on the target.
As steps describe.
virt-p2v works as virt-v2v,check whether guest with same name exist on target first then transfer the disk.
Yup. virt-v2v does this, virt-p2v should do it too.
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.
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.
This fix introduced a memory leak. The memory leak is fixed by:
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://email@example.com/data/10.66.72.49/?no_verify=1 -os default -b virbr0 --password-file /tmp/passwd2 esx6.0-win2008-x86_64
[ 0.0] Opening the source -i libvirt -ic vpx://firstname.lastname@example.org/data/10.66.72.49/?no_verify=1 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
If reporting bugs, run virt-v2v with debugging enabled and include the
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.
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.