Detach a running machine would improve a lot my vbox usage. Thanks!
However, I really don't get why the --separate is needed in machine startvm.
If a user can:
1) start a vm without separate
2) close vm saving its state
3) restore vm with separate
4) close leaving it running
4.1) vm is detached
VBox has all needed resources to:
1) start a vm without separate
2) close vm asking to leave it running
2.1) vbox enable "separate"
2.2) vm is detached
Enabling "separate" using saving/restore already works. It is not ideal but it is better than nothing. I've being using this to convert headless2gui or gui2headless for years. If the "separate activation" could skip the save/restore step (just pause the machine and keep it in memory), I guess that the downtime, if needed, would be neglectable.
From what I understand, "separate" is actually simply a headless VM (with a optional gui client). I can even attach to a headless VM started without any --separate option. I understand that the client-gui/server-headless comm introduces overhead. However, if there is a fast way to do what a "save gui/restore as headless" does, simply convert the machine to headless/gui as needed and avoid any overhead.
For example:
a) when a gui vm is closed, if selected "leave it running", convert to headless vm
b) when a headless vm is doubleclicked on gui, covert it to gui vm
Also, "ask to attach to a running VM" using "startvm" arg is really confusing. Start a VM but no?
I would add:
VBoxManage attachvm xxxx (convert a headless vm to gui vm)
VBoxManage detachvm xxxx (convert a gui vm to headless vm)
If overhead is solved, I guess there is no need to add a special attach to Virtualbox, as its usage would be on GUI. CUI is for VboxManage.
BTW, I can attach a VM twice
. The result is that video on the first VM is frozen until second "session" is closed, but every other input/change is kept working. Seems like a bug.