Bug 1406289 - Importing VMs from VMware is failing with error "Inspection field 'i_arch' was 'unknown'"
Summary: Importing VMs from VMware is failing with error "Inspection field 'i_arch' wa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.3
Hardware: All
OS: All
urgent
high
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On: 1401474
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-20 08:29 UTC by Marcel Kolaja
Modified: 2020-03-11 15:31 UTC (History)
14 users (show)

Fixed In Version: libguestfs-1.32.7-3.el7_3.1
Doc Type: Bug Fix
Doc Text:
_Previously, the libguestfs library did not recognize guest operating systems when the /usr/ directory was not in the same partition as root directory ( / ). As a consequence, the libguestfs tools did not perform as expected. With this update, the libguestfs library recognizes guest operating systems when the /usr/ directory is not located in the same partition as root. As a result, the libguestfs tools perform as expected.
Clone Of: 1401474
Environment:
Last Closed: 2017-01-17 18:28:05 UTC
Target Upstream Version:


Attachments (Terms of Use)
screenshot1 (203.50 KB, image/png)
2016-12-30 05:11 UTC, kuwei@redhat.com
no flags Details
screenshot2 (222.89 KB, image/png)
2016-12-30 05:12 UTC, kuwei@redhat.com
no flags Details
vdsm_import.log (188.35 KB, text/plain)
2016-12-30 11:13 UTC, kuwei@redhat.com
no flags Details
vdsm_gui.log (53.78 KB, text/plain)
2016-12-30 11:15 UTC, kuwei@redhat.com
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2802571 None None None 2016-12-20 08:29:27 UTC
Red Hat Product Errata RHBA-2017:0099 normal SHIPPED_LIVE libguestfs bug fix update 2017-01-17 22:58:25 UTC

Description Marcel Kolaja 2016-12-20 08:29:16 UTC
This bug has been copied from bug #1401474 and has been proposed
to be backported to 7.3 z-stream (EUS).

Comment 4 kuwei@redhat.com 2016-12-30 04:46:45 UTC
Verify the issue with below bulids:
 libguestfs-1.32.7-3.el7_3.2.x86_64
 virt-v2v-1.32.7-3.el7_3.2.x86_64
 qemu-img-rhev-2.6.0-28.el7_3.2.x86_64
 libvirt-2.0.0-10.el7_3.3.x86_64
 rhv4.0: 4.0.6.3
 rhv4.1: 4.1.0.0
 rhv3.6: 3.6.8.0

 

Scenario 1:
 1.Prepare a RHEL 7.2 guest in ESX server with /usr in a different partition

1.1.Create a new guest in esx5.5 and try to install rhel7.2 os

1.2 Configure system partitions. Click on "Installation Destination", set "/usr" as a separate partition after setting "/" and “swap” partition

2. Using v2v to convert the guest from vmware to rhv4.1

#virt-v2v -ic vpx://root@10.73.75.182/data/10.73.3.19/?no_verify=1 rhel7.2usr-seperate --password-file /tmp/passwd -o rhev -os 10.73.131.93:/home/nfs_export
 [ 0.0] Opening the source -i libvirt -ic vpx://root@10.73.75.182/data/10.73.3.19/?no_verify=1 rhel7.2usr-seperate
 [ 1.8] Creating an overlay to protect the source from being modified
 [ 3.1] Initializing the target -o rhev -os 10.73.131.93:/home/nfs_export
 [ 3.2] Opening the overlay
 [ 21.3] Inspecting the overlay
 [ 118.3] Checking for sufficient free disk space in the guest
 [ 118.3] Estimating space required on target for each disk
 [ 118.3] Converting Red Hat Enterprise Linux Server 7.2 (Maipo) to run on KVM
 virt-v2v: This guest has virtio drivers installed.
 [ 662.3] Mapping filesystem data to avoid copying unused and blank areas
 [ 664.8] Closing the overlay
 [ 665.3] Checking if the guest needs BIOS or UEFI to boot
 [ 665.3] Assigning disks to buses
 [ 665.3] Copying disk 1/1 to /tmp/v2v.tzLCOf/c3fbdb8d-fe1b-4252-b2db-eb3edafc0c5e/images/3cf2dccb-e6a1-47f1-b6fc-a7e75af17da1/8702639b-f3cf-4c79-8652-f14f705c8f23 (raw)
 (100.00/100%)
 [1016.0] Creating output metadata
 [1016.2] Finishing off

3.Login rhevm and try to import the guest from export domain to data domain after finishing the conversion

4.Check the guest after finishing importing and checkpoint of guest is passed

Result:
 Could convert the guest which has /usr in a separate partition from vmware to rhev 4.1 without error and could import the guest from export domain to data domian successfully

Additional info:

Could convert the guest which has /usr in a separate partition from vmware to rhev 4.0 without error and could import the guest from export domain to data domian successfully

Scenario 2:
 1.Export the rhel7.2 guest which has /usr in a separate partition as a ova file.

2:Use v2v to convert the OVA file to rhv4.1
 # virt-v2v -i ova rhel7.2usr-seperate.ova -o rhev -os 10.73.131.93:/home/nfs_export -of raw
 [ 0.0] Opening the source -i ova rhel7.2usr-seperate.ova
 tar: rhel7.2usr-seperate.ovf: time stamp 2016-12-28 18:54:25 is 25827.105586837 s in the future
 tar: rhel7.2usr-seperate-disk1.vmdk: time stamp 2016-12-28 18:49:46 is 25529.96207876 s in the future
 tar: rhel7.2usr-seperate-file1.iso: time stamp 2016-12-28 18:54:25 is 25753.445972298 s in the future
 tar: rhel7.2usr-seperate.mf: time stamp 2016-12-28 18:54:25 is 25753.32328654 s in the future
 [ 74.1] Creating an overlay to protect the source from being modified
 [ 75.2] Initializing the target -o rhev -os 10.73.131.93:/home/nfs_export
 [ 75.7] Opening the overlay
 [ 83.2] Inspecting the overlay
 [ 100.8] Checking for sufficient free disk space in the guest
 [ 100.8] Estimating space required on target for each disk
 [ 100.8] Converting Red Hat Enterprise Linux Server 7.2 (Maipo) to run on KVM
 virt-v2v: This guest has virtio drivers installed.
 [ 223.4] Mapping filesystem data to avoid copying unused and blank areas
 [ 224.1] Closing the overlay
 [ 225.1] Checking if the guest needs BIOS or UEFI to boot
 [ 225.1] Assigning disks to buses
 [ 225.1] Copying disk 1/1 to /tmp/v2v.nDeyQk/a9964999-1b0d-45a9-bb39-24c1d08a255b/images/32687adb-8f81-4e7e-84a8-df582b847fe0/34a86476-12d4-44f0-b5d0-ca6eab5e4212 (raw)
 (100.00/100%)
 [ 281.4] Creating output metadata
 [ 281.5] Finishing off

3.Login rhevm and try to import the guest after finishing the conversion, but failed to import the guest with below error:.
 "Failed to import Vm rhel7.2usr-seperate to Data Center Default, Cluster Defaul".

Details pls refer to screenshot1, virt-v2v-debug.log engine.log :"enging_import.log"and vdsm.log:"vdsm_import.log"

 

Additional info:

1. Could convert the ova file which has /usr in a separate partition from vmware to rhv 4.0 without error and also couldn't import the guest from export domain to data domain with same error as step 3.

2.:Could convert the ova file which has /usr in a separate partition from vmware to rhv3.6 without error and could import the guest from export domain to data domian successfully,checkpoint of guest is passed

3.Could convert the ova file which has /usr in a separate partition from vmware to local  without error and  successfully,checkpoint of guest is passed.


 

Scenario 3:
 1.Import OVA file which has /usr in a separate partition at rhv4.1 GUI.
 1.1.Export the rhel7.2 which has /usr in a separate partition as a ova file and copy this ova file  to the registered host of rhv4.1, the registered host has been configured as v2v conversion server 
 1.2 Login rhv 4.1 ,select “Virtual Machines-->Import”
 select “source “ as Vmware virtual Appliation(OVA)”,enter the path of the ova file.
 1.3.Load the ova file and import it,but failed to import with the error :
"Error while executing action: 
rhel7.2usr-seperate:
must be greater than or equal to 1
Attribute: vm.vmStatic.maxMemorySizeMb", 
details pls refer to screenshot 2 , engine log: "engine_gui.log" and vdsm log:"vdsm_gui.log" 

Result :Could be load ova file successfully at rhv4.1 GUI,but failed to importing the guest 

Addtional info:
 Could import the guest as a ova file which has /usr in a separate partition to rhv4.0 successfully and checkpoint of guest is passed.

 

Hi rjones,

For above verify results, I think the bug has not been fixed fully when using virt-v2v to  convert the ova file which has /usr in a separate partition from vmware to rhev  , I'm not sure the problem is caused by virt-v2v or rhev, could you help to check it ? If the problem is caused by rhev, I will file a bug on rhev for this problem, thanks

Comment 5 kuwei@redhat.com 2016-12-30 05:11:19 UTC
Created attachment 1236030 [details]
screenshot1

Comment 6 kuwei@redhat.com 2016-12-30 05:12:08 UTC
Created attachment 1236031 [details]
screenshot2

Comment 7 kuwei@redhat.com 2016-12-30 11:13:29 UTC
Created attachment 1236060 [details]
vdsm_import.log

Comment 8 kuwei@redhat.com 2016-12-30 11:15:27 UTC
Created attachment 1236061 [details]
vdsm_gui.log

Comment 9 Richard W.M. Jones 2016-12-31 01:53:24 UTC
If you did not see the error "inspection field 'i_arch' was 'unknown'"
then this bug is fixed.

The import problem is something else, please file a separate bug
about it.

Comment 11 Pino Toscano 2017-01-03 11:09:00 UTC
Hi kuwei,

can you please share the OVA of the scenario 2? If not, I'd like to take a look at the .mf and .ovf files inside it (the OVA usually is a tar file, so you can just untar with with plain `tar`).
Are the attachments the results of scenario 2?

I agree with Rich that this does not look like a virt-v2v issue, but I want to check the actual guest to be sure.

Comment 12 kuwei@redhat.com 2017-01-03 12:53:38 UTC
Sorry, please ignore commnet 10 . I re-configure a rhv4.0.6 server to check when import a regular ova file,i find it failed too and has the same error with rhv4.1.0.

Thanks tgolembi and pino to confirm ,it is a exist bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1406304

Comment 13 kuwei@redhat.com 2017-01-06 07:21:36 UTC
Hi, I just found there is existing bug against rhv4.0 and rhv4.1 export import problem . so I add a new comment to verify this bug again for clarifying the verify result more clearly

Verify the issue with below bulids:
libguestfs-1.32.7-3.el7_3.2.x86_64
virt-v2v-1.32.7-3.el7_3.2.x86_64
qemu-img-rhev-2.6.0-28.el7_3.2.x86_64
libvirt-2.0.0-10.el7_3.3.x86_64
rhv4.0: 4.0.6-3

Scenario 1:
1.Prepare a RHEL 7.2 guest in ESX server with /usr in a different partition

1.1.Create a new guest in esx5.5 and try to install rhel7.2 os

1.2 Configure system partitions. Click on "Installation Destination", set "/usr" as a separate partition after setting "/" and “swap” partition

2. Using v2v to convert the guest from vmware to rhv4.0

#virt-v2v -ic vpx://root@10.73.75.182/data/10.73.3.19/?no_verify=1 rhel7.2usr-seperate --password-file /tmp/passwd -o rhev -os 10.73.131.93:/home/nfs_export

3.Login rhevm and try to import the guest from export domain to data domain after finishing the conversion

4.Check the guest after finishing importing and checkpoint of guest is passed

Scenario 2:

1.Export the rhel7.2 guest which has /usr in a separate partition as a ova file.

2:Use v2v to convert the OVA file to rhv4.0
virt-v2v -i ova rhel7.2usr-seperate.ova -o rhev -os 10.73.131.93:/home/nfs_export -of qcow2
[ 0.0] Opening the source -i ova rhel7.2usr-seperate.ova
[ 76.3] Creating an overlay to protect the source from being modified
[ 78.4] Initializing the target -o rhev -os 10.73.131.93:/home/nfs_export
[ 79.3] Opening the overlay
[ 93.6] Inspecting the overlay
[ 110.8] Checking for sufficient free disk space in the guest
[ 110.8] Estimating space required on target for each disk
[ 110.8] Converting Red Hat Enterprise Linux Server 7.2 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 241.1] Mapping filesystem data to avoid copying unused and blank areas
[ 241.7] Closing the overlay
[ 242.3] Checking if the guest needs BIOS or UEFI to boot
[ 242.3] Assigning disks to buses
[ 242.3] Copying disk 1/1 to /tmp/v2v.xfk5r7/ca31df01-aca7-441f-b10f-4f6a9b692684/images/1d15e5d8-8730-461a-b5bd-eb86f072d6a3/013badb7-3ede-4f73-946e-3d2108c78ca1 (qcow2)
(100.00/100%)
[ 287.1] Creating output metadata
[ 287.2] Finishing off

3.Login rhevm and try to import the guest after finishing the conversion, but failed to import the guest with below error:.
"Failed to import Vm rhel7.2usr-seperate to Data Center Default, Cluster Defaul".
 
This issue is caused by an existing rhev4.0 bug Bug 1378045

Because there is no MACAddress in the ovf configuration file which is exported from the VMware. there also is no mac address after converting this ova file by virt-v2v to export domain, checking the ovf file at export domain after v2v conversion, there is no mac address in ovf
<Item>
<rasd:InstanceId>47d5815f-9dc6-4f36-a4c2-fc056907917a</rasd:InstanceId>
<rasd:Caption>Ethernet adapter on Network adapter 1</rasd:Caption>
<rasd:ResourceType>10</rasd:ResourceType>
<rasd:ResourceSubType>3</rasd:ResourceSubType>
<Type>interface</Type>
<rasd:Connection>Network adapter 1</rasd:Connection>
<rasd:Name>eth0</rasd:Name>
</Item>

4: If we manually add the mac address by editing the ovf file, the import the guest from export domain to data domain successfully

<Item>
<rasd:InstanceId>47d5815f-9dc6-4f36-a4c2-fc056907917a</rasd:InstanceId>
<rasd:Caption>Ethernet adapter on Network adapter 1</rasd:Caption>
<rasd:ResourceType>10</rasd:ResourceType>
<rasd:ResourceSubType>3</rasd:ResourceSubType>
<Type>interface</Type>
<rasd:MACAddress>00:1a:4a:16:01:51</rasd:MACAddress>
<rasd:Connection>Network adapter 1</rasd:Connection>
<rasd:Name>eth0</rasd:Name>
</Item>

7.After finishing importing , power on the guest normally and checkpoint of  guest is passed


Scenario 3:

    1.Copy ova file to registered host of rhv4.0.
    2. Login rhv4.0,  Importing the ova file from rhev GUI-> virtual machines tab --> import --> select VMware virtual appliance (OVA)
    3.Guest can be import successful and checkpoint of guest is passed

Result:

According above verify result, the bug has been fixed by virt-v2v ,  so move the bug from ON_QA to VERIFIED

Comment 15 errata-xmlrpc 2017-01-17 18:28: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://rhn.redhat.com/errata/RHBA-2017-0099.html


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