Friday, May 14, 2010

VirtualBox: start and stop a guest in a headless mode

Lets assume that we have a guest VirtualBox machine called "xp". To start it in a headless mode we can use VBoxHeadless --startvm "xp"To stop it we can use VBoxManage controlvm "xp" savestateSince it is in a headless state we have to access it using a RDP viewer, e.g. rdesktop command in Linux:desktop -u username -p password -a 16 serverIPOf course, before we can use it in this way, we have to enable remote destkop for the "xp" machine and define authentication method. In my case, I used External method, since it uses the linux user account under which my VirtualBox is running.