Supposing this is how my Oracle VirtualBox machines are being started:

VBoxManage startvm "vmname" --type headless

VBoxManage controlvm "vmname" addencpassword "vmname" "/home/user/vm-name-password"

How do I make the command read the password from standard input on terminal?

Rationale: For security reasons I don't want those passwords stored on the server.

1 Answer 1


After running:

VBoxManage startvm "vmname" --type headless

The following command should ask for the password:

VBoxManage controlvm "vmname" addencpassword "identifier" -

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .