Container-native virtualization distributes VirtIO drivers for Microsoft Windows as a
container disk, which is available from the
Red Hat Container Catalog.
To install these drivers to a Windows virtual machine, attach the
container-native-virtualization/virtio-win
container disk to the virtual machine as a SATA CD drive
in the virtual machine configuration file.
Prerequisites
-
Download the container-native-virtualization/virtio-win
container disk from the
Red Hat Container Catalog.
This is not mandatory, because the container disk will be downloaded from the Red Hat registry
if it not already present in the cluster, but it can reduce installation time.
Procedure
-
Add the container-native-virtualization/virtio-win
container disk as a cdrom
disk in the
Windows virtual machine configuration file. The container disk will be
downloaded from the registry if it is not already present in the cluster.
spec:
domain:
devices:
disks:
- name: virtiocontainerdisk
bootOrder: 2 (1)
cdrom:
bus: sata
volumes:
- containerDisk:
image: container-native-virtualization/virtio-win
name: virtiocontainerdisk
1 |
Container-native virtualization boots virtual machine disks in the order defined in the
VirtualMachine configuration file. You can either define other disks for the
virtual machine before the container-native-virtualization/virtio-win container disk or use the optional
bootOrder parameter to ensure the virtual machine boots from the correct disk.
If you specify the bootOrder for a disk, it must be specified for all disks
in the configuration. |
-
The disk is available once the virtual machine has started:
-
If you add the container disk to a running virtual machine, use
oc apply -f <vm.yaml>
in the CLI or reboot the virtual machine for the changes
to take effect.
-
If the virtual machine is not running, use virtctl start <vm>
.
After the virtual machine has started, the VirtIO drivers can be installed from
the attached SATA CD drive.