1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/virt-adding-container-disk-as-cd.adoc
2025-11-18 16:29:25 +01:00

63 lines
2.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * virt/virtual_machines/virt-installing-virtio-drivers-on-new-windows-vm.adoc
//This file contains UI elements and/or package names that need to be updated.
:_mod-docs-content-type: PROCEDURE
[id="virt-adding-container-disk-as-cd_{context}"]
= Installing VirtIO drivers from a container disk added as a SATA CD drive
[role="_abstract"]
You can install VirtIO drivers from a container disk that you add to a Windows virtual machine (VM) as a SATA CD drive.
[TIP]
====
Downloading the `container-native-virtualization/virtio-win` container disk from the link:https://catalog.redhat.com/software/containers/search?q=virtio-win&p=1[Red Hat Ecosystem Catalog] is not mandatory, because the container disk is downloaded from the Red Hat registry if it not already present in the cluster. However, downloading reduces the installation time.
====
.Prerequisites
* You must have access to the Red Hat registry or to the downloaded `container-native-virtualization/virtio-win` container disk in a restricted environment.
* You have installed the `virtctl` CLI.
* You have installed the {oc-first}.
.Procedure
. Add the `container-native-virtualization/virtio-win` container disk as a CD drive by editing the `VirtualMachine` manifest:
+
[source,yaml]
----
# ...
spec:
domain:
devices:
disks:
- name: virtiocontainerdisk
bootOrder: 2 <1>
cdrom:
bus: sata
volumes:
- containerDisk:
image: container-native-virtualization/virtio-win
name: virtiocontainerdisk
----
<1> {VirtProductName} boots the VM disks in the order defined in the `VirtualMachine` manifest. You can either define other VM disks that boot before the `container-native-virtualization/virtio-win` container disk or use the optional `bootOrder` parameter to ensure the VM boots from the correct disk. If you configure the boot order for a disk, you must configure the boot order for the other disks.
. Apply the changes:
* If the VM is not running, run the following command:
+
[source,terminal]
----
$ virtctl start <vm> -n <namespace>
----
* If the VM is running, reboot the VM or run the following command:
+
[source,terminal]
----
$ oc apply -f <vm.yaml>
----
. After the VM has started, install the VirtIO drivers from the SATA CD drive.