Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 707261 - Vmware-tools will re-add the default network driver in /etc/modprobe.conf after conversion if ethX device entry missing
Vmware-tools will re-add the default network driver in /etc/modprobe.conf aft...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-v2v (Show other bugs)
6.1
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Matthew Booth
Virtualization Bugs
:
Depends On:
Blocks: 707472
  Show dependency treegraph
 
Reported: 2011-05-24 10:17 EDT by Hajime Taira
Modified: 2011-12-06 09:49 EST (History)
7 users (show)

See Also:
Fixed In Version: virt-v2v-0.8.3-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 707472 (view as bug list)
Environment:
Last Closed: 2011-12-06 09:49:32 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)
trace log file of libguestfs (325.49 KB, text/plain)
2011-05-24 10:17 EDT, Hajime Taira
no flags Details
The original modprobe.conf file in RHEL5 (318 bytes, text/plain)
2011-05-24 21:53 EDT, Hajime Taira
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1615 normal SHIPPED_LIVE Low: virt-v2v security and bug fix update 2011-12-05 19:51:05 EST

  None (edit)
Description Hajime Taira 2011-05-24 10:17:07 EDT
Created attachment 500613 [details]
trace log file of libguestfs

Description of problem:
I tried ESXi 4.1 to RHEL6.1 KVM migration.
But virt-v2v doesn't replace ethX device entry of /etc/modprobe.conf in RHEL5.5

Version-Release number of selected component (if applicable):
virt-v2v-0.7.1-3.el6.x86_64
augeas-libs-0.7.2-6.el6.x86_64
libguestfs-1.7.17-17.el6.x86_64
libvirt-0.8.7-18.el6.x86_64

How reproducible:
# virt-v2v -ic esx://esx.server.host/?no_verify=1 -op default --bridge br0 RHEL5
  
Actual results:
alias eth0 virtio_net
alias scsi_hostadapter virtio_blk

Expected results:
alias eth0 e1000
alias scsi_hostadapter virtio_blk
alias scsi_hostadapter1 virtio_blk
alias scsi_hostadapter2 virtio_blk

Additional info:
Attached trace log file of libguestfs
Comment 1 Hajime Taira 2011-05-24 10:19:03 EDT
Sorry, I had mistake.

--
Actual results:
alias eth0 e1000
alias scsi_hostadapter virtio_blk
alias scsi_hostadapter1 virtio_blk
alias scsi_hostadapter2 virtio_blk

Expected results:
alias eth0 virtio_net
alias scsi_hostadapter virtio_blk
Comment 3 Matthew Booth 2011-05-24 10:40:20 EDT
Hajime,

I suspect weirdness here relating to the uninstallation of vmware-tools. Could you please run the conversion again with LIBGUESTFS_TRACE=1, e.g.:

# LIBGUESTFS_TRACE=1 virt-v2v -ic esx://esx.server.host/?no_verify=1 -op default --bridge br0 RHEL5

and attach the full output to this BZ?

Could you also confirm whether the guest has vmware-tools installed and, if so, was it installed via RPM or tarball?

Thanks,

Matt
Comment 4 Hajime Taira 2011-05-24 21:52:19 EDT
> and attach the full output to this BZ?

Yes.
I captured log via following script.

file: conv.sh
#!/bin/bash
LIBGUESTFS_TRACE=1 virt-v2v -ic esx://10.208.81.5/?no_verify=1 -op default --bridge br0 RHEL5 2>&1 | tee -a virt-v2v-rhel5.log

> Could you also confirm whether the guest has vmware-tools installed and, if so,
> was it installed via RPM or tarball?

I installed VMware-Tools via tarball (It is provided by ISO image of VMware).

And I found a clue about this problem.
ethX device entry had missing in the original modprobe.conf file.
Comment 5 Hajime Taira 2011-05-24 21:53:19 EDT
Created attachment 500721 [details]
The original modprobe.conf file in RHEL5
Comment 6 Hajime Taira 2011-05-24 22:15:00 EDT
I tried to add entry 'alias eth0 vmxnet3' to original /etc/modprobe.conf file.
And I check new /etc/modprobe.conf file. It is following.

Actual results:
alias eth0 virtio_net
alias scsi_hostadapter virtio_blk
alias scsi_hostadapter1 virtio_blk
alias scsi_hostadapter2 virtio_blk

Please change title of this issue.
"virt-v2v added 'alias eth0 e1000' device entry to /etc/modprobe.conf in RHEL5.5, but host environment had virtio capability."
Comment 7 Matthew Booth 2011-08-10 09:18:45 EDT
To replicate this:

Install RHEL 5 on ESX
Install VMware tools from tarball
Edit /etc/modprobe.conf and remove the alias for eth0

After conversion, /etc/modprobe.conf will contain 'alias eth0 e1000' as reported above.
Comment 8 Matthew Booth 2011-08-10 09:54:00 EDT
This happens because of a combination of 2 things:

Firstly, vmware tools doesn't do anything intelligent when it uninstalls itself. It made a backup of /etc/modprobe.conf at the time it was installed, and copies this backup over /etc/modprobe.conf when it is uninstalled. No attempt is made to preserve changes to /etc/modprobe.conf in the intervening period. This is a bug in vmware tools.

Secondly, virt-v2v scans modprobe.conf during initial inspection. At this point, modprobe.conf doesn't contain an eth0 entry. virt-v2v later runs vmware-uninstall-tools.pl, which copies the backup modprobe.conf into place. modprobe.conf now does contain an eth0 entry, but virt-v2v only iterates over the list of entries it found originally, so ignores the new eth0 entry. This is also why eth0 is correctly updated if it isn't manually removed from modprobe.conf

A couple of things to note on this:

It's a real weird edge case. If you don't make this unusual manual alteration to modprobe.conf, you'll never hit it.

For some reason I don't understand, the guest continues to use virtio networking correctly anyway. This means that, apart from having an untidy entry in modprobe.conf, the bug has no impact.
Comment 11 Huang Wenlong 2011-08-28 23:05:44 EDT
Verify this bug in virt-v2v-0.8.3-4.el6


#  virt-v2v -ic esx://10.66.72.79/?no_verify=1 -os r6 -b breth0  esx4.1-rhel5.7-x86_64-wl-vmtools  
esx4.1-rhel5.7-x86_64-wl-test_esx4.1-rhel5.7-x86_64-wl-test: 100% [================================================================]D 0h10m13s
virt-v2v: esx4.1-rhel5.7-x86_64-wl-vmtools configured with virtio drivers.

In the guest after conversion 

#cat /etc/modprode.conf
alias eth0 virtio_net 
alias scsi_hostadapter virtio_blk
Comment 12 errata-xmlrpc 2011-12-06 09:49:32 EST
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.

http://rhn.redhat.com/errata/RHSA-2011-1615.html

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