Right after creation a VM goes through the states PROLOG and BOOT. During that time drivers copy and start the VM, and OpenNebula does not interrupt them – not even with terminate --hard.
Symptom
[one.vm.action] Error performing action "terminate-hard": Could not terminate VM 16, wrong state BOOT.
In the course a VM is deleted during clean-up that has just been created.
Diagnosis
Look at the state of the VMs – STAT shows whether a VM is still starting.
onevm list
Causes
wrong state BOOTDrivers are working on the VM right now
In PROLOG OpenNebula copies the disks, in BOOT the hypervisor starts the VM. These steps are not aborted halfway.
terminate-hardEven the hard variant waits
--hard skips the orderly shutdown of a running VM, not the driver steps that run while it starts.
Fix
onevm list ID USER GROUP NAME STAT CPU MEM HOST TIME
Don't: Destroy the VM behind OpenNebula's back (virsh) – OpenNebula then loses track of its state.
OpenNebula hands-on, Day 5: virtual networks, address ranges, security groups and clean-up.
Go to day 5 →
FAQ
How long does a VM stay in BOOT?
Usually only seconds; with large images that have to be copied first, PROLOG takes longer.
What is the difference between terminate and terminate --hard?
terminate shuts the VM down cleanly, --hard switches it off immediately – both only once the VM has reached a state such as RUNNING.