Starting encrypted VM (Virtualbox 5.0) in headless mode?

This is for discussing general topics about how to use VirtualBox.
Post Reply
LagaV
Posts: 3
Joined: 31. Jul 2015, 18:07

Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post 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
LagaV
Posts: 3
Joined: 31. Jul 2015, 18:07

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post by LagaV »

So reading the manual helps.. :wink:

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.
LagaV
Posts: 3
Joined: 31. Jul 2015, 18:07

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post 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
sstefanov
Posts: 1
Joined: 24. Sep 2015, 12:12

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post 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
M. V.
Posts: 2
Joined: 22. Jun 2016, 16:01

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post 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.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post 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.
M. V.
Posts: 2
Joined: 22. Jun 2016, 16:01

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post 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 :)
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post 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.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Starting encrypted VM (Virtualbox 5.0) in headless mode?

Post 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.
Post Reply