RHEL 6 VM does not detect the virtio disks and fails to boot in Openshift Virtualization.
Environment
- Openshift Container Platform (OCP) 4.xx
- Openshift Virtualization (OCV) 4.xx
- virtio_blk virtual disk
- RHEL 6 guest
- Migration Toolkit for Virtualization (MTV)
Issue
- After importing or migrating a RHEL 6 VM to Openshift Virtualization, it fails to boot, sometimes, it shows kernel panic.
? panic+0xa7/0x18b
? perf_event_exit_task+0xc0/0x340
? do_exit+0x853/0x860
? fput+0x25/0x30
? system_call-after_swapds_0x2/0x152
? do_group_exit+0x58/0xd0
? system_exit_group+0x17/0x20
? system_call_fastpath+0x35/0x3a
? system_call_after_swapgs+0xae/0x152
- In the dracut rescue shell, it is observed that it does not detect the virtio disk.
Resolution
- Patch the VM to use the
virtio-transitionaldevice models:
$ virtctl stop VM_NAME
$ oc patch vm VM_NAME --type=merge -p '{"spec":{"template":{"spec":{"domain":{"devices":{"useVirtioTransitional":true}}}}}}'
$ virtctl start VM_NAME
- Also, RHEL 6 is not officially supported in Openshift Virtualization due to EOL.
Root Cause
- RHEL 6 does not support the non-transitional virtio device models.
Diagnostic Steps
- Check if
useVirtioTransitionalis defined in the VM object:
$ oc get vm VM_NAME -o yaml
- Check if virtio model used in the disks is 'non-transitional':
$ oc rsh virt-launcher-XXXXX virsh -r dumpxml VM_NAME
<disk type='block' device='disk' model='virtio-non-transitional'>
<driver name='qemu' type='raw' cache='none' error_policy='stop' io='native' discard='unmap'/>
<source dev='/dev/vol-1' index='3'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='ua-vol-1'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
SBR
Product(s)
Components
Category
Tags
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.