Automatically restoring running VirtualBox VMS after restart
VirtualBox has a built in solution for automatically starting and stopping vitual machines, as it is well explained in this post . However, I have a lot of virtual machines, and depending on what I am doing a different set of machines are running. I am not in a critical environment, therefore my vm host is set to automatically install updates, and if needed restart. In order not to loose the virtual machines I have written a small systemd service, which on shutdown saves all running virtual machine states and on restart starts them again.