-
Bug
-
Resolution: Done-Errata
-
Major
-
CNV v4.20.0
-
None
-
Quality / Stability / Reliability
-
3
-
False
-
-
False
-
CNV v4.20.0.rhel9-131
-
-
CNV Virt-Cluster Sprint 274
-
None
I am asking in the context of https://issues.redhat.com/browse/RHEL-82193 / https://github.com/ClusterLabs/fence-agents/pull/616 .
If I have a completely uncooperative vm like
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: emptyvm
spec:
runStrategy: Always
template:
spec:
domain:
devices:
disks:
- disk:
bus: virtio
name: emptydisk
rng: {}
features:
acpi: {}
smm:
enabled: true
firmware:
bootloader:
efi:
secureBoot: true
resources:
requests:
memory: 1Gi
terminationGracePeriodSeconds: 180
volumes:
- emptyDisk:
capacity: 1Gi
name: emptydisk
even
virtctl stop --force --grace-period 0 emptyvm
seems like to wait for the full 180 seconds grace period. Is this expected, or is there an alternative way of stopping the VM more quickly?
dholler@t14:~$ virtctl start emptyvm
VM emptyvm was scheduled to start
dholler@t14:~$ oc get -o yaml vmi/emptyvm | grep terminationGracePeriodSeconds
terminationGracePeriodSeconds: 180
dholler@t14:~$ virtctl stop --force --grace-period 0 emptyvm
VM emptyvm was scheduled to stop
dholler@t14:~$ oc get -o yaml vmi/emptyvm | grep terminationGracePeriodSeconds
terminationGracePeriodSeconds: 0
dholler@t14:~$ virtctl version
Client Version: version.Info{GitVersion:"v1.5.1-2-g1334585db8", GitCommit:"1334585db807030eb4a385d23a021f941d564ed8", GitTreeState:"clean", BuildDate:"2025-05-09T20:05:14Z", GoVersion:"go1.23.6 (Red Hat 1.23.6-2.el9_6) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{GitVersion:"v1.5.2-19-gf58b2efb09", GitCommit:"f58b2efb094c04bbbfb91853f684f1144071b2a1", GitTreeState:"clean", BuildDate:"2025-07-01T06:20:59Z", GoVersion:"go1.23.9 (Red Hat 1.23.9-1.el9_6) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
on cnv2:
OpenShift Virtualization 4.19.1-24 provided by Red Hat
Current behavior: the VM waited for the full initial grace period to be stoped
Expected behavior: the VM is stoped instantly
- blocks
-
RHEL-82193 fence_kubevirt uses graceful shutdown to power off/reboot VM, times out and fails.
-
- Closed
-
- is cloned by
-
CNV-67024 Stop api should reject --grace-period!=0 flag
-
- New
-
-
CNV-67196 [cnv-4.19] Cannot enforce stopping a VM
-
- Closed
-
- is depended on by
-
RHEL-82193 fence_kubevirt uses graceful shutdown to power off/reboot VM, times out and fails.
-
- Closed
-
- links to
-
RHEA-2025:150257
OpenShift Virtualization 4.20.0 Images