Bug 617110 - v2v fail to check a domain defined or not during conversion,
v2v fail to check a domain defined or not during conversion,
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: virt-v2v (Show other bugs)
5.6
All Linux
low Severity medium
: rc
: ---
Assigned To: Matthew Booth
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-22 04:33 EDT by Mohua Li
Modified: 2013-04-30 19:14 EDT (History)
11 users (show)

See Also:
Fixed In Version: virt-v2v-0.6.3-1.el5
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 13:28:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log for convert the same guest again, (360.31 KB, text/plain)
2010-07-22 04:33 EDT, Mohua Li
no flags Details

  None (edit)
Description Mohua Li 2010-07-22 04:33:07 EDT
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):
virt-v2v-0.6.1-1.el5
libvirt-0.6.3-33.el5
libguestfs-1.2.7-1.el5.6


How reproducible:
always

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,

  
Actual results:
no any message to notify user define the domain fail  

Expected results:
give user warning for redefine the domain , or just give warning message, 

Additional info:
Comment 1 Mohua Li 2010-07-22 04:33:53 EDT
Created attachment 433633 [details]
log for convert the same guest again,
Comment 2 Mohua Li 2010-07-22 22:05:44 EDT
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,
Comment 4 RHEL Product and Program Management 2010-08-09 15:11:38 EDT
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.
Comment 5 RHEL Product and Program Management 2010-09-06 05:57:05 EDT
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.
Comment 6 RHEL Product and Program Management 2010-09-07 07:57:06 EDT
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.
Comment 7 Matthew Booth 2010-09-13 09:30:09 EDT
Posted here: http://www.redhat.com/archives/libguestfs/2010-September/msg00011.html
Comment 9 Mohua Li 2010-10-08 04:52:46 EDT
i saw there is warning say "the domain already exist", but why we copy the image to the pool again, any reason for this?
Comment 10 Matthew Booth 2010-10-11 04:44:21 EDT
(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.
Comment 11 Mohua Li 2010-10-11 06:57:50 EDT
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,
Comment 12 Matthew Booth 2010-10-11 07:11:43 EDT
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,

Why?

> 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.
Comment 13 Mohua Li 2010-10-11 07:54:25 EDT
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,
Comment 14 Florian Nadge 2011-01-12 12:26:09 EST
    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.
    
    New Contents:
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.
Comment 16 errata-xmlrpc 2011-01-13 13:28:45 EST
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.

http://rhn.redhat.com/errata/RHBA-2011-0147.html

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