virt-v2v to Red Hat Enterprise Virtualization does not correctly set OS-Type for RHEL 7

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 7 (RHEL)
  • Red Hat Enterprise Virtualization 3 (RHEV)

Issue

  • When using virt-v2v to convert a qcow2 image into a RHEV image, the OS-Type is set to "Other OS" when importing into RHEV (instead of Red Hat Enterprise Linux 7)

Resolution

  • Update to libguestfs-1.28.1-1.55.el7 which was shipped via RHBA-2015:2183 to address this issue.

Root Cause

  • The OS-Type is not recognized when the virtual machine image is being imported into Red Hat Enterprise Virtualization.

Diagnostic Steps

  • Convert the image using virt-v2v
[root@rhel7-test tmp]# virt-v2v -i disk rhel7.img -of qcow2 -o rhev -os rhel6-rhevm:/var/lib/exports/vm -on RHEL7-7-1
[   0.0] Opening the source -i disk rhel7-virt.img
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[  16.0] Initializing the target -o rhev -os rhel6-rhevm:/var/lib/exports/vm
[  16.0] Inspecting the overlay
[  28.0] Checking for sufficient free disk space in the guest
[  28.0] Estimating space required on target for each disk
[  28.0] Converting Red Hat Enterprise Linux Server release 7.1 (Maipo) to run on KVM
virt-v2v: warning: /files/boot/grub2/device.map/hd0 references unknown 
device "vda".  You may have to fix this entry manually after conversion.
virt-v2v: This guest has virtio drivers installed.
[  88.0] Mapping filesystem data to avoid copying unused and blank areas
[  89.0] Closing the overlay
[  89.0] Copying disk 1/1 to /tmp/v2v.kBx4Rv/6e2ae6e1-b76d-4043-a561-5dbbe5f7cb3f/images/01a9f868-94a6-48b7-aa6f-aa808d05a167/31e9253b-4311-4f4f-8adb-804e5da653f4 (qcow2)
    (100.00/100%)
[ 288.0] Creating output metadata
[ 288.0] Finishing off
  • OS-Type within RHEV after importing
id                                           : 82092638-9fd4-443b-b9e2-6c7c165acf88
name                                         : RHEL7-7-1
description                                  : Exported by virt-v2v 1.28.1
cluster-id                                   : 00000001-0001-0001-0001-00000000023f
cpu-architecture                             : X86_64
cpu-topology-cores                           : 1
cpu-topology-sockets                         : 1
cpu_shares                                   : 0
creation_time                                : 2015-05-08 10:12:15.418000+02:00
delete_protected                             : False
display-allow_override                       : False
display-monitors                             : 1
display-single_qxl_pci                       : False
display-smartcard_enabled                    : False
display-type                                 : spice
high_availability-enabled                    : False
high_availability-priority                   : 0
initialization-regenerate_ssh_keys           : False
memory                                       : 2147483648
memory_policy-guaranteed                     : 2147483648
migration_downtime                           : -1
origin                                       : rhev
os-boot-dev                                  : hd
os-type                                      : other  <------ Other OS
placement_policy-affinity                    : migratable
sso-methods-method-id                        : GUEST_AGENT
stateless                                    : False
status-state                                 : down
stop_time                                    : 2015-05-08 11:48:49.772000+02:00
template-id                                  : 00000000-0000-0000-0000-000000000000
type                                         : server
usb-enabled                                  : False

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments