Bug 1683888
| Summary: | Virt-v2v can't convert ubuntu guest with open-vm-tools and ubuntu-server installed | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | mxie <mxie> | ||||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 7.7 | CC: | juzhou, lcheng, mzhan, ptoscano, tzheng, xiaodwan, zili | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | V2V | ||||||||
| Fixed In Version: | libguestfs-1.40.2-2.el7 | Doc Type: | If docs needed, set a value | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 1703405 (view as bug list) | Environment: | |||||||
| Last Closed: | 2019-08-06 12:44:47 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: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1703405 | ||||||||
| Attachments: |
|
||||||||
Sent a patch for this yesterday: https://www.redhat.com/archives/libguestfs/2019-February/msg00066.html Fixed upstream with https://github.com/libguestfs/libguestfs/commit/1a4fd822ef057764f809cddce642b3223756629e which is in libguestfs >= 1.41.1. I can reproduce this bug with package:
virt-v2v-1.40.2-1.el7.x86_64
Then test it 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
Steps:
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 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.2] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-ubuntu18.04LTS-x86_64
[ 2.1] Creating an overlay to protect the source from being modified
[ 2.8] Opening the overlay
[ 17.4] Inspecting the overlay
[ 31.7] Checking for sufficient free disk space in the guest
[ 31.7] Estimating space required on target for each disk
[ 31.7] 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: warning: don't know how to install guest tools on ubuntu-18
virt-v2v: This guest has virtio drivers installed.
[ 841.0] Mapping filesystem data to avoid copying unused and blank areas
[ 841.9] Closing the overlay
[ 842.1] Assigning disks to buses
[ 842.1] Checking if the guest needs BIOS or UEFI to boot
[ 842.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
[ 843.4] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.GVJk4J/nbdkit0.sock", "file.export": "/" } (raw)
(100.00/100%)
[2409.2] Creating output metadata
[2430.7] 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.
3.2 package "open-vm-tools" and "ubuntu-server" are kept since dependency.
So bug issue has been fixed on version virt-v2v-1.40.2-2.el7.x86_64
Sorry for missing a test scenario in the previous verification,so please ignore https://bugzilla.redhat.com/show_bug.cgi?id=1683888#c6. Test bug with builds: virt-v2v-1.40.2-4.el7.x86_64 libvirt-4.5.0-17.el7.x86_64 qemu-kvm-rhev-2.12.0-29.el7.x86_64 libguestfs-1.40.2-4.el7.x86_64 Steps: Scenario 1:convert a guest with open-vm-tools and ubuntu-server installed 1.Prepare a ubuntu guest with open-vm-tools and ubuntu-server installed on VMware. $ dpkg -l ubuntu-server open-vm-tools Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============================================-============================-============================-================================================================================================== ri 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-05-22 09:55:44 UTC; 1min 29s ago Docs: http://open-vm-tools.sourceforge.net/about.php Main PID: 521 (vmtoolsd) Tasks: 2 (limit: 1110) CGroup: /system.slice/open-vm-tools.service └─521 /usr/bin/vmtoolsd 2. Convert guest from vmware to rhv by virt-v2v # 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 -n default esx6.7-ubuntu18.04LTS-x86_64 --password-file /tmp/passwd -o rhv -os 10.66.144.40:/home/nfs_export [ 0.1] 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 [ 1.9] Creating an overlay to protect the source from being modified [ 5.3] Opening the overlay [ 12.7] Inspecting the overlay [ 15.1] Checking for sufficient free disk space in the guest [ 15.1] Estimating space required on target for each disk [ 15.1] 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. [ 52.4] Mapping filesystem data to avoid copying unused and blank areas [ 57.8] Closing the overlay [ 58.1] Assigning disks to buses [ 58.1] Checking if the guest needs BIOS or UEFI to boot [ 58.1] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export [ 58.4] Copying disk 1/1 to /tmp/v2v.rXfXWh/c980b640-cb59-47f7-a0fe-90312d33deae/images/82d4a0db-cfcc-4fe8-8008-5ec484429351/9d75154a-914a-495f-91e2-102d4d574423 (raw) (100.00/100%) [ 280.4] Creating output metadata [ 280.5] Finishing off 3. After finishing v2v conversion, power on guest in kvm and check vmware-tools service status $ 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 Wed 2019-05-22 10:07:53 UTC; 4min 16s ago └─ ConditionVirtualization=vmware was not met Docs: http://open-vm-tools.sourceforge.net/about.php Result 1:There is no error about vmware tool during conversion and the guest can pass all checkpoints. Scenario 2:convert a guest with open-vm-tools, ubuntu-server and vmware tools installed 1.Prepare a ubuntu guest with open-vm-tools, ubuntu-server and vmware tools installed on VMware. # dpkg -l ubuntu-server open-vm-tools Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii open-vm-tools 2:10.3.5-7~u amd64 Open VMware Tools for virtual mac iU ubuntu-server 1.417.1 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 p Active: active (running) since Wed 2019-05-22 13:58:15 CST; 38min ago Docs: http://open-vm-tools.sourceforge.net/about.php Main PID: 1114 (vmtoolsd) Tasks: 1 (limit: 3528) CGroup: /system.slice/open-vm-tools.service └─1114 /usr/bin/vmtoolsd # service vmware-tools status ● vmware-tools.service - LSB: VMware Tools service Loaded: loaded (/etc/init.d/vmware-tools; generated) Active: active (running) since Mon 2019-05-20 16:25:51 CST; 1 day 22h ago Docs: man:systemd-sysv-generator(8) Tasks: 8 (limit: 3528) CGroup: /system.slice/vmware-tools.service ├─1037 /usr/sbin/vmtoolsd └─1138 //usr/lib/vmware-caf/pme/bin/ManagementAgentHost 2.Convert guest from vmware to rhv by virt-v2v # virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 -o rhv-upload -os iscsi_data -of raw -b ovirtmgmt -n ovirtmgmt esx6.7-ubuntu18.04-x86_64-vmtools -oc https://hp-dl360eg8-03.lab.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhv_upload_passwd_file -oo rhv-cafile=/tmp/rhv_upload_ca.pem -oo rhv-cluster=ISCSI -oo rhv-verifypeer -oo rhv-direct -ip /tmp/v2v_vpx_passwd [ 0.3] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-ubuntu18.04-x86_64-vmtools [ 2.1] Creating an overlay to protect the source from being modified [ 2.7] Opening the overlay [ 20.6] Inspecting the overlay [ 40.9] Checking for sufficient free disk space in the guest [ 40.9] Estimating space required on target for each disk [ 40.9] 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: error: libguestfs error: command: dpkg: dependency problems prevent removal of open-vm-tools: ubuntu-server depends on open-vm-tools; however: Package open-vm-tools is to be removed. dpkg: error processing package open-vm-tools (--purge): dependency problems - not removing Errors were encountered while processing: open-vm-tools If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Result 2:The conversion failed and the error info is same with before.Please refer to log:7.7-ubuntu-log. Additional info: 1.Scenario 2 can reproduced on rhel8.0.1 . Created attachment 1571954 [details]
7.7-ubuntu.log
(In reply to liuzi from comment #7) > Scenario 2:convert a guest with open-vm-tools, ubuntu-server and vmware > tools installed > 1.Prepare a ubuntu guest with open-vm-tools, ubuntu-server and vmware tools > installed on VMware. > # dpkg -l ubuntu-server open-vm-tools > Desired=Unknown/Install/Remove/Purge/Hold > | > Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend > |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) > ||/ Name Version Architecture Description > +++-==============-============-============- > ================================= > ii open-vm-tools 2:10.3.5-7~u amd64 Open VMware Tools for virtual > mac > iU ubuntu-server 1.417.1 amd64 The Ubuntu Server system The installation of ubuntu-server is not correct. Please provide the output of $ apt-cache show ubuntu-server How did you install it? Did you try to somehow remove it forcing the dependencies? This explains why ubuntu-server is not detected as installed package, and thus virt-v2v tries to remove open-vm-tools. Re-test the bug after installing all packages correctly.
Test bug with builds:
virt-v2v-1.40.2-4.el7.x86_64
libvirt-4.5.0-17.el7.x86_64
qemu-kvm-rhev-2.12.0-29.el7.x86_64
libguestfs-1.40.2-4.el7.x86_64
Steps:
1.Prepare a ubuntu guest with open-vm-tools, ubuntu-server and vmware tools are installed on VMware.
# dpkg -l open-vm-tools ubuntu-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============================================-============================-============================-==================================================================================================
ii open-vm-tools 2:10.3.5-7~ubuntu0.18.04.1 amd64 Open VMware Tools for virtual machines hosted on VMware (CLI)
ii ubuntu-server 1.417.1 amd64 The Ubuntu Server system
# service vmware-tools status
● vmware-tools.service - LSB: VMware Tools service
Loaded: loaded (/etc/init.d/vmware-tools; generated)
Active: active (exited) since Mon 2019-05-27 04:13:55 UTC; 3min 1s ago
Docs: man:systemd-sysv-generator(8)
Process: 936 ExecStart=/etc/init.d/vmware-tools start (code=exited, status=0/SUCCESS)
# 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 Mon 2019-05-27 04:13:40 UTC; 3min 28s ago
Docs: http://open-vm-tools.sourceforge.net/about.php
Main PID: 648 (vmtoolsd)
Tasks: 2 (limit: 1110)
CGroup: /system.slice/open-vm-tools.service
└─648 /usr/bin/vmtoolsd
2.Convert guest from vmware to rhv by virt-v2v
# virt-v2v -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 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
Exception AttributeError: "'module' object has no attribute 'dump_plugin'" in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored
[ 0.6] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.75.219/?no_verify=1 esx6.7-ubuntu18.04LTS-x86_64
[ 2.6] Creating an overlay to protect the source from being modified
[ 3.3] Opening the overlay
[ 54.2] Inspecting the overlay
[ 74.1] Checking for sufficient free disk space in the guest
[ 74.1] Estimating space required on target for each disk
[ 74.1] 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.
[ 976.9] Mapping filesystem data to avoid copying unused and blank areas
[ 978.5] Closing the overlay
[ 979.0] Assigning disks to buses
[ 979.0] Checking if the guest needs BIOS or UEFI to boot
[ 979.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
[ 980.4] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.NZ21Vx/nbdkit0.sock", "file.export": "/" } (raw)
(100.00/100%)
[2341.3] Creating output metadata
[2356.0] Finishing off
3. After finishing v2v conversion, power on guest in kvm and check vmware-tools service status
# 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-05-27 04:24:59 UTC; 2min 54s ago
└─ ConditionVirtualization=vmware was not met
Docs: http://open-vm-tools.sourceforge.net/about.php
# service vmware-tools status
Unit vmware-tools.service could not be found.
Result:There is no error about vmware tools during conversion and the guest can pass all checkpoints.So change the bug to VERIFIED.
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 |
Created attachment 1539338 [details] ubuntu-server_open-vm-tools-virt-v2v-1.40.2-1.log Description of problem: Virt-v2v can't convert ubuntu guest with open-vm-tools and ubuntu-server installed Version-Release number of selected component (if applicable): virt-v2v-1.40.2-1.el7.x86_64 libguestfs-1.40.2-1.el7.x86_64 libvirt-4.5.0-10.el7_6.4.x86_64 qemu-kvm-rhev-2.12.0-18.el7_6.3.x86_64 How reproducible: 100% Steps to reproduce: 1.Convert a ubuntu guest with open-vm-tools and ubuntu-server installed from VMware by virt-v2v but the conversion is failed # 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 -n default esx6.7-ubuntu18.04LTS-x86_64 --password-file /tmp/passwd [ 0.0] 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 [ 1.9] Creating an overlay to protect the source from being modified [ 5.0] Opening the overlay [ 11.7] Inspecting the overlay [ 13.2] Checking for sufficient free disk space in the guest [ 13.2] Estimating space required on target for each disk [ 13.2] 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: warning: don't know how to install guest tools on ubuntu-18 virt-v2v: error: libguestfs error: command: dpkg: dependency problems prevent removal of open-vm-tools: ubuntu-server depends on open-vm-tools. dpkg: error processing package open-vm-tools (--purge): dependency problems - not removing Errors were encountered while processing: open-vm-tools If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Actual results: As above description Expected results: Virt-v2v can convert ubuntu guest with open-vm-tools and ubuntu-server installed successfully Additional info: 1.Can't reproduce the problem with virt-v2v rhel7.6.z build as virt-v2v doesn't remove the open-vm-tools in this build (Pino told me), so this isn't a regression problem virt-v2v-1.38.2-12.el7_6.2.x86_64 libguestfs-1.38.2-12.el7_6.2.x86_64 2.Also can't reproduce the problem with virt-v2v rhel8 build: virt-v2v-1.38.4-10.module+el8+2709+40ed2f2c.x86_64 libguestfs-1.38.4-10.module+el8+2709+40ed2f2c.x86_64