-
Bug
-
Resolution: Won't Do
-
Undefined
-
None
-
0.42
-
False
-
False
-
CLOSED
-
Undefined
-
---
-
---
-
Urgent
-
No
In order to bring up RHEL6 virtio devices for a vm we are currently using the kubevirt.io/placePCIDevicesOnRootComplex in order to use the legacy virtio block drivers which are available in RHEL6. There is no support for this in CNV 1.4
kubevirt template:
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
labels:
kubevirt.io/vm: %HOST%
name: %HOST%
namespace: virtualmachines
spec:
dataVolumeTemplates:
- metadata:
annotations:
kubevirt.io/provisionOnNode: %NODE%
creationTimestamp: null
name: mybuild6v10-os
spec:
pvc:
accessModes: - ReadWriteOnce
resources:
requests:
storage: 25Gi
storageClassName: kubevirt-hostpath-provisioner
source:
blank: {}
status: {}
running: true
template:
metadata:
annotations:
kubevirt.io/placePCIDevicesOnRootComplex: "true"
creationTimestamp: null
labels:
kubevirt.io/vm: %HOST%
spec:
domain:
cpu:
cores: 2
model: host-passthrough
sockets: 2
threads: 1
devices:
disks: - bootOrder: 2
disk:
bus: virtio
pciAddress: "0000:00:03.0"
name: os-disk
interfaces: - bootOrder: 1
bridge: {}
macAddress: %MAC%
name: vnic0
networkInterfaceMultiqueue: true
features:
acpi:
enabled: true
machine:
type: ""
resources:
requests:
cpu: "3"
memory: 16Gi
networks: - multus:
networkName: vlan0
name: vnic0
terminationGracePeriodSeconds: 10
volumes: - dataVolume:
name: mybuild6v10-os
name: os-disk
—
This results in something like:
virsh # dumpxml virtualmachines_mybuild6v10.etc.test.domain
<domain type='kvm' id='1'>
<name>virtualmachines_mybuild6v10.etc.test.domain</name>
<uuid>228d4450-5ccc-11fa-b0f0-0050666d427d</uuid>
<metadata>
<kubevirt xmlns="http://kubevirt.io">
<uid>edf29e4c-0ed8-11eb-a8f0-f04da20b8666</uid>
<graceperiod>
<deletionGracePeriodSeconds>10</deletionGracePeriodSeconds>
</graceperiod>
</kubevirt>
</metadata>
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>
<vcpu placement='static'>4</vcpu>
<iothreads>1</iothreads>
<resource>
<partition>/machine</partition>
</resource>
<sysinfo type='smbios'>
<system>
<entry name='uuid'>228d4450-5ccc-11fa-b0f0-0050666d427d</entry>
</system>
</sysinfo>
<os>
<type arch='x86_64' machine='pc-q35-rhel7.6.0'>hvm</type>
</os>
<features>
<acpi/>
</features>
<cpu mode='host-passthrough' check='none'>
<topology sockets='2' cores='2' threads='1'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='none' queues='3'/>
<source file='/var/run/kubevirt-private/vmi-disks/os-disk/disk.img'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<boot order='2'/>
<alias name='ua-os-disk'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</disk>
<controller type='usb' index='0' model='none'>
<alias name='usb'/>
</controller>
<controller type='sata' index='0'>
<alias name='ide'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'>
<alias name='pcie.0'/>
</controller>
<controller type='virtio-serial' index='0'>
<alias name='virtio-serial0'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x10'/>
<alias name='pci.1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
<controller type='pci' index='2' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='2' port='0x11'/>
<alias name='pci.2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='3' port='0x12'/>
<alias name='pci.3'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<interface type='bridge'>
<mac address='fe:f1:f0:de:ad:bf'/>
<source bridge='k6t-net1'/>
<target dev='vnet0'/>
<model type='virtio'/>
<driver name='vhost' queues='3'/>
<mtu size='1500'/>
<boot order='1'/>
<alias name='ua-vnic0'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
<serial type='unix'>
<source mode='bind' path='/var/run/kubevirt-private/edf29e4c-0ed8-11eb-a8f0-f04da20b8666/virt-serial0'/>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
<alias name='serial0'/>
</serial>
<console type='unix'>
<source mode='bind' path='/var/run/kubevirt-private/edf29e4c-0ed8-11eb-a8f0-f04da20b8666/virt-serial0'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-1-virtualmachines_myb/org.qemu.guest_agent.0'/>
<target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
<alias name='channel0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='mouse' bus='ps2'>
<alias name='input0'/>
</input>
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
<graphics type='vnc' socket='/var/run/kubevirt-private/edf29e4c-0ed8-11eb-a8f0-f04da20b8666/virt-vnc'>
<listen type='socket' socket='/var/run/kubevirt-private/edf29e4c-0ed8-11eb-a8f0-f04da20b8666/virt-vnc'/>
</graphics>
<video>
<model type='vga' vram='16384' heads='1' primary='yes'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<memballoon model='none'/>
</devices>
<seclabel type='dynamic' model='dac' relabel='yes'>
<label>+107:+107</label>
<imagelabel>+107:+107</imagelabel>
</seclabel>
</domain>
—
the system fails to boot or find the virtio drive