Bug 1779127 - Install QEMU Guest Agent during Windows virt-v2v conversion
Summary: Install QEMU Guest Agent during Windows virt-v2v conversion
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libguestfs
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Richard W.M. Jones
QA Contact: liuzi
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-03 11:17 UTC by Tomáš Golembiovský
Modified: 2020-05-05 09:54 UTC (History)
7 users (show)

Fixed In Version: libguestfs-1.40.2-22.module+el8.2.0+6029+618ef2ec
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:52:05 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
win2012r2-conversion.log (3.00 MB, text/plain)
2020-03-24 04:22 UTC, liuzi
no flags Details
win2012r2 Firstboot log.png (265.01 KB, image/png)
2020-03-24 04:24 UTC, liuzi
no flags Details
vin2008r2 Firstboot-log.png (480.10 KB, image/png)
2020-03-24 04:33 UTC, liuzi
no flags Details
win2008r2 conversion.log (1.99 MB, text/plain)
2020-03-24 04:38 UTC, liuzi
no flags Details
win2008 Firstboot log.png (463.11 KB, image/png)
2020-03-24 07:24 UTC, liuzi
no flags Details
win2008 conversion.log (1.89 MB, text/plain)
2020-03-24 07:26 UTC, liuzi
no flags Details
win2012 Forcerestart.png (300.13 KB, image/png)
2020-03-31 09:42 UTC, liuzi
no flags Details
win7 forcerestart.png (246.37 KB, image/png)
2020-03-31 09:55 UTC, liuzi
no flags Details
win2008 powershell.png (261.54 KB, image/png)
2020-03-31 10:05 UTC, liuzi
no flags Details
win7 installation task already exist (331.28 KB, image/png)
2020-04-01 13:52 UTC, liuzi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:54:15 UTC

Description Tomáš Golembiovský 2019-12-03 11:17:32 UTC
In the effort to drop the RHV guest tools ISO and rely only on virtio-win in RHV the RHV and IMS project require a way how to get the QEMU-GA installed into he guest during conversion. Idealy in RHEL 8.2.

The Windows MSI installer for QEMU-GA has been present on virtio-win ISO for many years already so this is only about injecting the MSI into the guest and triggering the installation process.

This has been already merged upstream:

https://github.com/libguestfs/libguestfs/commit/00b4ed312b0ba179e9901b73c099724c3f6606b4

There are however still several issues with that for which fixes have been posted to upstream mailing list:

https://www.redhat.com/archives/libguestfs/2019-November/msg00136.html
https://www.redhat.com/archives/libguestfs/2019-November/msg00134.html

Comment 1 Pino Toscano 2019-12-03 16:07:31 UTC
(Clarify the title about the fact this is about Windows guests.)(In reply to Tomáš Golembiovský from comment #0)
> There are however still several issues with that for which fixes have been
> posted to upstream mailing list:
> 
> https://www.redhat.com/archives/libguestfs/2019-November/msg00136.html
> https://www.redhat.com/archives/libguestfs/2019-November/msg00134.html

I'd prefer these issues to the addressed/fixed, before we consider these Windows drivers enhancements.

Comment 2 Richard W.M. Jones 2019-12-04 14:00:11 UTC
I've reviewed the patches series now and am happy with them.  The only
mildly controversial thing was requiring Powershell, but anyone today who
is using Windows XP without at least service pack 3 (released in 2008)
deserves what they get :-)

Comment 3 Tomáš Golembiovský 2020-03-03 18:06:53 UTC
The change requires the following patches:

59f9ff40621240a6eed28c4425d3d69d8b21bc0e  windows: small tweaks of qemu-ga firstboot script
45acf8d0557bee948c035305a6bafc6c9963a467  windows: fix detection of qemu-ga installer on RHV
a33e878221aa6f64da2979c6ff694ee0b55b3fa1  v2v: windows: install QEMU Guest Agent MSI

And since the last patch was rejected upstream here is the replacement:

https://www.redhat.com/archives/libguestfs/2020-March/msg00006.html

Hopefully I am not forgetting anything.

Comment 5 Tomáš Golembiovský 2020-03-16 17:08:05 UTC
(In reply to Tomáš Golembiovský from comment #3)

> https://www.redhat.com/archives/libguestfs/2020-March/msg00006.html
> 
This has been pushed as commit
    dc66e78fa37db33e3c7358b7f7c7fa809cf62f9d

Comment 8 liuzi 2020-03-24 04:17:44 UTC
Test with builds:
virt-v2v-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64
libguestfs-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64

steps:
Set environment for the conversion server:
1)Setup export VIRTIO_WIN=/usr/share/virtio-win/

Scenario 1:Convert a windows2019 guest from esx6.5 to rhv:
1.1 # virt-v2v -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win2019-x86_64 --password-file /tmp/passwd -o rhv  -os 10.66.144.40:/home/nfs_export
[   0.0] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win2019-x86_64
[   1.8] Creating an overlay to protect the source from being modified
[   2.3] Opening the overlay
[  17.0] Inspecting the overlay
[ 151.4] Checking for sufficient free disk space in the guest
[ 151.4] Estimating space required on target for each disk
[ 151.4] Converting Windows Server 2019 Standard to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win/

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[ 176.7] Mapping filesystem data to avoid copying unused and blank areas
[ 177.8] Closing the overlay
[ 177.8] Assigning disks to buses
[ 177.8] Checking if the guest needs BIOS or UEFI to boot
[ 177.8] Initializing the target -o rhv -os 10.66.144.40:/home/nfs_export
[ 177.9] Copying disk 1/1 to /tmp/v2v.S87MoE/5792ab14-7746-4340-a27d-845dc12b8db9/images/504e6116-c6a0-4e7a-bd31-b775ed8e32d0/ea346711-04c0-440e-aa07-d58751c6386b (raw)
    (100.00/100%)
[1425.6] Creating output metadata
[1425.6] Finishing off

1.2 Conversion can be finished successfully,and boot guest on rhv

1.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can find "QEMU guest agent -- Installation competed successfully." in qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Excute "sc query qemu-ga" in command prompt,the service is running.

Result 1:virt-v2v can install qemu-ga to win2019 guest during conversion,and the qemu-ga can work normally.


Scenario 2:Convert a windows2016 guest from esx6.5 to rhv:
2.1 # virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw  esx6.5-win2016-x86_64 -on esx6.5-win2016-qemu-ga -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd
[   0.9] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win2016-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.8] Creating an overlay to protect the source from being modified
[   6.1] Opening the overlay
[  12.1] Inspecting the overlay
[  16.4] Checking for sufficient free disk space in the guest
[  16.4] Estimating space required on target for each disk
[  16.4] Converting Windows Server 2016 Standard to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (10.0 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win/

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  18.4] Mapping filesystem data to avoid copying unused and blank areas
[  19.4] Closing the overlay
[  19.5] Assigning disks to buses
[  19.5] Checking if the guest needs BIOS or UEFI to boot
[  19.5] 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
[  20.7] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.FdYD1F/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[ 837.8] Creating output metadata
[ 839.3] Finishing off
2.2 Conversion can be finished successfully,and boot guest on rhv

2.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can find "QEMU guest agent -- Installation competed successfully." in qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Excute "sc query qemu-ga" in command prompt,the service is running.

Result 2:virt-v2v can install qemu-ga to win2016 guest during conversion,and the qemu-ga can work normally.

Scenario 3 convert a win2012 guest to rhv
3.1# virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw  esx6.5-win2012-x86_64 -on esx6.5-win2012-qemu-ga -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd
[   0.8] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win2012-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.7] Creating an overlay to protect the source from being modified
[   6.0] Opening the overlay
[  12.3] Inspecting the overlay
[  15.9] Checking for sufficient free disk space in the guest
[  15.9] Estimating space required on target for each disk
[  15.9] Converting Windows Server 2012 Standard to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (6.2 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win/

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  17.3] Mapping filesystem data to avoid copying unused and blank areas
[  18.0] Closing the overlay
[  18.1] Assigning disks to buses
[  18.1] Checking if the guest needs BIOS or UEFI to boot
[  18.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
[  19.2] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.F5le2A/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[1045.1] Creating output metadata
[1046.5] Finishing off
3.2 Conversion can be finished successfully,and boot guest on rhv

3.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can find qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Excute "sc query qemu-ga" in command prompt,the survice is running.
d.Find below info in Firstboot log:
ERROR:The system cannot find the file specified.
Scheduling delayed installation of qemu-ga from qemu-ga-x86_64.msi

Result 3: virt-v2v can install qemu-ga to win2012 guest.

Scenario 4 convert a win2012r2 guest to rhv
4.1 #  virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw  esx6.5-win2012r2-x86_64 -on esx6.5-win2012r2-qemu-ga -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd
[   0.4] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win2012r2-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.2] Creating an overlay to protect the source from being modified
[   5.3] Opening the overlay
[  11.7] Inspecting the overlay
[  16.8] Checking for sufficient free disk space in the guest
[  16.8] Estimating space required on target for each disk
[  16.8] Converting Windows Server 2012 R2 Standard to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (6.3 
x86_64).  virt-v2v looks for this driver in 
/usr/share/virtio-win/virtio-win.iso

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  23.1] Mapping filesystem data to avoid copying unused and blank areas
[  23.9] Closing the overlay
[  23.9] Assigning disks to buses
[  23.9] Checking if the guest needs BIOS or UEFI to boot
[  23.9] 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
[  25.1] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.QlsLmB/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[1008.4] Creating output metadata
[1010.0] Finishing off

4.2 Conversion can be finished successfully,and boot guest on rhv

4.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can not find qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Can not find qemu-ga service in guest.
d.Firstboot log:install service exit code 1,pls refer to screenshot 

Result 4: virt-v2v cannot install qemu-ga and rhv-apt to win2012r2 guest during conversion.pls refer to log named win2012r2-conversion.

Scenario 5:convert a win2008-x86_64 guest to rhv:
5.1# virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw esx6.5-win2008-x86_64 -on esx6.5-win2008-qemu-ga  -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd
[   0.4] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win2008-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.2] Opening the overlay
[  11.4] Inspecting the overlay
[  14.7] Checking for sufficient free disk space in the guest
[  14.7] Estimating space required on target for each disk
[  14.7] Converting Windows Server (R) 2008 Standard to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there are no virtio drivers available for this version 
of Windows (6.0 x86_64 unknown).  virt-v2v looks for drivers in 
/usr/share/virtio-win/

The guest will be configured to use slower emulated devices.
virt-v2v: This guest does not have virtio drivers installed.
[  15.9] Mapping filesystem data to avoid copying unused and blank areas
[  16.3] Closing the overlay
[  16.4] Assigning disks to buses
[  16.4] Checking if the guest needs BIOS or UEFI to boot
[  16.4] 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
[  17.6] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.ezgw5v/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[ 901.3] Creating output metadata
[ 902.7] Finishing off


5.2 Conversion can be finished successfully,and boot guest on rhv

5.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can not find qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Can not find qemu-ga service in guest.
d.Qemu-ga can be installed successfully by manual

Result 5: virt-v2v cannot install qemu-ga to win2008 guest during conversion.pls refer to log named win2008-conversion.


Scenario 6:Convert a win2008r2 guest to rhv:
6.1# virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw esx6.5-win2008r2-x86_64 -on esx6.5-win2008r2-qemu-ga  -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd
[   0.8] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win2008r2-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.7] Creating an overlay to protect the source from being modified
[   6.1] Opening the overlay
[  12.4] Inspecting the overlay
[  23.0] Checking for sufficient free disk space in the guest
[  23.0] Estimating space required on target for each disk
[  23.0] Converting Windows Server 2008 R2 Standard to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: This guest has virtio drivers installed.
[  25.2] Mapping filesystem data to avoid copying unused and blank areas
[  26.2] Closing the overlay
[  26.2] Assigning disks to buses
[  26.2] Checking if the guest needs BIOS or UEFI to boot
[  26.2] 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
[  27.4] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.zffIeC/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[ 827.1] Creating output metadata
[ 828.5] Finishing off
6.2 Conversion can be finished successfully,and boot guest on rhv

6.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can not find qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Can not find qemu-ga service in guest.
d.Successfully to install qemu-ga by manual.

Result 6: virt-v2v cannot install qemu-ga to win2008r2 guest during conversion.pls refer to log named win2008-conversion

Scenario 7:Convert a win10-x86_64 guest to rhv:
# virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw esx6.5-win10-x86_64 -on  esx6.5-win10-x86_64-qemu-ga  -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd  -v -x |& tee > win10-x86_64-conversion.log

7.2 Conversion can be finished successfully,and boot guest on rhv

7.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can find "QEMU guest agent -- Installation competed successfully." in qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Excute "sc query qemu-ga" in command prompt,the service is running.

Result 7:virt-v2v can install qemu-ga to win10-x86_64 guest during conversion,and the qemu-ga can work normally.

Scenario 8:convert a win10-i386 guest to rhv:
#  virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw esx6.5-win10-i386 -on  esx6.5-win10-i386-qemu_ga  -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd  -v -x |& tee > win10-i386-conversion.log
8.2 Conversion can be finished successfully,and boot guest on rhv

8.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-i386 windows installer package in C:/ 
b.Can not find qemu-ga log file named qemu-ga-i386.msi in C:/.
c.Can not find qemu-ga service in guest.
d.Sucessfully to install qemu-ga by manual.

Result 8: virt-v2v cannot install qemu-ga to win10-i386 guest during conversion.pls refer to log named win10-i386-conversion.

Scenario 9:convert a win8-i386 guest to rhv:
# virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw esx6.5-win8-i386 -on  esx6.5-win8-i386  -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd  -v -x |& tee > win8-i386-conversion.log

9.2 Conversion can be finished successfully,and boot guest on rhv

9.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can find "QEMU guest agent -- Installation competed successfully." in qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Excute "sc query qemu-ga" in command prompt,the survice is running.

Result 9:virt-v2v can install qemu-ga to win8-i386 guest during conversion,and the qemu-ga can work normally.

Scenario 10:convert a win8-x86_64 guest to rhv:
# virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw esx6.5-win8-x86_64 -on  esx6.5-win8-x86_64-qemu-ga  -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd  -v -x |& tee > win8-x86_64-conversion.log

10.2 Conversion can be finished successfully,and boot guest on rhv

10.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-i386 windows installer package in C:/ 
b.Can not find qemu-ga log file in C:/.
c.Can not find qemu-ga service in guest.
d.Sucessfully to install qemu-ga by manual.

Result 10: virt-v2v cannot install qemu-ga to win8-x86_64 guest during conversion.pls refer to log named win8-x86_64-conversion.

Scenario 11:Convert a win7 guest to rhv:
11.1 # virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw esx6.5-win7-x86_64 -on  esx6.5-win7-x86_64-qemu-ga  -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd 
[   0.8] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win7-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.7] Creating an overlay to protect the source from being modified
[   6.1] Opening the overlay
[  12.2] Inspecting the overlay
[  15.8] Checking for sufficient free disk space in the guest
[  15.8] Estimating space required on target for each disk
[  15.8] Converting Windows 7 Ultimate to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: This guest has virtio drivers installed.
[  18.4] Mapping filesystem data to avoid copying unused and blank areas
[  19.1] Closing the overlay
[  19.1] Assigning disks to buses
[  19.1] Checking if the guest needs BIOS or UEFI to boot
[  19.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
[  20.3] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.ijsXrj/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[ 639.6] Creating output metadata
[ 641.0] Finishing off

11.2 Conversion can be finished successfully,and boot guest on rhv

11.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can not find qemu-ga log file in C:/.
c.Can not find qemu-ga service in guest.
d.Successfully to install qemu-ga by manual.

Result 11: virt-v2v cannot install qemu-ga to win7-x86_64 guest during conversion.

Scenario 12:Convert a win8.1-x86_64 guest to rhv:
12.1 # virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw  esx6.5-win8.1-x86_64  -on esx6.5-win8.1-x86_64-qemu-ga -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd
[   0.8] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win8.1-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.7] Creating an overlay to protect the source from being modified
[   6.1] Opening the overlay
[  12.5] Inspecting the overlay
[  18.5] Checking for sufficient free disk space in the guest
[  18.5] Estimating space required on target for each disk
[  18.5] Converting Windows 8.1 Enterprise to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (6.3 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win/

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  22.5] Mapping filesystem data to avoid copying unused and blank areas
[  23.5] Closing the overlay
[  23.6] Assigning disks to buses
[  23.6] Checking if the guest needs BIOS or UEFI to boot
[  23.6] 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
[  24.8] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.TwXa5B/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[1118.1] Creating output metadata
[1119.6] Finishing off

12.2 Conversion can be finished successfully,and boot guest on rhv

12.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can not find qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Can not find qemu-ga service in guest.
d.Firstboot log:install service exit code 1,pls refer to screenshot 

Result 12 :virt-v2v cannot install qemu-ga and rhv-apt to win8.1-x86_64 guest.

Scenario 13:Convert a win8.1-i386 guest to rhv:
13.1 #  virt-v2v  -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 -o rhv-upload -os nfs_data -of raw  esx6.5-win8.1-i386  -on esx6.5-win8.1-i386-qemu-ga -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   -oc https://ibm-x3250m5-03.rhts.eng.pek2.redhat.com/ovirt-engine/api -op /tmp/rhvpasswd -oo rhv-cafile=/home/ca.pem -oo rhv-cluster=Default -oo rhv-verifypeer=true -oo rhv-direct -ip /tmp/passwd
[   0.9] Opening the source -i libvirt -ic vpx://root.73.141/data/10.73.196.89/?no_verify=1 esx6.5-win8.1-i386 -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.6] Creating an overlay to protect the source from being modified
[   5.8] Opening the overlay
[  12.3] Inspecting the overlay
[  17.0] Checking for sufficient free disk space in the guest
[  17.0] Estimating space required on target for each disk
[  17.0] Converting Windows 8.1 Enterprise to run on KVM
virt-v2v: warning: /usr/share/virt-tools/pnp_wait.exe is missing.  
Firstboot scripts may conflict with PnP.
virt-v2v: warning: there is no QXL driver for this version of Windows (6.3 
i386).  virt-v2v looks for this driver in /usr/share/virtio-win/

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  20.3] Mapping filesystem data to avoid copying unused and blank areas
[  21.2] Closing the overlay
[  21.2] Assigning disks to buses
[  21.2] Checking if the guest needs BIOS or UEFI to boot
[  21.2] 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
[  22.4] Copying disk 1/1 to qemu URI json:{ "file.driver": "nbd", "file.path": "/var/tmp/rhvupload.Gdl6lV/nbdkit0.sock", "file.export": "/" } (raw)
    (100.00/100%)
[1127.2] Creating output metadata
[1128.7] Finishing off

13.2 Conversion can be finished successfully,and boot guest on rhv

13.3 Check if the guest has installed qume-guest-agent and the service is running normally.
a.Can find qemu-ga-x86_64 windows installer package in C:/ 
b.Can not find qemu-ga log file named qemu-ga-x86_64.msi in C:/.
c.Can not find qemu-ga service in guest.
d.Successfully to install the qemu-ga by manual

Result 13:virt-v2v cannot install qemu-ga to win8.1-i386 guest.

Hi,Tgolembi,
As above testing,I sorted the results as follows:
1> For windows2019,windows2016,windows2012,win10-x86_64 and win8-i386:
1.1 virt-v2v can copy qemu-ga install package to guests' C:/
1.2 virt-v2v can install the service during first-boot,and can generate qemu-ga.msi log in C:/,
1.3 qemu-ga service running normally.

2>For win2008,win2008r2,win10-i386,win8-x86_64,win8.1-i386 and win7-x86_64:
2.1 virt-v2v can copy qemu-ga install package to guests' C:/
2.2 virt-v2v cannot install the service during first-boot,cannot find qemu-ga.msi log in C:/,and no error info in Firstboot log.
2.3 qemu-ga service can be installed successfully by manual.
Details pls refer to win2008r2-conversion.log and win2008r2-firstboot-log.png

3>For win2012r2 and win8.1-x86_64:
3.1 virt-v2v can copy qemu-ga install package to guests' C:/
3.2 virt-v2v cannot install qemu-ga and rhv-apt to guest,can find error info in Firstboot log.
Details pls refer to win2012r2-conversion.log and win2012r2-firstboot-log.png

Comment 9 liuzi 2020-03-24 04:22:12 UTC
Created attachment 1672884 [details]
win2012r2-conversion.log

Comment 10 liuzi 2020-03-24 04:24:37 UTC
Created attachment 1672885 [details]
win2012r2 Firstboot log.png

Comment 11 liuzi 2020-03-24 04:33:43 UTC
Created attachment 1672886 [details]
vin2008r2 Firstboot-log.png

Comment 12 liuzi 2020-03-24 04:38:01 UTC
Created attachment 1672898 [details]
win2008r2 conversion.log

Comment 13 liuzi 2020-03-24 07:22:34 UTC
Update the division of results according different error info:
1> For windows2019,windows2016,windows2012,win10-x86_64 and win8-i386:
1.1 virt-v2v can copy qemu-ga install package to guests' C:/
1.2 virt-v2v can install the service during first-boot,and can generate qemu-ga.msi log in C:/,
1.3 qemu-ga service running normally.

2>For win2008r2,win10-i386 and win7-x86_64:
2.1 virt-v2v can copy qemu-ga install package to guests' C:/
2.2 virt-v2v cannot install the service during first-boot,cannot find
 qemu-ga.msi log in C:/,and no error info in Firstboot log.
2.3 qemu-ga service can be installed successfully by manual.
Details pls refer to win2008r2-conversion.log and win2008r2-firstboot-log.png

3>For win2008-x86_64,win8.1-i386:
3.1 virt-v2v can copy qemu-ga install package to guests' C:/
3.2 virt-v2v cannot install the service during first-boot,cannot find
 qemu-ga.msi log in C:/,and find powershell error info in Firstboot log.
2.3 qemu-ga service can be installed successfully by manual.
Details pls refer to win2008-conversion.log and win2008-firstboot-log.png

4>For win2012r2,win8-x86_64 and win8.1-x86_64:
4.1 virt-v2v can copy qemu-ga install package to guests' C:/
4.2 virt-v2v cannot install qemu-ga and rhv-apt to guest,can find error info in Firstboot log.
Details pls refer to win2012r2-conversion.log and win2012r2-firstboot-log.png

Comment 14 liuzi 2020-03-24 07:24:04 UTC
Created attachment 1672926 [details]
win2008 Firstboot log.png

Comment 15 liuzi 2020-03-24 07:26:01 UTC
Created attachment 1672928 [details]
win2008 conversion.log

Comment 16 Tomáš Golembiovský 2020-03-26 12:37:32 UTC
(In reply to liuzi from comment #13)
> Update the division of results according different error info:
> 1> For windows2019,windows2016,windows2012,win10-x86_64 and win8-i386:
> 1.1 virt-v2v can copy qemu-ga install package to guests' C:/
> 1.2 virt-v2v can install the service during first-boot,and can generate
> qemu-ga.msi log in C:/,
> 1.3 qemu-ga service running normally.
> 
> 2>For win2008r2,win10-i386 and win7-x86_64:
> 2.1 virt-v2v can copy qemu-ga install package to guests' C:/
> 2.2 virt-v2v cannot install the service during first-boot,cannot find
>  qemu-ga.msi log in C:/,and no error info in Firstboot log.
> 2.3 qemu-ga service can be installed successfully by manual.
> Details pls refer to win2008r2-conversion.log and win2008r2-firstboot-log.png

Can you check Event Viewer for any messages from TaskScheduler component or any errors in the Security log, please?
If you cannot find anything, try enabling the history task scheduler history in guest *before* running the conversion. This can be done in the Task Scheduler or from command line with:

    wevtutil set-log Microsoft-Windows-TaskScheduler/Operational /enabled:true

> 
> 3>For win2008-x86_64,win8.1-i386:
> 3.1 virt-v2v can copy qemu-ga install package to guests' C:/
> 3.2 virt-v2v cannot install the service during first-boot,cannot find
>  qemu-ga.msi log in C:/,and find powershell error info in Firstboot log.
> 2.3 qemu-ga service can be installed successfully by manual.
> Details pls refer to win2008-conversion.log and win2008-firstboot-log.png

Here the log says that "powershell.exe is not recognized as an internal or external command".
I'd say we need to be explicit about the path to powershell.exe.

> 
> 4>For win2012r2,win8-x86_64 and win8.1-x86_64:
> 4.1 virt-v2v can copy qemu-ga install package to guests' C:/
> 4.2 virt-v2v cannot install qemu-ga and rhv-apt to guest,can find error info
> in Firstboot log.
> Details pls refer to win2012r2-conversion.log and win2012r2-firstboot-log.png

Strangely this does not say any error either, just exit code 1. And the "system cannot execute program" from other parts of firstboot don't look to good either. It may be worth running the firstboot scripts verbosely -- i.e. removing the 'echo off' commands from batch files with guestfish after the conversion (and before starting the guest).

Comment 17 liuzi 2020-03-31 09:38:50 UTC
Hi,Tgolembi,
According to your comments,I have done some debug for failed cases,result as below:

1>For win8-x86_64, win2008r2, win7-x86_64 
1.1 After removing the 'echo off' commands from batch files,and run command in cmd,windows will give an error info: Invalid argument option --forcerestart
Details pls refer to  win7-forcerestart.png

2>For win2012r2 and win8.1-i386::
2.1 After removing the 'echo off' commands from batch files,and run command in cmd,windows will give an error info: Invalid argument option --forcerestart
2.2 RHEV-apt also install failed,but cannot find error in event viewer.
Details pls refer to win2012r2-forcerestart.png

3>For win2008-x86_64
3.1 Install powershell by manual,and then excute batch files.windows cannot execute instructions correctly
Details pls refer to win2008-powershell.png


1.For situation 2, I think we should file a new bug for virt-v2v cannot install rhev-apt.
2.During testing,I find windows need more than 5 mins to install rhev-apt to some guests(such as win10-i386),should we change to install qemu-ga firstly?

Comment 18 liuzi 2020-03-31 09:42:53 UTC
Created attachment 1675040 [details]
win2012 Forcerestart.png

Comment 19 liuzi 2020-03-31 09:55:19 UTC
Created attachment 1675043 [details]
win7 forcerestart.png

Comment 20 liuzi 2020-03-31 10:05:02 UTC
Created attachment 1675046 [details]
win2008 powershell.png

Comment 21 Tomáš Golembiovský 2020-04-01 08:35:42 UTC
That's because powershell.exe and schtask.exe are not two separate commands but should be on one line -- schtask.exe is invoked from powershell. I guess that while you were editing the batch files line wrapping caused the long line to split. Now the arguments are not quoted properly which causes the error.

Comment 22 liuzi 2020-04-01 13:51:06 UTC
According to comment 21,re-test the bug,update result as below:
1>For win2008,win2008r2,win7 and win2012r2:
1.1 The installation task already exist before running the command by manual,but windows cannot execute the task.
1.2 After executing command in cmd,only can find log info about powershell.exe in windows event viewer.
Details pls refer to win7 task already exist.

2>For win2012r2 and win8.1-i386:
2.1 The installaion task not exist before running the command by manual.
2.2 After executing the command,the guest can install qemu-ga successfully.
2.3 For rhev-apt problem,I will file a new bug to track this.

Comment 23 liuzi 2020-04-01 13:52:29 UTC
Created attachment 1675426 [details]
win7 installation task already exist

Comment 24 Tomáš Golembiovský 2020-04-02 10:08:58 UTC
(In reply to liuzi from comment #22)
> According to comment 21,re-test the bug,update result as below:
> 1>For win2008,win2008r2,win7 and win2012r2:
> 1.1 The installation task already exist before running the command by
> manual,but windows cannot execute the task.
> 1.2 After executing command in cmd,only can find log info about
> powershell.exe in windows event viewer.
> Details pls refer to win7 task already exist.

In the batch file there is a command that removes any existing task with that name. I don't see that executed in your shell. You need to execute that command too to avoid the problem that you are seeing.

Comment 25 Tomáš Golembiovský 2020-04-02 10:15:21 UTC
> > 3>For win2008-x86_64,win8.1-i386:
> > 3.1 virt-v2v can copy qemu-ga install package to guests' C:/
> > 3.2 virt-v2v cannot install the service during first-boot,cannot find
> >  qemu-ga.msi log in C:/,and find powershell error info in Firstboot log.
> > 2.3 qemu-ga service can be installed successfully by manual.
> > Details pls refer to win2008-conversion.log and win2008-firstboot-log.png
> 
> Here the log says that "powershell.exe is not recognized as an internal or
> external command".
> I'd say we need to be explicit about the path to powershell.exe.

So after some research it turns out while powershell is available for those systems it is not installed by default in all setups (it is missing in minimal setups). I'd say we could ignore those setups and suggest to install powershell if they want the guest agent installed.

Comment 26 liuzi 2020-04-02 12:11:15 UTC
Verify bug with builds:
virt-v2v-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64
libguestfs-1.40.2-22.module+el8.2.0+6029+618ef2ec.x86_64
virtio-win-1.9.9-3.el8.noarch

As above testing, I summarize status of qemu-ga installation in windows guest as below, 
1>Guest can install qemu-ga successfully:
   Guest           qemu-ga serivce running
   Win2019              Yes
   Win2016              Yes
   Win2012              Yes
   Win10-x86_64         Yes
   Win10-i386           Yes
   Win8-i386            Yes
   Win8.1-x86_64        Yes

2> For win2012r2 and win8.1-i386: file a new bug:Bug 1820152 - Fail to execute installation-qemu-ga.msi for win2012r2 and win8.1-i386 guests

3>For win7,win2008 and win2008r2: file a new bug to track:Bug 1820152 - Fail to execute installation-qemu-ga.msi for win2012r2 and win8.1-i386 guests

Now change the bug from ON_QA to VERIFIED.

Comment 27 liuzi 2020-04-02 12:14:04 UTC
sorry for copy wrong link:
3>For win7,win2008 and win2008r2: file a new bug to track:Bug 1820144 - cannot install qemu-ga to some guests even if scheduled qemu-ga installation task exist

Comment 29 errata-xmlrpc 2020-05-05 09:52:05 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-2020:2017


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