The VirtualMachineInstanceHasEphemeralHotplugVolume alert is triggered when a
Virtual Machine Instance (VMI) contains an Ephemeral Hotplug Volume, which is defined
as a hotplug volume that only exists in the VMI and will not persist during VM restart
The HotplugVolumes Feature Gate will be deprecated in a future release and will
be replaced by the DeclarativeHotplugVolumes Feature Gate. The two are mutually
exclusive, and when DeclarativeHotplugVolumes is enabled, any remaining
ephemeral hotplug volumes will automatically be unplugged from any VMIs.
If this alert is triggered, it is to inform of this future deprecation and to suggest steps to convert ephermeral volumes to persist ones.
To diagnose the cause of this alert, the following steps can be taken:
$ kubectl get vmis -A -o json | jq -r '.items[].metadata | select(.annotations | has("kubevirt.io/ephemeral-hotplug-volumes")) | [.name , .namespace] | @tsv'
For each VM listed, find the volumes that need to be patched.
$ kubectl get vmis <vm-name> -n <namespace> -o json | jq -r '.metadata.annotations."kubevirt.io/ephemeral-hotplug-volumes"'
To mitigate the impact of this alert, consider converting these ephemeral hotplug volumes to instead persist within the VM.
To do so:
$ virtctl addvolume <vm-name> --volume-name=<volume-name> --persist
If you cannot resolve the issue, see the following resources: