Execute halt inside the virtual machine doesn't stop the virtual machine

I’ve a ubuntu 14.04 virtual machine running on opennebula and when i exec the halt command inside the virtual machine, the status of this machine continues being RUNNING.

Why?

Roberto Majadas forum@opennebula.org writes:

I’ve a ubuntu 14.04 virtual machine running on opennebula and when i
exec the halt command inside the virtual machine, the status of this
machine continues being RUNNING.

Why?

Do you have ACPI enabled and acpid running in the VM?

Can you give more context information:

  • ONE version
  • physical machine OS

Regards.

Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6 2AAD CC1E 9E5B 7A6F E2DF

I’m using OpenNebula 4.12 on Ubuntu 14.04 with libvirt/KVM and the guest virtual machine it’s a newly installed ubuntu 14.04, with ACPI support enabled in the template, installed in a persistent disk with CD. When i halt the system, the OS run the runlevel 0 but when finish the virtualmachine is already running.

If I shutdown the Ubuntu Server 14.04 on guest with “shutdown -h now” or “poweroff” the OS run runlevel 0 and the close the vnc connection, but the opennebula status continues being RUNNING.

The “halt” command doesn’t close the vnc, the behaviour is different.

Hi Roberto,

Once the VM goes to poweroff (VNC closes), you need to wait a couple of
minutes till the monitoring information reaches OpenNebula. Note that this
is not an OpenNebula initiated transition and it needs the monitoring info
to update the VM status…

Cheers

Ok, if i execute “halt -p” o “shutdown -h now” it works, i mean, the machine poweroff and when opennebula detect it, it changes to POWEROFF state. But if i do “halt” the vm doesn’t poweroff itself. Seems a problem of ubuntu server.

Thanks for all.

I’m seeing the same running on a VMware platform - so it’s almost certainly an issue outside of OpenNebula.