Bug 2116897

Summary: Can't boot into OS after converting rhel6 guest to openstack by v2v
Product: Red Hat Enterprise Linux 9 Reporter: mxie <mxie>
Component: virt-v2vAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED MIGRATED QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.1CC: berrange, chhu, hongzliu, juzhou, kchamart, lersek, mzhan, rjones, tyan, tzheng, vwu, xiaodwan
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: V2V_OSP_INT
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-07 19:19:36 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:
Attachments:
Description Flags
rhel6.10-cannot-boot-into-os-on-osp16.png none

Description mxie@redhat.com 2022-08-09 13:55:24 UTC
Created attachment 1904486 [details]
rhel6.10-cannot-boot-into-os-on-osp16.png

Description of problem:
Can't boot into OS after converting rhel6 guest to openstack by v2v

Version-Release number of selected component (if applicable):
virt-v2v-2.0.7-4.el9.x86_64
libguestfs-1.48.4-1.el9.x86_64
guestfs-tools-1.48.2-5.el9.x86_64
nbdkit-server-1.30.8-1.el9.x86_64
libnbd-1.12.6-1.el9.x86_64
libvirt-libs-8.5.0-5.el9.x86_64
qemu-img-7.0.0-10.el9.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Convert a rhel6 guest from VMware to openstack by 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 -o openstack -oo server-id=v2v-appliance  esx6.7-rhel6.10-x86_64  -ip /home/passwd  -v -x |& tee > convert-rhel6.10-guest-to-openstack.log
█ 100% [****************************************]

2.Launch the volume as instance after v2v finishing conversion, check guest but find guest can't boot info OS, pls refer to screenshot'rhel6.10-cannot-boot-into-os-on-osp16.png'

3.Check xml info of the guest on compute node, found rhel6 guest has no 'model='virtio-transitional' in disk part
# virsh dumpxml instance-00000071
<domain type='kvm' id='53'>
  <name>instance-00000071</name>
  <uuid>8d2f5481-966c-4fd5-9b0e-a8f41dc890b1</uuid>
  <metadata>
    <nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
      <nova:package version="20.6.2-2.20210607104828.el8ost.4"/>
      <nova:name>esx6.7-rhel6.10-x86_64</nova:name>
      <nova:creationTime>2022-08-09 13:24:06</nova:creationTime>
     .....
  <os>
    <type arch='x86_64' machine='pc-q35-rhel8.4.0'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>
 .....
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/sdi' index='1'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <serial>8513a469-affc-4bfc-87f5-01bd8f05a678</serial>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </disk>
 ......


Actual results:
As above description

Expected results:
Can boot into OS after converting rhel6 guest to openstack by v2v

Additional info:
1.Can't reproduce the bug when convert rhel6 guest to local and rhv because these scenarios have been fixed in bug 1942325 - Virt-v2v should add 'model='virtio-transitional' to RHEL <=6 guest virtio devices during conversion if target is rhel9 system

Comment 2 Laszlo Ersek 2022-08-15 10:47:22 UTC
This is correctly observed. In the patch series for bug 1942325, we only
modified the libvirt output.

The reason we didn't modify the openstack output was *not* an oversight;
I discussed it explicitly in
<https://bugzilla.redhat.com/show_bug.cgi?id=1942325#c12>:

> * The OpenStack output *could* be affected (as OpenStack internally
>   generates libvirt domain XMLs, I think?); however, the latest
>   documentation at
>   <https://docs.openstack.org/glance/xena/admin/useful-image-properties.html>
>   does not make any references to "legacy", "transitional", or "1.0". We
>   might have to deal with that output later.

I've just re-checked the docs of the latest openstack release (yoga):

  https://docs.openstack.org/glance/yoga/admin/useful-image-properties.html

and it still does not make any reference to virtio transitional / legacy.

So I think we'd first need an RFE for openstack -- or someone to educate
us on whether (or how) openstack deals with RHEL-6 guests already.
CC'ing Daniel and Kashyap.

Comment 5 Laszlo Ersek 2022-09-15 07:03:12 UTC
Setting "Devel Cond-NAK: Design" for now, due to the dependency on OpenStack unknowns.