VM in shutdown mode but I can interact with it via the console. virsh shows it's running

I have a VM in SHUTDOWN mode like this:

But it’s running when checking from virsh:

[root@mdskvm-p02 mnt]# virsh list
Id    Name                           State
----------------------------------------------------
 4     one-23                         running
 8     one-27                         running

[root@mdskvm-p02 mnt]#

Shutdown options are grayed out.

Is there anyway out of this condition?

Thx,

Hi @TomK,

It looks like the VM is hang.

Do you have the ACPI Feature enabled in the VM Template and the acpid service running inside the VM?

To resolve this you could take a look at /var/lib/one/remotes/etc/vmm/kvm/kvmrc . Check SHUTDOWN_TIMEOUT and FORCE_DESTROY variables.

Hope this helps.

Best Regards,
Anton Todorov

Hi @TomK,

It looks like the VM is hang.

Do you have the ACPI Feature enabled in the VM Template and the acpid service running inside the VM?

Nope. Neither was enabled. However, the VM was still responding to my keystrokes. Wasn’t hung.

To resolve this you could take a look at /var/lib/one/remotes/etc/vmm/kvm/kvmrc . Check SHUTDOWN_TIMEOUT and FORCE_DESTROY variables.

I manged to nudge it back into a POWEROFF state. I did a virsh destroy one-27. At this point I could see it in POWEROFF state in the UI. I did all this so I can change the VM boot order using:

onevm updateconf 17

( Only possible in POWEROFF mode. )

Hope this helps.

Best Regards,
Anton Todorov

Similar case just happened on a Terminate call. VM fails to terminate when stuck at the bios boot phase, specifically when trying to boot from disk (off a partial install). Terminate fails but the VM stays in the UI.

Have to run virsh destroy 10 to kill the VM then it disappears from the UI:

[root@mdskvm-p02 ~]# virsh list
 Id    Name                           State
----------------------------------------------------
 4     one-23                         running
 10    one-28                         running

[root@mdskvm-p02 ~]#
[root@mdskvm-p02 ~]#
[root@mdskvm-p02 ~]#
[root@mdskvm-p02 ~]# virsh destroy 10
Domain 10 destroyed

[root@mdskvm-p02 ~]# virsh list
 Id    Name                           State
----------------------------------------------------
 4     one-23                         running

[root@mdskvm-p02 ~]#

Thx,

So enabling FORCE_DESTROY should help in these cases

Apologies, I think you mean setting that in the ON UI? Then restarting Sunstone / One ?

[root@one01 media]# cat /var/lib/one/remotes/etc/vmm/kvm/kvmrc|grep -Ei FORCE
# Uncomment this line to force VM cancellation after shutdown timeout
#export FORCE_DESTROY=yes
# Uncomment this line to force VM's without ACPI enabled to be destroyed
[root@one01 media]#

Thx,