Problem
When I try to shutdown or restart my KVM Virtual Machine,
the operation is ignored and my VM keeps running. This is
true for both virt-manager and virsh.virsh shutdown definitive-vm
Domain definitive-vm is being shutdownHowever the VM remains in a 'running' state.
virsh listId Name State
----------------------------------------------------
3 definitive-vm running Cause
UW7D and OSR6D does not have the libvirt-client equivalent utilities that enable interaction between the VM and virt-manager (KVM/QEMU).
Solution
To cleanly shutdown or restart your Virtual Machine, login
to the Virtual Machine as root and issue the appropriate
shutdown command, for example:To restart:cd /
/sbin/shutdown -y -g0 -i6To shutdown:cd /
/sbin/shutdown -y -g0If you are unable to login to the virtual machine, then your only option is to force a power-off of the VM from virt-manager or virsh.
Log onto your Linux system use the KVM virt-manager and choose "Force Off", alternatively, you can use virsh to power off the VM:
virsh destroy <VM-domain>-or-virsh destroy definitve-vm
Domain definitive-vm destroyedNOTES: Powering off the VM, without first shutting it down, can
cause filesystem corruption as the system can not stop and
close services normally. This is similar to using a
power-button on a running system.