You can target a specific CPU architecture when you import a virtual machine (VM) image from an Open Container Initiative (OCI) image index by setting the platform.architecture field in the DataVolume custom resource (CR).
|
|
Specifying CPU architecture for data volume imports is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
|
In heterogeneous clusters where nodes run different CPU architectures, importing the correct image variant is essential.
Without specifying the target architecture, the imported image might not match the architecture of the node where the VM is scheduled to run.
The platform.architecture field resolves this by selecting the appropriate variant from the image index.
The following CPU architectures are supported:
When you set the platform.architecture field in combination with pullMethod: node, OKD Virtualization adds a node selector to the importer pod.
This node selector ensures that the importer pod runs on a node with the matching CPU architecture.
The node pull method uses the container runtime cache of the node where the importer pod runs, so the pod must run on a node with the correct architecture.
Without the node selector, the importer pod might run on a node with a different architecture, resulting in a mismatch between the pulled image and the target platform.
apiVersion: cdi.kubevirt.io/v1beta1
kind: DataVolume
metadata:
name: my-vm-image
spec:
source:
registry:
url: "docker://registry.example.com/my-multi-arch-image:latest"
pullMethod: node
platform:
architecture: arm64
storage:
resources:
requests:
storage: 30Gi