|
| 1 | +# VirtualMachineInstanceHasEphemeralHotplugVolume |
| 2 | + |
| 3 | +## Meaning |
| 4 | + |
| 5 | +The `VirtualMachineInstanceHasEphemeralHotplugVolume` alert is triggered when a |
| 6 | +Virtual Machine Instance (VMI) contains an Ephemeral Hotplug Volume, which is defined |
| 7 | +as a hotplug volume that only exists in the VMI and will not persist during VM restart |
| 8 | + |
| 9 | +## Impact |
| 10 | + |
| 11 | +The `HotplugVolumes` Feature Gate will be deprecated in a future release and will |
| 12 | +be replaced by the `DeclarativeHotplugVolumes` Feature Gate. The two are mutually |
| 13 | +exclusive, and when `DeclarativeHotplugVolumes` is enabled, any remaining |
| 14 | +ephemeral hotplug volumes will automatically be unplugged from any VMIs. |
| 15 | + |
| 16 | +If this alert is triggered, it is to inform of this future deprecation and to |
| 17 | +suggest steps to convert ephermeral volumes to persist ones. |
| 18 | + |
| 19 | +## Diagnosis |
| 20 | + |
| 21 | +To diagnose the cause of this alert, the following steps can be taken: |
| 22 | + |
| 23 | +1. Find each VM that contains an ephemeral hotplug volume. |
| 24 | + This command will print out list entries in format [vm-name, namespace] |
| 25 | + ``` bash |
| 26 | + $ kubectl get vmis -A -o json | jq -r '.items[].metadata | select(.annotations | has("kubevirt.io/ephemeral-hotplug-volumes")) | [.name , .namespace] | @tsv' |
| 27 | + ``` |
| 28 | +2. For each VM listed, find the volumes that need to be patched. |
| 29 | + |
| 30 | + ``` bash |
| 31 | + $ kubectl get vmis <vm-name> -n <namespace> -o json | jq -r '.metadata.annotations."kubevirt.io/ephemeral-hotplug-volumes"' |
| 32 | + ``` |
| 33 | + |
| 34 | +## Mitigation |
| 35 | + |
| 36 | +To mitigate the impact of this alert, consider converting these ephemeral |
| 37 | +hotplug volumes to instead persist within the VM. |
| 38 | + |
| 39 | +To do so: |
| 40 | +``` bash |
| 41 | +$ virtctl addvolume <vm-name> --volume-name=<volume-name> --persist |
| 42 | +``` |
| 43 | + |
| 44 | +<!--DS: If you cannot resolve the issue, log in to the |
| 45 | +link:https://access.redhat.com[Customer Portal] and open a support case, |
| 46 | +attaching the artifacts gathered during the diagnosis procedure.--> |
| 47 | +<!--USstart--> |
| 48 | +If you cannot resolve the issue, see the following resources: |
| 49 | + |
| 50 | +- [OKD Help](https://okd.io/docs/community/help/) |
| 51 | +- [#virtualization Slack channel](https://kubernetes.slack.com/channels/virtualization) |
| 52 | +<!--USend--> |
0 commit comments