Bootable Volumes
A bootable volume is a ready-to-use boot image that virtual machines can be created from. Each bootable volume is a KubeVirt DataSource (cdi.kubevirt.io/v1beta1) backed by a PVC that CDI populates from an import or clone source. Bootable volumes are aggregated across namespaces — including the shared kube-public namespace where platform "golden images" live — so they can be reused by many virtual machines.
When you create a virtual machine and choose Provision Method > Image Instance, the picker lists the bootable volumes you can boot from.
TOC
NotesView bootable volumesAdd a bootable volumeCreate a virtual machine from a bootable volumeUpdate or delete a bootable volumeNotes
- A bootable volume becomes selectable for virtual-machine creation only when its
DataSourcecarries thevirtualization.cpaas.io/*label contract (operating system, architecture, capacity, storage class, volume mode, access mode). A data source without these labels still appears in the management list but is not offered in the Image Instance picker. - The volume's Status is
Importingwhile CDI populates the backing PVC andReadyonce it can be used. - Local Upload as a source is not yet supported; use HTTP/HTTPS, Registry, Clone PVC, or Clone snapshot.
View bootable volumes
Bootable volumes are backed by DataSource objects and are aggregated across namespaces (including the shared kube-public namespace). List them directly:
Add a bootable volume
A bootable volume supports four source types:
Note: Create bootable volumes in your own project namespace. The shared
kube-publicnamespace holds platform golden images published by a cluster administrator — ordinary project users can consume (clone and boot from)kube-publicimages out of the box, but creating or modifying objects inkube-publicrequires elevated platform permissions.
Adding a bootable volume creates two objects: a DataVolume (CDI imports the image into a PVC) and a DataSource that points at it and carries the label contract. The example imports an image over HTTP:
For the other source types, replace spec.source on the DataVolume:
Apply and watch the import:
Create a virtual machine from a bootable volume
A virtual machine created from a bootable volume defaults to the bootable volume's namespace (a same-namespace clone).
Under the hood, the virtual machine references the data source in a dataVolumeTemplates entry — CDI clones the bootable volume into the new virtual machine's root disk:
The clone source namespace is restricted to the current/target namespace and kube-public. Cloning from another non-public namespace may require additional CDI clone permissions.
Update or delete a bootable volume
Deleting a bootable volume removes its DataSource and the managed DataVolume. The backing PVC is owned by the DataVolume (via ownerReferences), so it is garbage-collected automatically when the DataVolume is deleted — do not delete the PVC while the DataVolume still exists, or CDI will re-provision it. The DataSource, DataVolume, and PVC share the same name:
If CDI already garbage-collected the DataVolume after a successful import, kubectl delete datavolume returns NotFound and the PVC is left without an owner — delete it directly in that case: