Bug 1213691

Summary: Win2012R2 guest fails to boot on iscsi data domain after conversion by virt-v2v
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: juzhou, mxie, mzhan, ptoscano, rjones, tzheng, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: libguestfs-1.28.1-1.33.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 19:21:39 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: 1190669    
Bug Blocks:    
Attachments:
Description Flags
screenshot for win2012R2 fail to boot on iscsi data domain.
none
meta file of win2012R2 after conversion by virt-v2v
none
ovf file of win2012R2 after conversion by virt-v2v none

Description tingting zheng 2015-04-21 05:07:32 UTC
Created attachment 1016675 [details]
screenshot for win2012R2 fail to boot on iscsi data domain.

Description
Win2012R2 guest fails to boot on iscsi data domain after conversion by virt-v2v

Version:
virt-v2v-1.28.1-1.28.el7.x86_64
libguestfs-1.28.1-1.28.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a win2012R2 guest.

2.Use virt-v2v to convert it to rhev.
2.1 Tested sparse+qcow2:
# virt-v2v -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1  --password-file /tmp/passwd2 -b rhevm  esx5.5-win2012R2-x86_64 -of qcow2 -on esx5.5-win2012R2-x86_64-qcow2 -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export
[   0.0] Opening the source -i libvirt -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-win2012R2-x86_64
[   1.0] Creating an overlay to protect the source from being modified
[   2.0] Opening the overlay
[ 180.0] Initializing the target -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export
virt-v2v: warning: cannot write files to the NFS server as 36:36, even 
though we appear to be running as root. This probably means the NFS client 
or idmapd is not configured properly.

You will have to chown the files that virt-v2v creates after the run, 
otherwise RHEV-M will not be able to import the VM.
[ 180.0] Inspecting the overlay
[ 246.0] Checking for sufficient free disk space in the guest
[ 246.0] Estimating space required on target for each disk
[ 246.0] Converting Windows Server 2012 R2 Standard to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 261.0] Mapping filesystem data to avoid copying unused and blank areas
[ 262.0] Closing the overlay
[ 262.0] Copying disk 1/1 to /tmp/v2v.AZD8Bi/f7eca9dd-8763-4e32-acb6-50a07c439e6a/images/c88ec6da-9789-47e3-b6f8-69808603fdef/da9d70b4-b347-49a3-8bf0-e8823fa4815e (qcow2)
    (100.00/100%)
[ 862.0] Creating output metadata
[ 862.0] Finishing off

2.2 Tested preallocated+raw:
# virt-v2v -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1  --password-file /tmp/passwd2 -b rhevm  esx5.5-win2012R2-x86_64 -oa preallocated -of raw -on esx5.5-win2012R2-x86_64-preallocated -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export
[   0.0] Opening the source -i libvirt -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1 esx5.5-win2012R2-x86_64
[   1.0] Creating an overlay to protect the source from being modified
[   1.0] Opening the overlay
[ 178.0] Initializing the target -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export
virt-v2v: warning: cannot write files to the NFS server as 36:36, even 
though we appear to be running as root. This probably means the NFS client 
or idmapd is not configured properly.

You will have to chown the files that virt-v2v creates after the run, 
otherwise RHEV-M will not be able to import the VM.
[ 179.0] Inspecting the overlay
[ 246.0] Checking for sufficient free disk space in the guest
[ 246.0] Estimating space required on target for each disk
[ 246.0] Converting Windows Server 2012 R2 Standard to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 260.0] Mapping filesystem data to avoid copying unused and blank areas
[ 262.0] Closing the overlay
[ 262.0] Copying disk 1/1 to /tmp/v2v.9T0RJT/f7eca9dd-8763-4e32-acb6-50a07c439e6a/images/3d5bc908-26ff-4358-b0fa-f2d4f278a2a8/b98e28da-a901-4aa7-af7e-c0d092ec822a (raw)
    (100.00/100%)
[ 865.0] Creating output metadata
[ 865.0] Finishing off

2.3 Test default config,don't set -of and -oa.
# virt-v2v -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1  --password-file /tmp/passwd2 -b rhevm  esx5.5-win2012R2-x86_64  -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export

3.After conversion,import the guest to iscsi data domain.
For the above different scenarios,boot the guest,it all fails with "Preparing Automatic Repair",after the load file finished,the guest keeps on reboot.

Actual results:
As description.

Expected results:
Win2012R2 guest can be booted successfully on iscsi data domain.

Additional info:
1.For 2.1 Check the meta file and image,attached meta file and ovf file.
[root@localhost c88ec6da-9789-47e3-b6f8-69808603fdef]# ls
da9d70b4-b347-49a3-8bf0-e8823fa4815e  da9d70b4-b347-49a3-8bf0-e8823fa4815e.meta
# qemu-img info da9d70b4-b347-49a3-8bf0-e8823fa4815e
image: da9d70b4-b347-49a3-8bf0-e8823fa4815e
file format: qcow2
virtual size: 15G (16106127360 bytes)
disk size: 7.1G
cluster_size: 65536
Format specific information:
    compat: 0.10


2.Win2012R2 guest can be booted successfully on nfs data domain.

3.Other guest,eg:win8,win8.1 can be booted successfully on iscsi data domain.

Comment 1 tingting zheng 2015-04-21 05:08:36 UTC
Created attachment 1016676 [details]
meta file of win2012R2 after conversion by virt-v2v

Comment 2 tingting zheng 2015-04-21 05:09:07 UTC
Created attachment 1016677 [details]
ovf file of win2012R2 after conversion by virt-v2v

Comment 4 Richard W.M. Jones 2015-05-11 11:22:24 UTC
(In reply to tingting zheng from comment #0)
> 2.Win2012R2 guest can be booted successfully on nfs data domain.
> 
> 3.Other guest,eg:win8,win8.1 can be booted successfully on iscsi data domain.

I think the cause is not iSCSI, but is more likely to be because
of bug 1219857.  We were passing the wrong OS type to RHEV in the
OVF for Windows 2012R2, but the OS type was correct for other
versions of Windows.

This is fixed in:

https://github.com/libguestfs/libguestfs/commit/6f9d5dce47f8502bee5d7285faf7695b22b5300b

So please can you retest this, when we have a version of virt-v2v
that includes the fix for bug 1219857.

Comment 7 mxie@redhat.com 2016-02-19 11:01:56 UTC
Try to verify the bug with builds
virt-v2v-1.32.2-5.el7.x86_64
libguestfs-1.32.2-5.el7.x86_64
virtio-win-1.8.0-4.el7.noarch
RHEVM3.6:3.6.3.2-0.1.el6
Host:3.10.0-350.el7.x86_64

Steps:
1.Prepare a win2012R2 guest.

2.Use virt-v2v to convert it to rhev
2.1 Tested sparse+qcow2:
virt-v2v -o rhev -os 10.73.69.67:/home/nfs_export -b ovirtmgmt -n ovirtmgmt esx5.1-win2012r2-x86_64 -on win2012r2-x86_64-qcow2 -of qcow2
[   0.0] Opening the source -i libvirt esx5.1-win2012r2-x86_64
[   0.0] Creating an overlay to protect the source from being modified
[   0.4] Initializing the target -o rhev -os 10.73.69.67:/home/nfs_export
[   0.6] Opening the overlay
[   5.4] Inspecting the overlay
[   7.5] Checking for sufficient free disk space in the guest
[   7.5] Estimating space required on target for each disk
[   7.5] Converting Windows Server 2012 R2 Standard to run on KVM
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/in /usr/share/virtio-win

The guest will be configured to use standard VGA.
virt-v2v: This guest has virtio drivers installed.
[  13.3] Mapping filesystem data to avoid copying unused and blank areas
[  14.1] Closing the overlay
[  14.2] Checking if the guest needs BIOS or UEFI to boot
[  14.2] Assigning disks to buses
[  14.2] Copying disk 1/1 to /tmp/v2v.rNU4lx/0c692e6b-0f76-43b8-974e-74f35909080b/images/4dcb07f4-d72d-4de9-988f-1dcc47984dd5/9a3bf804-2993-4e87-8e06-e14ea3038cc4 (qcow2)
    (100.00/100%)
[ 382.7] Creating output metadata
[ 383.8] Finishing off


2.2 Tested preallocated+raw:
# virt-v2v -o rhev -os 10.73.69.67:/home/nfs_export -b ovirtmgmt -n ovirtmgmt esx5.1-win2012r2-x86_64 -on win2012r2-x86_64-raw -of raw -oa preallocated
[   0.0] Opening the source -i libvirt esx5.1-win2012r2-x86_64
[   0.0] Creating an overlay to protect the source from being modified
[   0.4] Initializing the target -o rhev -os 10.73.69.67:/home/nfs_export
[   4.3] Opening the overlay
[   8.9] Inspecting the overlay
[  11.5] Checking for sufficient free disk space in the guest
[  11.5] Estimating space required on target for each disk
[  11.5] Converting Windows Server 2012 R2 Standard to run on KVM
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 standard VGA.
virt-v2v: This guest has virtio drivers installed.
[  15.2] Mapping filesystem data to avoid copying unused and blank areas
[  15.9] Closing the overlay
[  16.2] Checking if the guest needs BIOS or UEFI to boot
[  16.2] Assigning disks to buses
[  16.2] Copying disk 1/1 to /tmp/v2v.9EuDkj/0c692e6b-0f76-43b8-974e-74f35909080b/images/abdb0d09-6a08-4ba8-99e1-4c94369da529/c8e2a32b-8de7-4c5a-9621-1bc8be8a4cd9 (raw)
    (100.00/100%)
[ 375.1] Creating output metadata
[ 375.2] Finishing off


2.3 Test default config,don't set -of and -oa.
# virt-v2v -o rhev -os 10.73.69.67:/home/nfs_export -b ovirtmgmt -n ovirtmgmt esx5.1-win2012r2-x86_64 -on win2012r2-x86_64
[   0.0] Opening the source -i libvirt esx5.1-win2012r2-x86_64
[   0.0] Creating an overlay to protect the source from being modified
[   1.0] Initializing the target -o rhev -os 10.73.69.67:/home/nfs_export
[ 104.7] Opening the overlay
[ 110.1] Inspecting the overlay
[ 111.4] Checking for sufficient free disk space in the guest
[ 111.4] Estimating space required on target for each disk
[ 111.4] Converting Windows Server 2012 R2 Standard to run on KVM
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 standard VGA.
virt-v2v: This guest has virtio drivers installed.
[ 113.1] Mapping filesystem data to avoid copying unused and blank areas
[ 113.5] Closing the overlay
[ 113.8] Checking if the guest needs BIOS or UEFI to boot
[ 113.8] Assigning disks to buses
[ 113.8] Copying disk 1/1 to /tmp/v2v.OCS03N/0c692e6b-0f76-43b8-974e-74f35909080b/images/602e6d78-3522-4a80-a43e-7bb31e7532d5/737b8fc1-280e-4b8a-8693-9aa20f549d8c (raw)
    (100.00/100%)
[ 344.5] Creating output metadata
[ 344.6] Finishing off

3.After conversion,import the guest to iscsi data domain.
For the above different scenarios,could boot into guest successfully

Result now:
Win2012R2 guest can be booted successfully on iscsi data domain.