I tend to create a lot of proofs of concept, be it applications or servers, and this process will usually start with spinning up a VM. For this I prefer to use Oracle’s VirtualBox mainly because it’s free and easy to use.
However, using VirtualBox each time I want to start and stop the VM isn’t great as it will open up the VM in a new window and you need to have both the VM window and VirtualBox running on your machine at the same time.
Luckily you can use the “start” command to run VirtualBox’s VBoxHeadless application to boot up a VM without starting VirtualBox itself and without having a window open, other than the command line.
start "Build Server VM" /D"C:\Program Files\Oracle\VirtualBox\" /MIN VBoxHeadless.exe --startvm "Server 2008 32"
Just make sure the name of the VM at the end of the command is the same as that within VirtualBox:
You can then access this via RDP (if your VM is windows) or SSH (if it’s Linux), as can anyone else on your network, should you have configured its network settings correctly.