Hi All,
KubeVirt recently added declarative volume hotplug support for VirtualMachines [1]. This functionality will be available in KubeVirt version 1.6. This email contains important information about migrating from the existing hotplug approach.
What's New:
- New "DeclarativeHotplugVolumes" feature gate enables declarative volume hotplug
- Volumes can now be hotplugged by directly editing the VirtualMachine spec
- CD-ROM inject/eject is now supported
IMPORTANT - Breaking Change:
Declarative hotplug is incompatible with the existing "HotplugVolumes" feature gate. Key differences:
1. Ephemeral volumes are not supported - The declarative API cannot handle volumes that are hotplugged to a VMI but not persisted in the VirtualMachine definition
2. Automatic cleanup - If you switch from "HotplugVolumes" to "DeclarativeHotplugVolumes", all ephemeral hotplug volumes will be unplugged the next time the VM reconciles
Migration Path:
- If you only used 'virtctl addvolume' with the '--persist' flag, you should be unaffected
- If you have ephemeral hotplug volumes, you'll need to either:
- Convert them to persistent volumes before switching, or
- Accept that they will be unplugged during the transition
Feature Gate Precedence:
- "HotplugVolumes" is now deprecated in favor of "DeclarativeHotplugVolumes"
- If both feature gates are enabled, "HotplugVolumes" takes precedence to prevent unexpected volume unplugging
- Subresource APIs remain available for VirtualMachines and standalone VirtualMachineInstances
Action Required:
Please review your current hotplug volume usage before enabling "DeclarativeHotplugVolumes" to avoid unexpected behavior.
[1]
https://github.com/kubevirt/kubevirt/pull/13847Questions, comments, or concerns are welcome.
Best,
Mike