Page 1 of 1
Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 31. Jul 2015, 18:09
by LagaV
I would appreciate any hint on how to start an encrypted virtual machine in headless mode?
My search for a commandline parameter to vboxmanage didn't provide any result so far.
Thanks,
LagaV
Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 31. Jul 2015, 18:43
by LagaV
So reading the manual helps..
VBoxManage controlvm "uuid|vmname" addencpassword "id" "password" [--removeonsuspend "yes|no"]
But now I'm stuck with an "Segmentation fault: 11" when using
id as the "originally assigned password, that I also enter when operating in GUI mode.
password to my understanding should be empty aka as -
Any further hints?
LagaV
P.S. Encryption was enabled via GUI mode.
Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 31. Jul 2015, 19:33
by LagaV
Just another update...
I decrypted the complete via GUI and re-encrypted via VBoxManage. Now I have a "password", but still end up with "Segmentation fault: 11"
Any advise?
Thanks,
LagaV
P.S. Host-OS is MacOS OSX Mavericks, guest OS is Ubuntu 14.04
Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 24. Sep 2015, 12:20
by sstefanov
Similar problem here.
the host is win10,
when trying to execute
vboxmanage controlvm vmname addencpassword id password
vboxmanage crashes
in command line help is written that vboxmanage expects password
file, which leads me to the idea that there is a bug in the implementation.
i hope it is fixed soon
Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 22. Jun 2016, 16:14
by M. V.
Sorry,
I also have problem trying to start an encrypted VM in headless mode.
If I use GUI to start VM everything is ok, but in headless mode VM doesn't start successfully and seems to stuck in background (probably for the password).
I found the same problem were asked here about a year ago, but no one has given any answer to it. Does this mean that this is an accepted bug in VirtualBox 5.0 and there is nothing we can do about it?
I would appreciate if anyone answers me.
Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 22. Jun 2016, 19:20
by scottgus1
I was able to start an encrypted headless guest this way:
Code: Select all
Vboxmanage startvm "vmname" --type headless
The guest starts headless but paused.
Then this command is used:
Code: Select all
Vboxmanage controlvm "vmname" addencpassword "identifier" -
then the command asked for the password. After I entered the password the headless machine resumed and booted. the command uses the identifier visible to the left of the password entry textbox when you start the guest normally with a window. The hyphen at the end causes the request for the password in the command window.
I was also able to use a password file instead of a manual entry using this command:
Code: Select all
Vboxmanage controlvm "vmname" addencpassword "identifier" path\to\password\file
after having loaded the password in a text file and giving the path and file name rather than the hyphen.
Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 23. Jun 2016, 09:14
by M. V.
Thank you scottgus1
That did the trick. You're awesome.
I was confused with the meaning of "identifier" parameter, and you're explanation made it clear.
Cheers

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 23. Jun 2016, 13:35
by scottgus1
Glad to help! I don't use encryption in my usual guests, much less start them headless regularly, but it's always a nice feeling to get something unusual working.
Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?
Posted: 20. Oct 2016, 17:41
by scottgus1
A ticket for a slightly-changed command for headless encrypted guests and passwords:
https://www.virtualbox.org/ticket/16091 Update to manual, section 9.31.3: command to enter a password for headless encrypted guests.