Bug 1262299

Summary: Fail in setting network-name of RHEL5 VM converted with virt-v2v from vmware to rhev
Product: Red Hat Enterprise Linux 7 Reporter: Andrea Perotti <aperotti>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: aperotti, ptoscano
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-11 15:46:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshot presenting the failed network associtation between network card and network name
none
virt-v2v debug output none

Description Andrea Perotti 2015-09-11 11:19:06 UTC
Created attachment 1072537 [details]
Screenshot presenting the failed network associtation between network card and network name

Description of problem:
When importing a rhel5.11 VM into RHEV via VM import from Import/Export storage domain, after the convertion from vmware vCenter 5.5 to RHEV 3.5.1.1-0.1 with this virt-v2v command:

# virt-v2v -v -x -ic 'vpx://ADLISPA%5Crhev-v2v@vcenter-svil/DATACENTER-SVILUPPO/LISPA-SVILUPPO/esxi-01-svil.adlispa.local?no_verify=1'  --dcpath 'DATACENTER-SVILUPPO' --password-file /root/.secret V2V-RHEL5  -o rhev -os 10.219.72.8:/vol/L_TA_RHEV_IMP_EXP_vol --network rhevm

the host network name is wrong (eth0 instead of the specified rhevm) and the end result is that the VM has no network associated with eth0.


Version-Release number of selected component (if applicable):
libguestfs-1.28.1-1.53.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. convert a rhel5 VM from vmware to rhev via virt-v2v specifying the rhevm as destination network
2. from import/export storage domain select the VM and choose import
3. check the network tab

Actual results:
the network name is set to be eth0

Expected results:
the network name is set to be rhevm

Additional info:

Comment 2 Richard W.M. Jones 2015-09-11 11:32:37 UTC
I need the virt-v2v -v -x output, in full.  It's impossible to
debug otherwise.

Comment 3 Andrea Perotti 2015-09-11 13:11:02 UTC
Created attachment 1072555 [details]
virt-v2v debug output

Comment 4 Richard W.M. Jones 2015-09-11 14:48:46 UTC
The reason is because the <interface> in the source guest
is a bridge, not a network:

    <interface type='bridge'>
      <mac address='00:50:56:98:45:17'/>
      <source bridge=''/>
      <model type='e1000'/>
    </interface>

I think it would work if you add `--bridge rhevm' to the
command line.  (You can omit `--network rhevm', or leave it
there, since there are no networks so that option is being
ignored).

Comment 5 Richard W.M. Jones 2015-09-11 14:49:48 UTC
BTW the --print-source option is helpful in these situations, as
described in the manual:

http://libguestfs.org/virt-v2v.1.html#networks-and-bridges

Comment 6 Andrea Perotti 2015-09-11 15:46:06 UTC
Hi,
   thanks for the clarification, with --bridge the import completed without any problem