Bug 1155150 - virt-v2v fails to uninstall vmware drivers: vmware-tools-foundation >= 0:9.4.0 is needed by (installed) vmware-tools-libraries-nox-0:9.4.0-1.el6.x86_64
Summary: virt-v2v fails to uninstall vmware drivers: vmware-tools-foundation >= 0:9.4....
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On: 1155610 1218766 1359086
Blocks: 1401400 1288337
TreeView+ depends on / blocked
 
Reported: 2014-10-21 12:58 UTC by Marko Myllynen
Modified: 2017-08-01 22:08 UTC (History)
13 users (show)

Fixed In Version: libguestfs-1.36.1-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: virt-v2v did not attempt to uninstall VMware tools packages from Linux guests when migrating them. Consequence: VMware tools packages left installed on a Linux guests. Fix: virt-v2v now uninstalls VMware tools packages when migrating Linux guests. Result: VMware tools packages are no more installed in Linux guests migrated by virt-v2v.
Clone Of:
: 1155610 (view as bug list)
Environment:
Last Closed: 2017-08-01 22:08:55 UTC


Attachments (Terms of Use)
juzhou-bug1155150-ver.log (1.00 MB, text/plain)
2016-07-13 10:30 UTC, zhoujunqin
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2023 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2017-08-01 19:32:01 UTC

Description Marko Myllynen 2014-10-21 12:58:34 UTC
Description of problem:
After virt-v2v started working for gzipped images, I hit another problem with the OVA image used at the customer I'm working with, a quick glance gives me an impression it's something vmtools related, nothing to do with the image format anymore.

Will attach the complete output from the customer environment.

Comment 3 Richard W.M. Jones 2014-10-22 12:53:28 UTC
Marko, can you run the following command in the guest and
let me know the output:

$ rpm -q --provides vmware-tools-libraries-x

Comment 4 Richard W.M. Jones 2014-10-22 12:55:24 UTC
Actually forget that, I was able to find the RPM online and
ran the same command myself.  The output is:

vmware-tools-libraries-x = 0:9.4.0-1.el6

Comment 5 Richard W.M. Jones 2014-10-22 13:08:45 UTC
Since we're over the wire on development, and I don't have a
way to test changes in this area, I'm going to disable the
feature where we remove VMware drivers from Linux (it's already
disabled on Windows for other reasons) in RHEL 7.1, and leave
fixing this proprly to RHEL >= 7.2.

Comment 8 Richard W.M. Jones 2015-09-23 14:20:47 UTC
Possibly fixed by
https://github.com/libguestfs/libguestfs/commit/1b856a20bae3b3322e66bb74b60e4b360112dad5
but not verified yet.

Comment 10 Richard W.M. Jones 2016-06-22 12:57:53 UTC
The commit mentioned in comment 8 is the closest we have to a fix.
It is included in libguestfs >= 1.31.7 so we got it in the rebase already.

Comment 14 zhoujunqin 2016-07-13 10:25:58 UTC
Hi rjones,
I try to reproduce this issue with build:
libguestfs-1.28.1-1.55.el7_2.4.x86_64
virt-v2v-1.28.1-1.55.el7_2.4.x86_64

Steps:
1. Prepare a virtual machine with vmware-tools installed.
Guest with vmware-tools installing version:
vmware-tools-libraries-x-8.6.17-1.el6.x86_64

2. Convert such virtual machine from VMware vCenter server to local libvirt.
# virt-v2v -ic vpx://root@10.66.145.47/data/10.66.144.40/?no_verify=1  juzhou-bug1155150  -of raw --password-file /tmp/passwd -on juzhou-bug1155150-rep
[   0.0] Opening the source -i libvirt -ic vpx://root@10.66.145.47/data/10.66.144.40/?no_verify=1 juzhou-bug1155150
[   0.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[  43.0] Initializing the target -o libvirt -os default
[  43.0] Inspecting the overlay
[ 114.0] Checking for sufficient free disk space in the guest
[ 114.0] Estimating space required on target for each disk
[ 114.0] Converting Red Hat Enterprise Linux Server release 6.7 Beta (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 519.0] Mapping filesystem data to avoid copying unused and blank areas
[ 520.0] Closing the overlay
[ 520.0] Checking if the guest needs BIOS or UEFI to boot
[ 520.0] Copying disk 1/1 to /var/lib/libvirt/images/juzhou-bug1155150-rep-sda (raw)
    (100.00/100%)
[1097.0] Creating output metadata
Pool default refreshed

Domain juzhou-bug1155150-rep defined from /tmp/v2vlibvirte72dd6.xml

[1097.0] Finishing off

Result:
1. Conversion finished with no error.
2. After virtual machine boot up, check package vmware-tools-libraries-x keeps.


Then try to verify with build:
libvirt-2.0.0-2.el7.x86_64
libguestfs-1.32.6-1.el7.x86_64
virt-v2v-1.32.6-1.el7.x86_64

Steps:

# virt-v2v -ic vpx://root@10.66.145.47/data/10.66.144.40/?no_verify=1  juzhou-bug1155150  -of raw --password-file /tmp/passwd -on juzhou-bug1155150-ver
[   0.0] Opening the source -i libvirt -ic vpx://root@10.66.145.47/data/10.66.144.40/?no_verify=1 juzhou-bug1155150
[   0.8] Creating an overlay to protect the source from being modified
[   1.3] Initializing the target -o libvirt -os default
[   1.3] Opening the overlay
[  26.3] Inspecting the overlay
[  97.7] Checking for sufficient free disk space in the guest
[  97.7] Estimating space required on target for each disk
[  97.7] Converting Red Hat Enterprise Linux Server release 6.7 Beta (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 505.6] Mapping filesystem data to avoid copying unused and blank areas
[ 506.2] Closing the overlay
[ 506.3] Checking if the guest needs BIOS or UEFI to boot
[ 506.3] Assigning disks to buses
[ 506.3] Copying disk 1/1 to /var/lib/libvirt/images/juzhou-bug1155150-ver-sda (raw)
    (100.00/100%)
[1147.3] Creating output metadata
Pool default refreshed

Domain juzhou-bug1155150-ver defined from /tmp/v2vlibvirt637138.xml

[1147.5] Finishing off

Result:
1. Conversion finished with no error.
2. After virtual machine boot up, check package vmware-tools-libraries-x keeps.
# rpm -qa |grep vmware
vmware-tools-libraries-nox-8.6.17-1.el6.x86_64
xorg-x11-drv-vmware-13.0.1-9.el6.x86_64
vmware-tools-libraries-x-8.6.17-1.el6.x86_64

so rjones, the result i get is different as you told me(should remove the vmware-tools packages installed in the guest), please have a look, thanks.

And i will attach debug log: juzhou-bug1155150-ver.log

Comment 15 zhoujunqin 2016-07-13 10:30:56 UTC
Created attachment 1179208 [details]
juzhou-bug1155150-ver.log

Comment 16 Richard W.M. Jones 2016-07-18 09:08:51 UTC
It turns out that we are still carrying a patch that
completely disables VMware unconfiguration.

I will remove that patch and do another build shortly.

Comment 22 Pino Toscano 2016-10-04 13:35:30 UTC
https://github.com/libguestfs/libguestfs/commit/be8ad60b8ecac51037ba2815c0675e3cac5edaa1
in libguestfs >= 1.35.7 can possibly help.

Comment 29 kuwei@redhat.com 2017-03-08 08:37:38 UTC
Verify it with scratch builds :
virt-v2v-1.36.1-1.el7.x86_64
libguestfs-1.36.1-1.el7.x86_64

Steps:

1: Convert a rhel6.8 guest with (which has installed) vmware tools from ESX server# virt-v2v -ic vpx://root@10.73.75.182/data/10.73.72.61/?no_verify=1 rhel6U8-vmware-tools --password-file /tmp/passwd
[   0.0] Opening the source -i libvirt -ic vpx://root@10.73.75.182/data/10.73.72.61/?no_verify=1 rhel6U8-vmware-tools
[   1.2] Creating an overlay to protect the source from being modified
[   1.8] Initializing the target -o libvirt -os default
[   1.8] Opening the overlay
[  16.3] Inspecting the overlay
[ 104.0] Checking for sufficient free disk space in the guest
[ 104.0] Estimating space required on target for each disk
[ 104.0] Converting Red Hat Enterprise Linux Server release 6.8 (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 843.0] Mapping filesystem data to avoid copying unused and blank areas
[ 844.1] Closing the overlay
[ 844.6] Checking if the guest needs BIOS or UEFI to boot
[ 844.6] Assigning disks to buses
[ 844.6] Copying disk 1/1 to /var/lib/libvirt/images/rhel6U8-vmware-tools-sda (raw)
    (100.00/100%)
[1107.0] Creating output metadata
Pool default refreshed

Domain rhel6U8-vmware-tools defined from /tmp/v2vlibvirtbbd264.xml

[1107.6] Finishing off


2: After virtual machine boot up, there is no vmware-tool packages installed in guest

According to above verify result, the bug has been fixed

So move this bug from ON_QA to VERIFIED

Comment 30 errata-xmlrpc 2017-08-01 22:08:55 UTC
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.

https://access.redhat.com/errata/RHBA-2017:2023


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