RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1481930 - [RFE] v2v: uninstall VMware tools that were installed from tarball
Summary: [RFE] v2v: uninstall VMware tools that were installed from tarball
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.4
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
Jiri Herrmann
URL:
Whiteboard: V2V
Depends On: 1621895
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-16 05:21 UTC by mxie@redhat.com
Modified: 2019-08-06 12:44 UTC (History)
10 users (show)

Fixed In Version: libguestfs-1.40.1-1.el7
Doc Type: Enhancement
Doc Text:
.`virt-v2v` removes VMware Tools more reliably This update makes it more likely that the `virt-v2v` utility automatically attempts to remove VMware Tools software from a VMware virtual machine that `virt-v2v` is converting to KVM. Notably, `virt-v2v` now attempts to remove VMWare Tools in the following scenarios: * When converting Windows virtual machines. * When VMMware Tools were installed on a Linux virtual machine from a tarball. * When WMware Tools were installed as _open-vm-tools_.
Clone Of:
Environment:
Last Closed: 2019-08-06 12:44:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
before-ubuntu-vmware-tool (151.57 KB, image/png)
2017-08-16 05:21 UTC, mxie@redhat.com
no flags Details
after-ubuntu-vmware-tool (31.80 KB, image/png)
2017-08-16 05:21 UTC, mxie@redhat.com
no flags Details
before-debian-vmware-tool (100.83 KB, image/png)
2017-08-16 05:22 UTC, mxie@redhat.com
no flags Details
after-debian-vmware-tool (140.73 KB, image/png)
2017-08-16 05:23 UTC, mxie@redhat.com
no flags Details
virt-v2v-ubuntu-vmware-tool.log (1.85 MB, text/plain)
2017-08-16 05:23 UTC, mxie@redhat.com
no flags Details
virt-v2v-debian-vmware-tools.log (1.85 MB, text/plain)
2017-08-16 05:24 UTC, mxie@redhat.com
no flags Details
v2v-ubuntu-debian-vmware-tool-1.36.3-6.el7_4.2.png (158.45 KB, image/png)
2017-08-17 07:23 UTC, mxie@redhat.com
no flags Details
v2v-ubuntu-vmware-tool-1.36.3-6.el7_4.2.log (1.85 MB, text/plain)
2017-08-17 07:24 UTC, mxie@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1465849 0 high CLOSED v2v hangs on removing vmware-tool 2024-03-25 15:00:31 UTC
Red Hat Bugzilla 1477905 0 high CLOSED Disable uninstallation of VMware tools (again) 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHEA-2019:2096 0 None None None 2019-08-06 12:44:35 UTC

Internal Links: 1465849 1477905

Description mxie@redhat.com 2017-08-16 05:21:13 UTC
Created attachment 1313935 [details]
before-ubuntu-vmware-tool

Description of problem:
Can't uninstall vmware tools for ubuntu and debian guest during virt-v2v conversion

Version-Release number of selected component (if applicable):
virt-v2v-1.36.3-6.el7_4.3.x86_64
libguestfs-1.36.3-6.el7_4.3.x86_64
libvirt-3.2.0-14.el7_4.2.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.3.x86_64
kernel-3.10.0-693.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

For ubuntu guest:

1.Remove open-vm-tools package and then install vmware tools in ubuntu guest on vsphere clinet, vmware tools service will be running in guest after rebooting guest, pls refer to screenshot "before-ubuntu-vmware-tool.png"  

2.Convert guest from vmware to rhv by virt-v2v and there is no error about vmware tool during conversion
# virt-v2v -ic vpx://root.75.182/data/10.73.72.61/?no_verify=1 esx6.0-ubuntu16.04-x86_64 --password-file /tmp/passwd -o rhv -os 10.73.131.93:/home/nfs_export
[   0.0] Opening the source -i libvirt -ic vpx://root.75.182/data/10.73.72.61/?no_verify=1 esx6.0-ubuntu16.04-x86_64
[   2.0] Creating an overlay to protect the source from being modified
[   2.8] Initializing the target -o rhv -os 10.73.131.93:/home/nfs_export
[   2.9] Opening the overlay
[  16.3] Inspecting the overlay
[  27.1] Checking for sufficient free disk space in the guest
[  27.1] Estimating space required on target for each disk
[  27.1] Converting Ubuntu 16.04.1 LTS to run on KVM
virt-v2v: warning: could not determine a way to update the configuration of 
Grub2
virt-v2v: This guest has virtio drivers installed.
[ 542.0] Mapping filesystem data to avoid copying unused and blank areas
[ 551.7] Closing the overlay
[ 551.9] Checking if the guest needs BIOS or UEFI to boot
[ 551.9] Assigning disks to buses
[ 551.9] Copying disk 1/1 to /tmp/v2v.wPGFhn/bdf9c90b-e6f0-439c-aa9f-6305fd5fad7e/images/0213e80a-2b98-487d-9e21-559c0ca2356a/d2414767-d16c-4ca3-a530-bb825f63e53e (raw)
    (100.00/100%)
[2627.9] Creating output metadata
[2628.0] Finishing off


3. After finishing v2v conversion,import guest from export domain to data domain and power on guest at rhv, found vmware tools service is still running in ubuntu guest,pls refer to screenshot "after-ubuntu-vmware-tool.png" and "virt-v2v-ubuntu-vmware-tool.log"



For debian guest:

1 Install vmware tools in debian guest on vsphere clinet, then vmware tools service will be running in guest after rebooting guest, pls refer to screenshot "before-debian-vmware-tool.png"  

2 Convert guest from vmware to rhv by virt-v2v and there is no error about vmware tools during conversion
# virt-v2v -ic vpx://root.75.182/data/10.73.72.75/?no_verify=1 esx5.1-debian8.7.1-x86_64 --password-file /tmp/passwd -o rhv -os 10.73.131.93:/home/nfs_export
[   0.0] Opening the source -i libvirt -ic vpx://root.75.182/data/10.73.72.75/?no_verify=1 esx5.1-debian8.7.1-x86_64
[   1.2] Creating an overlay to protect the source from being modified
[   1.7] Initializing the target -o rhv -os 10.73.131.93:/home/nfs_export
[   1.9] Opening the overlay
[  10.4] Inspecting the overlay
[  19.0] Checking for sufficient free disk space in the guest
[  19.0] Estimating space required on target for each disk
[  19.0] Converting 8.7 to run on KVM
virt-v2v: warning: could not determine a way to update the configuration of 
Grub2
virt-v2v: This guest has virtio drivers installed.
[ 238.5] Mapping filesystem data to avoid copying unused and blank areas
[ 240.2] Closing the overlay
[ 240.5] Checking if the guest needs BIOS or UEFI to boot
[ 240.5] Assigning disks to buses
[ 240.5] Copying disk 1/1 to /tmp/v2v.UZn8LX/bdf9c90b-e6f0-439c-aa9f-6305fd5fad7e/images/4cc030be-a338-4da7-bb63-97bf8af24548/13281456-abd8-4ef7-9584-df285656f7dc (raw)
    (100.00/100%)
[2939.2] Creating output metadata
[2939.3] Finishing off


3 After finishing conversion, import guest from export domain to data domain and power on guest,found vmware tools service is still running in debian guest,pls refer to screenshot "after-debian-vmware-tool.png" and  "virt-v2v-debian-vmware-tools.log"



Actual results:
VMware tools service can't be stopped for ubuntu and debian guest after virt-v2v conversion

Expected results:
Can uninstall vmware tools for ubuntu and debian guest during virt-v2v conversion

Additional info:

Comment 2 mxie@redhat.com 2017-08-16 05:21:57 UTC
Created attachment 1313936 [details]
after-ubuntu-vmware-tool

Comment 3 mxie@redhat.com 2017-08-16 05:22:30 UTC
Created attachment 1313937 [details]
before-debian-vmware-tool

Comment 4 mxie@redhat.com 2017-08-16 05:23:00 UTC
Created attachment 1313938 [details]
after-debian-vmware-tool

Comment 5 mxie@redhat.com 2017-08-16 05:23:33 UTC
Created attachment 1313939 [details]
virt-v2v-ubuntu-vmware-tool.log

Comment 6 mxie@redhat.com 2017-08-16 05:24:08 UTC
Created attachment 1313940 [details]
virt-v2v-debian-vmware-tools.log

Comment 7 Richard W.M. Jones 2017-08-16 07:57:38 UTC
Is this after we disabled uninstallation of VMware tools
(https://bugzilla.redhat.com/show_bug.cgi?id=1477905)?

Comment 8 Pino Toscano 2017-08-16 08:11:45 UTC
(In reply to Richard W.M. Jones from comment #7)
> Is this after we disabled uninstallation of VMware tools
> (https://bugzilla.redhat.com/show_bug.cgi?id=1477905)?

No, this is unrelated.  The code (even in the old v2v) does not know about the names of VMware tools packages on Debian/Ubuntu systems.

Comment 9 Pino Toscano 2017-08-16 10:45:06 UTC
(In reply to Pino Toscano from comment #8)
> (In reply to Richard W.M. Jones from comment #7)
> > Is this after we disabled uninstallation of VMware tools
> > (https://bugzilla.redhat.com/show_bug.cgi?id=1477905)?
> 
> No, this is unrelated.  The code (even in the old v2v) does not know about
> the names of VMware tools packages on Debian/Ubuntu systems.

Uh sorry, I stand corrected: both the guests have VMware tools installed manually (and thus with /usr/bin/vmware-uninstall-tools.pl).  I am sure I saw open-vm-tools installed in one of the guests...

Ming, can you please try to reproduce this with virt-v2v-1.36.3-6.el7_4.2.x86_64?

Comment 10 mxie@redhat.com 2017-08-17 07:23:29 UTC
Hi Pino,
   
   VMware tools service can be stopped for ubuntu and debian guest after virt-v2v conversion with 1.36.3-6.el7_4.2.x86_64 builds, pls refer to screenshot"v2v-ubuntu-debian-vmware-tool-1.36.3-6.el7_4.2.png" and "v2v-ubuntu-vmware-tools-1.36.3-6.el7_4.2.log"

Comment 11 mxie@redhat.com 2017-08-17 07:23:57 UTC
Created attachment 1314580 [details]
v2v-ubuntu-debian-vmware-tool-1.36.3-6.el7_4.2.png

Comment 12 mxie@redhat.com 2017-08-17 07:24:40 UTC
Created attachment 1314581 [details]
v2v-ubuntu-vmware-tool-1.36.3-6.el7_4.2.log

Comment 13 Pino Toscano 2017-08-22 06:52:12 UTC
OK -- thanks for testing.

This is the consequence of bug 1480623, needed because of issues like bug 1465849.  I'm retitling it to be more generic, since it is valid for any kind of Linux guest (not just Debian and Ubuntu) that has VMware tools installed manually.

Comment 15 Pino Toscano 2018-12-13 15:30:02 UTC
A couple of months ago I sent this upstream series:
https://www.redhat.com/archives/libguestfs/2018-October/msg00044.html
In particular, patch #2 deals with the uninstallation of VMware tools from tarball:
https://www.redhat.com/archives/libguestfs/2018-October/msg00046.html
the approach chosen works around the behaviour of the vmware-uninstall-tools.pl script, making sure that it does not do more work than needed, and thus it should not take long anymore.

This was implemented as commit 04a157d0f8529e8bf6a5bc0ac4ee146aaedc3c15, which is included in libguestfs >= v1.39.12.

With this fix, hopefully we can drop the local patch to disable the installation of VMware tools from tarball, added because of bug 1465849.

Comment 16 Pino Toscano 2019-01-17 11:55:30 UTC
This bug will be fixed by the rebase scheduled for RHEL 7.7, see bug 1621895.

Comment 18 zhoujunqin 2019-03-27 09:43:13 UTC
Testing this bug with new build:
libvirt-4.5.0-10.el7.x86_64
libguestfs-1.40.2-2.el7.x86_64
virt-v2v-1.40.2-2.el7.x86_64
qemu-kvm-rhev-2.12.0-25.el7.x86_64
kernel-3.10.0-957.el7.x86_64
python-ovirt-engine-sdk4-4.3.0-1.el7ev.x86_64
rhv-guest-tools-iso-4.3-3.el7ev.noarch

Software Version:4.3.0.1-0.1.el7

Steps:

1. Prepare a ubuntu guest with vmware-tools service installed from tarball.

1.1 Remove open-vm-tools pkg from ubuntu guest and install vmware-tools guest on vsphere clinet, then vmware-tools service will be running in guest after rebooting guest.

2. Convert guest from vmware to rhv by virt-v2v and there is no error about vmware tool during conversion.

# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-ubuntu18.04-x86_64-GUI --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem  -oo rhv-direct=true -oo rhv-cluster=nfs -of raw 
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored

[   0.2] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-ubuntu18.04-x86_64-GUI
[   2.4] Creating an overlay to protect the source from being modified
[   3.1] Opening the overlay
[  29.1] Inspecting the overlay
[  49.7] Checking for sufficient free disk space in the guest
[  49.7] Estimating space required on target for each disk
[  49.7] Converting Ubuntu 18.04.1 LTS to run on KVM
virt-v2v: warning: could not determine a way to update the configuration of 
Grub2
virt-v2v: warning: don't know how to install guest tools on ubuntu-18
virt-v2v: This guest has virtio drivers installed.
[ 997.6] Mapping filesystem data to avoid copying unused and blank areas
[ 999.5] Closing the overlay
[ 999.7] Assigning disks to buses
[ 999.7] Checking if the guest needs BIOS or UEFI to boot
[ 999.7] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os nfs_data
[1001.5] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.U8waJp/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[2533.8] Creating output metadata
[2556.4] Finishing off


3. After finishing v2v conversion, power on guest at rhv, login guest and check vmware-tools service status
$ service vmware-tools status

Result: Unit vmware-tools.service could not be found, and file /usr/bin/vmware-config-tools.py and vmware-uninstall-tools.py are removed.

4. Tested with debian guest,it also works well.

# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-debian9.6-x86_64-bug1481930  --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem  -oo rhv-direct=true -oo rhv-cluster=nfs -of raw -on esx6.7-debian9.6-x86_64-1481930
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[   0.5] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-debian9.6-x86_64-bug1481930
[   2.8] Creating an overlay to protect the source from being modified
[   3.6] Opening the overlay
[  40.0] Inspecting the overlay
[ 122.9] Checking for sufficient free disk space in the guest
[ 122.9] Estimating space required on target for each disk
[ 122.9] Converting 9.6 to run on KVM
virt-v2v: warning: could not determine a way to update the configuration of 
Grub2
virt-v2v: warning: don't know how to install guest tools on debian-9
virt-v2v: This guest has virtio drivers installed.
[ 560.1] Mapping filesystem data to avoid copying unused and blank areas
[ 560.8] Closing the overlay
[ 561.0] Assigning disks to buses
[ 561.0] Checking if the guest needs BIOS or UEFI to boot
[ 561.0] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os nfs_data
[ 562.8] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.7Z1hy7/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[1636.3] Creating output metadata
[1657.8] Finishing off

so i think this bug issue has been fixed, thanks.

Comment 19 zhoujunqin 2019-04-23 09:06:04 UTC
Verify this bug with new build:
libvirt-4.5.0-12.el7.x86_64
libguestfs-1.40.2-3.el7.x86_64
virt-v2v-1.40.2-3.el7.x86_64
qemu-kvm-rhev-2.12.0-26.el7.x86_64
kernel-3.10.0-1018.el7.x86_64
python-ovirt-engine-sdk4-4.3.1-1.el7ev.x86_64
rhv-guest-tools-iso-4.3-6.el7ev.noarch

Software Version:4.3.0.1-0.1.el7

Scenario-1 Testing with a ubuntu guest with vmware-tools service installed from tarball.

1. Remove open-vm-tools pkg from ubuntu guest and install vmware-tools guest on vsphere clinet, then vmware-tools service will be running in guest after rebooting guest.
$ service vmware-tools status
vmware-tools.service - LSB: VMware Tools service
...
Active: active (running)

2. Convert guest from vmware to rhv by virt-v2v and there is no error about vmware tool during conversion.
#  virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io  vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA esx6.7-ubuntu18.04-x86_64-GUI --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem  -oo rhv-direct=true -oo rhv-cluster=nfs -of raw  -b ovirtmgmt
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[   0.2] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-ubuntu18.04-x86_64-GUI -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA
[   2.2] Creating an overlay to protect the source from being modified
[   3.6] Opening the overlay
[   9.5] Inspecting the overlay
[  11.1] Checking for sufficient free disk space in the guest
[  11.1] Estimating space required on target for each disk
[  11.1] Converting Ubuntu 18.04.1 LTS to run on KVM
virt-v2v: warning: could not determine a way to update the configuration of 
Grub2
virt-v2v: This guest has virtio drivers installed.
[  50.3] Mapping filesystem data to avoid copying unused and blank areas
[  50.8] Closing the overlay
[  51.0] Assigning disks to buses
[  51.0] Checking if the guest needs BIOS or UEFI to boot
[  51.0] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os nfs_data
[  53.1] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.Cj7jxg/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[1368.9] Creating output metadata
[1391.7] Finishing off

3. After finishing v2v conversion, power on guest at rhv, login guest and check vmware-tools service status
$ service vmware-tools status

Result: Unit vmware-tools.service could not be found, and file /usr/bin/vmware-config-tools.py and vmware-uninstall-tools.py are removed.

Scenario-2 Testing with VMware Tools service installed from Open-source VMware Tools.

1. Prepare a ubuntu guest with VMware Tools service installed from Open-source VMware Tools.

$ dpkg -l open-vm-tools ubuntu-server
...
||/ Name                                           Version                      Architecture                 Description
+++-==============================================-============================-============================-==================================================================================================
ii  open-vm-tools                                  2:10.3.0-0ubuntu1~18.04.3    amd64                        Open VMware Tools for virtual machines hosted on VMware (CLI)
ii  ubuntu-server                                  1.417                        amd64                        The Ubuntu Server system


$ service open-vm-tools  status
● open-vm-tools.service - Service for virtual machines hosted on VMware
   Loaded: loaded (/lib/systemd/system/open-vm-tools.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-03-27 06:37:54 UTC; 25min ago
     Docs: http://open-vm-tools.sourceforge.net/about.php
...
2. Convert guest from vmware to rhv by virt-v2v and there is no error about vmware tool during conversion.
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io  vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA esx6.7-ubuntu18.04LTS-x86_64 --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem  -oo rhv-direct=true -oo rhv-cluster=nfs -of raw  -b ovirtmgmt
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[   0.4] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-ubuntu18.04LTS-x86_64 -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA
[   2.1] Creating an overlay to protect the source from being modified
[   5.6] Opening the overlay
[  12.4] Inspecting the overlay
[  13.6] Checking for sufficient free disk space in the guest
[  13.6] Estimating space required on target for each disk
[  13.6] Converting Ubuntu 18.04.2 LTS to run on KVM
virt-v2v: warning: could not determine a way to update the configuration of 
Grub2
virt-v2v: This guest has virtio drivers installed.
[  50.1] Mapping filesystem data to avoid copying unused and blank areas
[  50.9] Closing the overlay
[  51.1] Assigning disks to buses
[  51.1] Checking if the guest needs BIOS or UEFI to boot
[  51.1] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os nfs_data
[  52.7] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.PYdbgz/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[1210.3] Creating output metadata
[1227.8] Finishing off

3. After finishing v2v conversion, power on guest at rhv, login guest and check vmware-tools service status
Result: 
3.1 open-vm-tools.service is inactive.
$ service open-vm-tools status
● open-vm-tools.service - Service for virtual machines hosted on VMware
   Loaded: loaded (/lib/systemd/system/open-vm-tools.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Mon 2019-04-22 09:41:31 UTC; 16h ago
     Docs: http://open-vm-tools.sourceforge.net/about.php

3.2 package "open-vm-tools" and "ubuntu-server" are kept since dependance.

Scenario-3 Testing with a rhel guest with vmware-tools service installed from rpm.

1. Prepare a vmware-tools packages repo in rhel6 guest
# cat /etc/yum.repos.d/vmware-tools.repo 
[vmware-tools]
baseurl=https://packages.vmware.com/tools/esx/6.7latest/rhel6/x86_64/
enabled=1
gpgcheck = 0
name=vmware-tools

2. Install vmware-tools package by using yum command  
# yum install vmware-tools-*  kmod-vmware-tools-* -y

3. After rpm installation, finding that there is vmtoolsd process running in vm.

# ps -ef |grep vmtoolsd
root      3726     1  0 22:45 ?        00:00:00 /usr/sbin/vmtoolsd
root     26673  2713  0 22:58 pts/1    00:00:00 grep vmtoolsd

4. Convert guest from vmware to rhv by virt-v2v and there is no error about vmware tool during conversion.

#  virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io  vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA esx6.7-rhel6.10-x86_64-vmware-tool-rpm --password-file /tmp/passwd -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -os nfs_data -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem  -oo rhv-direct=true -oo rhv-cluster=nfs -of raw  -b ovirtmgmt
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[   0.3] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-rhel6.10-x86_64-vmware-tool-rpm -it vddk  -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=1F:97:34:5F:B6:C2:BA:66:46:CB:1A:71:76:7D:6B:50:1E:03:00:EA
[   2.1] Creating an overlay to protect the source from being modified
[   5.9] Opening the overlay
[  12.8] Inspecting the overlay
[  25.9] Checking for sufficient free disk space in the guest
[  25.9] Estimating space required on target for each disk
[  25.9] Converting Red Hat Enterprise Linux Server release 6.10 (Santiago) to run on KVM
virt-v2v: QEMU Guest Agent installed for this guest.
virt-v2v: This guest has virtio drivers installed.
[ 246.7] Mapping filesystem data to avoid copying unused and blank areas
[ 247.1] Closing the overlay
[ 247.3] Assigning disks to buses
[ 247.3] Checking if the guest needs BIOS or UEFI to boot
[ 247.3] Initializing the target -o rhv-upload -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -os nfs_data
[ 249.4] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.BmISgI/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[ 922.2] Creating output metadata
[ 942.6] Finishing off

5. After finishing v2v conversion, power on guest at rhv, login guest and check vmware-tools service status

Result: 
5.1.Check the vmware repo
Result: It has been disabled.
# cat vmware-tools.repo
[vmware-tools]
baseurl=https://packages.vmware.com/tools/esx/6.7latest/rhel6/x86_64/
enabled=0
gpgcheck = 0
name=vmware-tools

# cat vmware-tools.repo.augsave 
[vmware-tools]
baseurl=https://packages.vmware.com/tools/esx/6.7latest/rhel6/x86_64/
enabled=1
gpgcheck = 0
name=vmware-tools

5.2 Check whether the vmware tools packages have been removed.
#rpm -qa|grep vmware-tools
#rpm -qa|grep kmod
Result: The vmware-tools-* and kmod-vmware-tools-* are all removed.
5.3 Check vmtoolsd process.
# ps -ef |grep vmtoolsd
root      2924  2904  0 23:54 pts/0    00:00:00 grep vmtoolsd

Make a summary:
i.From above 3 scenarios, virt-v2v can support uninstall VMware tools service not only from tarball, but also uninstall the open source VMware tools(open-vm-tools). And for scenario-3, virt-v2v can support uninstall vmware-tools related packages and disable vmware repo.
ii. rjones, I have a question for scenario-3 want to confirm with you, I find that a new repo named "vmware-tools.repo.augsave" has generated during virt-v2v conversion. Whether the purpose is to protect user's data from being modified, i'm not sure, so please help me have a look, thanks.
iii. What's more, i also tested with debian(esx6.7-debian9.6-x86_64-bug1481930) and rhel(esx6.7-rhel6.10-x86_64-vmware-tools) guests, they both work well.

Comment 20 Pino Toscano 2019-04-23 09:18:26 UTC
(In reply to zhoujunqin from comment #19)
> ii. rjones, I have a question for scenario-3 want to confirm with you, I
> find that a new repo named "vmware-tools.repo.augsave" has generated during
> virt-v2v conversion. Whether the purpose is to protect user's data from
> being modified, i'm not sure, so please help me have a look, thanks.

When editing a Linux guest, we open augeas (the library used to change configuration files) with the flag to save a backup file of all the changed files.
The backup files that augeas create have the .augsave extension.

So I'd say this is done on purpose, and it is there since virt-v2v was rewritten and included as part of libguestfs.

Comment 21 zhoujunqin 2019-04-23 09:47:57 UTC
(In reply to Pino Toscano from comment #20)
> (In reply to zhoujunqin from comment #19)
> > ii. rjones, I have a question for scenario-3 want to confirm with you, I
> > find that a new repo named "vmware-tools.repo.augsave" has generated during
> > virt-v2v conversion. Whether the purpose is to protect user's data from
> > being modified, i'm not sure, so please help me have a look, thanks.
> 
> When editing a Linux guest, we open augeas (the library used to change
> configuration files) with the flag to save a backup file of all the changed
> files.
> The backup files that augeas create have the .augsave extension.
> 
> So I'd say this is done on purpose, and it is there since virt-v2v was
> rewritten and included as part of libguestfs.

Got it, thanks for your quick reply, Pino.
According to Comment 19, move this bug from ON_QA to VERIFIED.

Comment 23 errata-xmlrpc 2019-08-06 12:44:11 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/RHEA-2019:2096


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