When I close down the system by executing
I have a virtual machine starting on boot, so while I could just manually run
/sbin/shutdown, it tries to perform a graceful shutdown of all running virtual machines. However I am not sure how the process works, at the moment I assume it just sends ACPI shutdown signal to them once /sbin/shutdown has been executed (so the same as running # vm stop <vm-name>). But as far as I'm concerned it does not wait for the VM shutdown process to fully finish, as when I boot the system again I may see my VM being in a LOCKED state, I presume it happens because the VM was not able to properly shutdown in time before a full system shutdown, and the vm command didn't properly finish its execution and didn't clear the run.lock file. I have a virtual machine starting on boot, so while I could just manually run
# vm stop <vm-name> before a full system-wide shutdown, I'd like to actually properly automate the process, since the functionality of automatic VM shutdown is already present, but in my opinion it is not handled as gracefully as needed. Ungraceful shutdowns can (and if they can - they will) lead to virtual disks' corruption, which already happened to me once.