Description of problem:
v2v will check the if the same volume exist on the pool, and will give warning message if already the same volume on the pool, but it won't check if the same domain already defined on the libvirt pool, although it try to define the domain fail as there already exist
a same domain, it won't give any information, like, there is already a domain converted to the test pool, try to convert it to the xen pool again,
[root@dhcp-93-233 ~]# virsh pool-list
Name State Autostart
test active no
xen active no
[root@dhcp-93-233 ~]# virsh list --all
Id Name State
- ESX3.5-RHEL5.4-x86_64 shut off
- rhel3u9-32b-hv-raw-intel shut off
- rhel5u4-32b-pv-raw-intel shut off
convert the rhel5u4-32b-pv-raw-intel to xen pool, we won't met any warning or error message,detail pls see the attachment of the conversion log,
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1,convert the guest to xen pool,
2,virsh list --all, check the defined domain,
3,convert the same guest to test pool again,
no any message to notify user define the domain fail
give user warning for redefine the domain , or just give warning message,
Created attachment 433633 [details]
log for convert the same guest again,
i think this bug need to be fixed, as if the same domain name exist, the guest will fail to start as didn't replace the defined domain with the new domain xml file, and also we didn't get any error message in the second conversion, so it will confuse the user much,
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Posted here: http://www.redhat.com/archives/libguestfs/2010-September/msg00011.html
i saw there is warning say "the domain already exist", but why we copy the image to the pool again, any reason for this?
(In reply to comment #9)
> i saw there is warning say "the domain already exist", but why we copy the
> image to the pool again, any reason for this?
Can you provide example output? Checking the code, I'm pretty sure it does the existence check *before* copying storage, so this shouldn't happen.
it should be like this,
domain exist, but the image path is different, not the pool we define, like the pool is created on /var/lib/libvirt/images/v2v, but the image path of the existed domain is refer to /home/v2v/,
so it will copy again, but the image copied to the pool is invalid, user will try to undefine the domain, and run again, but it will met another warning say " the image is exist, won't copy it again", i don't see why we need to make things so strange to the user,
I'm not sure I'm following you here.
(In reply to comment #11)
> it should be like this,
> domain exist, but the image path is different, not the pool we define, like the
> pool is created on /var/lib/libvirt/images/v2v, but the image path of the
> existed domain is refer to /home/v2v/,
> so it will copy again,
It won't now copy it again, because it will check that the target domain already exists (which it does) and refuse to overwrite it.
> but the image copied to the pool is invalid,
> user will
> try to undefine the domain, and run again, but it will met another warning say
> " the image is exist, won't copy it again", i don't see why we need to make
> things so strange to the user,
With the fix for this bug, virt-v2v simply won't overwrite the domain. This means it will never copy the storage, and will never get the message about overwriting existing storage volumes.
you are right,
retest with following steps,
1,converted to the pool first,
2,converted to the same pool again, it will say the "domain exist", won't copy the storage again,
3,converted to different pool again, say " domain exist", won't copy again,
so set to verified,
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
Previously, virt-v2v did not check if the new domain was already defined and overwrote an existing domain without warning when converting a guest to run on libvirt. This update generates an error if the new domain already exists.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.