Bug 1873374
| Summary: | Should set hw_machine_type as 'pc-q35-rhel8.x.0' when use virt-v2v to convert uefi guest to OSP via glance and openstack option | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | mxie <mxie> | ||||||||||||
| Component: | virt-v2v | Assignee: | Virtualization Maintenance <virt-maint> | ||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | mxie <mxie> | ||||||||||||
| Severity: | high | Docs Contact: | |||||||||||||
| Priority: | high | ||||||||||||||
| Version: | unspecified | CC: | jsuchane, juzhou, lersek, mzhan, ptoscano, rjones, tyan, tzheng, xiaodwan | ||||||||||||
| Target Milestone: | beta | Keywords: | Triaged | ||||||||||||
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
||||||||||||
| Hardware: | x86_64 | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Fixed In Version: | virt-v2v-1.45.96-1.el9 | Doc Type: | If docs needed, set a value | ||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||
| Clone Of: | Environment: | ||||||||||||||
| Last Closed: | 2022-05-17 13:41:55 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: | 1581428, 1637857 | ||||||||||||||
| Bug Blocks: | |||||||||||||||
| Attachments: |
|
||||||||||||||
Created attachment 1712909 [details]
uefi--guest-default-pc-machine-type.png
Created attachment 1712910 [details]
uefi-guest-q35-machine-type.png
Created attachment 1712911 [details]
uefi-guest-to-glance.log
Wasn't this working before, i.e. EFI guest with pc machine type from glance template? This is a particular instance of virt-v2v must support Q35. Can reproduce the bug when use v2v to convert uefi guest to openstack via openstack option
Version-Release number of selected component (if applicable):
virt-v2v-1.42.0-7.module+el8.4.0+9398+f376ac33.x86_64
libguestfs-1.44.0-1.module+el8.4.0+9398+f376ac33.x86_64
libvirt-libs-7.0.0-1.module+el8.4.0+9464+3e71831a.x86_64
qemu-kvm-5.2.0-2.module+el8.4.0+9186+ec44380f.x86_64
nbdkit-1.24.0-1.module+el8.4.0+9341+96cf2672.x86_64
python3-openstackclient-4.0.1-2.20201217180131.bff556c.el8ost.1.noarch
RHOS-16.2-RHEL-8-20210113.n.0
How reproducible:
100%
Steps to Reproduce:
1. Prepare a guest which has installed virt-v2v on OSP16.2 environment, we call the guest as 'v2v-appliance'
$ openstack server list
+--------------------------------------+----------------------+--------+------------------------------------+--------------------------------------+--------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+----------------------+--------+------------------------------------+--------------------------------------+--------+
| 381a9246-ddd7-4236-8d19-27868e360380 | v2v-appliance-latest | ACTIVE | private=192.168.0.112, 10.73.224.2 | RHEL-8.4.0-20210107.n.0-x86_64.qcow2 | |
+--------------------------------------+----------------------+--------+------------------------------------+--------------------------------------+--------+
2.Convert a guest from VMware to OSP16.2 by virt-v2v
(overcloud) [root@localhost ~]# virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -o openstack -oo server-id=v2v-appliance-latest -ip /home/passwd esx7.0-rhel8.3-x86_64-efi
[ 1.6] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel8.3-x86_64-efi -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78
[ 3.7] Creating an overlay to protect the source from being modified
[ 4.6] Opening the overlay
[ 11.7] Inspecting the overlay
[ 32.0] Checking for sufficient free disk space in the guest
[ 32.0] Estimating space required on target for each disk
[ 32.0] Converting Red Hat Enterprise Linux 8.3 Beta (Ootpa) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 120.7] Mapping filesystem data to avoid copying unused and blank areas
virt-v2v: warning: fstrim on guest filesystem /dev/sda1 failed. Usually
you can ignore this message. To find out more read "Trimming" in
virt-v2v(1).
Original message: fstrim: fstrim: /sysroot/: the discard operation is not
supported
[ 121.7] Closing the overlay
[ 122.0] Assigning disks to buses
[ 122.0] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[ 122.0] Initializing the target -o openstack
Failed to set volume read-only access mode flag: Invalid volume: Volume 8254e656-8ac6-409d-b0ab-7205f368be09 status must be available to update readonly flag, but current status is: creating. (HTTP 400) (Request-ID: req-8a69287f-7c37-47ac-baf6-73af9443757d)
[ 136.9] Copying disk 1/1 to /dev/disk/by-id/virtio-8254e656-8ac6-409d-b (raw)
(100.00/100%)
[ 670.4] Creating output metadata
[ 676.2] Finishing off
3.Try to launch the volume as instance on OSP16.2 dashboard after v2v conversion, but found the status of volume is in-use because of bug1917262, so detach the volume from v2v appliance manually, then launch the volume as instance.
4.But found instance can't boot into OS, pls check screenshot"uefi-guest-cannot-boot-into-OS-osp16.2"
5.Check instance libvirtxml on compute node, found instance has wrong machine type 'pc-i440fx-rhel7.6.0':
[root@overcloud-novacompute-0 /]# virsh dumpxml 3
<domain type='kvm' id='3'>
<name>instance-00000003</name>
<uuid>ee4b7039-651c-4f4d-9031-b407b7e369c2</uuid>
<metadata>
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
<nova:package version="20.4.2-2.20201224134938.81a3f4b.el8ost.1"/>
<nova:name>esx7.0-rhel8.3-x86_64-efi</nova:name>
<nova:creationTime>2021-01-18 08:51:38</nova:creationTime>
<nova:flavor name="small">
<nova:memory>2048</nova:memory>
<nova:disk>20</nova:disk>
<nova:swap>0</nova:swap>
<nova:ephemeral>0</nova:ephemeral>
<nova:vcpus>1</nova:vcpus>
</nova:flavor>
<nova:owner>
<nova:user uuid="3095b4b1b7e44271a34535c504ee53a6">admin</nova:user>
<nova:project uuid="e2457562982241cbb72adfcceeac6add">admin</nova:project>
</nova:owner>
</nova:instance>
</metadata>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>1</vcpu>
<cputune>
<shares>1024</shares>
</cputune>
<resource>
<partition>/machine</partition>
</resource>
<sysinfo type='smbios'>
<system>
<entry name='manufacturer'>Red Hat</entry>
<entry name='product'>OpenStack Compute</entry>
<entry name='version'>20.4.2-2.20201224134938.81a3f4b.el8ost.1</entry>
<entry name='serial'>ee4b7039-651c-4f4d-9031-b407b7e369c2</entry>
<entry name='uuid'>ee4b7039-651c-4f4d-9031-b407b7e369c2</entry>
<entry name='family'>Virtual Machine</entry>
</system>
</sysinfo>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.6.0'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/instance-00000003_VARS.fd</nvram>
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
......
Created attachment 1748440 [details]
uefi-guest-cannot-boot-into-OS-osp16.2.png
I've arrived here from the test plan: RHEL-201781. I think this BZ should be solved now, namely across the long dependency chain bug 1581428 -> bug 1637857 -> bug 1942325. In comment#0, a RHEL-8.2 guest is being converted -- "Converting Red Hat Enterprise Linux 8.2 (Ootpa) to run on KVM". Due to the libosinfo enablement from bug 1942325, considering both Q35 support and virtio-1.0 support, the conversion described in the present BZ should pick the Q35 board, *regardless of* UEFI being used by the guest, or not. I ask that this BZ be please retested with the latest v2 packages in RHEL9. Verify the bug with below builds: virt-v2v-1.45.97-2.el9.x86_64 libguestfs-1.46.1-2.el9.x86_64 guestfs-tools-1.46.1-6.el9.x86_64 libvirt-libs-8.0.0-1.el9.x86_64 qemu-img-6.2.0-4.el9.x86_64 nbdkit-1.28.4-2.el9.x86_64 libnbd-1.10.3-1.el9.x86_64 Steps: Background: -o glance has been deprecated on rhel9 after bug 1977539 is fixed 1. Prepare a rhel9 guest which has installed virt-v2v on OSP16.2 environment, we call the guest as 'v2v-appliance' 2.Convert different uefi guests from VMware to openstack16.2 by virt-v2v 2.1 # virt-v2v -ic vpx://root@vcenter_ip/dc/esxi_host/?no_verify=1 -it vddk -io vddk-libdir=/home/vddk7.0.2 -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -ip /home/passwd -o openstack -oo server-id=v2v-appliance-rhel9_0 $guest_name 2.2 launch the volume as instance on OSP env after v2v conversion 2.3 Check machine type of guest libvirtxml in compute node and check if checkpoints of guest are passed, get below result: Guest machine_type Checkpoints - esx7.0-win2022-x86_64-uefi q35 PASS - esx7.0-rhel8.3-efi-without-secure q35 Only bug1642021 - esx7.0-debian10.9.0-x64-uefi q35 Bug 1965176 - esx7.0-ubuntu20.04.2-x86_64-uefi q35 Only bug1652480 - esx7.0-opensuse15.2-x86_64-efi q35 PASS Result: The bug has been fixed, move the bug from ON_QA to VERIFIED 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 (new packages: virt-v2v), 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/RHEA-2022:2566 |
Created attachment 1712908 [details] change-pc-to-q35-metadata.png Description of problem: Should set hw_machine_type as 'pc-q35-rhel8.2.0' during converting uefi guest to glance by v2v Version-Release number of selected component (if applicable): RHOSP: RHOS-16.1-RHEL-8-20200723.n.0 Package version of v2v conversion server: virt-v2v-1.42.0-5.module+el8.3.0+7152+ab3787c3.x86_64 libguestfs-1.42.0-2.module+el8.3.0+6798+ad6e66be.x86_64 libvirt-6.6.0-2.module+el8.3.0+7567+dc41c0a9.x86_64 qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901.x86_64 python3-glanceclient-2.17.0-0.20200422213417.40c19aa.el8ost.noarch How reproducible: 100% Steps to Reproduce: 1. Convert a uefi guest from VMware to openstack via glance by v2v (overcloud) [root@localhost ~]# virt-v2v -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 -ip /home/passwd esx7.0-rhel8.2-efi-without-secure -o glance -of qcow2 [ 2.6] Opening the source -i libvirt -ic vpx://root.198.169/data/10.73.199.217/?no_verify=1 esx7.0-rhel8.2-efi-without-secure -it vddk -io vddk-libdir=/home/vmware-vix-disklib-distrib -io vddk-thumbprint=B5:52:1F:B4:21:09:45:24:51:32:56:F6:63:6A:93:5D:54:08:2D:78 [ 4.4] Creating an overlay to protect the source from being modified [ 5.4] Opening the overlay [ 15.2] Inspecting the overlay [ 33.2] Checking for sufficient free disk space in the guest [ 33.2] Estimating space required on target for each disk [ 33.2] Converting Red Hat Enterprise Linux 8.2 (Ootpa) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 133.5] Mapping filesystem data to avoid copying unused and blank areas virt-v2v: warning: fstrim on guest filesystem /dev/sda1 failed. Usually you can ignore this message. To find out more read "Trimming" in virt-v2v(1). Original message: fstrim: fstrim: /sysroot/: the discard operation is not supported [ 136.1] Closing the overlay [ 136.5] Assigning disks to buses [ 136.5] Checking if the guest needs BIOS or UEFI to boot virt-v2v: This guest requires UEFI on the target to boot. [ 136.5] Initializing the target -o glance [ 136.5] Copying disk 1/1 to /var/tmp/glance.N5Y0TN/sda (qcow2) (100.00/100%) [ 525.7] Creating output metadata +------------------+----------------------------------------------------------------------------------+ | Property | Value | +------------------+----------------------------------------------------------------------------------+ | architecture | x86_64 | | checksum | 23e12b3cb1f0e4a8daf44ce8e8c8021c | | container_format | bare | | created_at | 2020-08-26T14:23:19Z | | direct_url | swift+config://ref1/glance/b2b6238e-4802-4680-86f8-db543fbe6e0f | | disk_format | qcow2 | | hw_cpu_cores | 1 | | hw_cpu_sockets | 1 | | hw_disk_bus | virtio | | hw_firmware_type | uefi | | hw_machine_type | pc | | hw_rng_model | virtio | | hw_video_model | qxl | | hw_vif_model | virtio | | hypervisor_type | kvm | | id | b2b6238e-4802-4680-86f8-db543fbe6e0f | | min_disk | 0 | | min_ram | 2048 | | name | esx7.0-rhel8.2-efi-without-secure | | os_distro | rhel | | os_hash_algo | sha512 | | os_hash_value | 2a38d479c417f8e71ab99bc3e7c4fb7ac2a92d10304d9d3d988c05f58621fce65cd581ad3066e32d | | | 5c869b19f1aa085246430bccdba3d8c3db784a319a0a60af | | os_hidden | False | | os_type | linux | | os_version | 8.2 | | owner | 3ccefcef669147dcbd6139347a5da986 | | protected | False | | size | 2253193216 | | status | active | | stores | default_backend | | tags | [] | | updated_at | 2020-08-26T14:23:50Z | | virtual_size | Not available | | visibility | shared | | vm_mode | hvm | +------------------+----------------------------------------------------------------------------------+ [ 558.8] Finishing off 2.Launch the image as instance after v2v conversion on OSP dashboard, but find instance can't boot into OS, pls check screenshot'uefi-guest-default-pc-machine-type.png' 3.Edit the metadata of the image to change hw_machine_type from 'pc' to 'pc-q35-rhel8.2.0',pls check'change-pc-to-q35-metadata.png'. Then launch the image as instance again, find instance can boot into OS successfully, pls check'uefi-guest-q35-machine-type.png' Actual results: Can't launch the image as instance on RHOSP16.1 after v2v converting uefi guest to glance because of incorrect hw_machine_type 'pc' Expected results: Should set hw_machine_type as 'pc-q35-rhel8.2.0' during converting uefi guest to glance by v2v Additional infoļ¼