🏁 Start VirtualBox VM in Headless Mode

• 1 min read • 108 votes

It is fairly common in web development to run code in a virtual machine (VM) so that you can mirror your production environment. However, using a GUIless operating system through VirtualBox’s GUI window is a terrible experience. Fortunately VirtualBox provides an easy way of starting a VM using their command line tool VBoxManage in a headless mode.

# List virtual machines
VBoxManage list vms
"MyVM" {e4b0c92c-4301-4a7d-8af8-fe02fed00451}

# Start VM in headless mode
VBoxManage startvm MyVM --type headless

# Power off VM
VBoxManage controlvm MyVM poweroff

Once the virtual machine has started you can connect to it over SSH and use it as you would any server operating system.

If you enjoyed this tutorial, please consider sponsoring my work on GitHub 🤗

108 cheers
Now look what you've done 🌋
Stop clicking and run for your life! 😱
Uh oh, I don't think the system can't handle it! 🔥
Stop it, you're too kind 😄
Thanks for the love! ❤️
Thanks, glad you enjoyed it! Care to share?
Hacker News Reddit

More Posts ✍🏻

See All »
• 4 min read • 632 votes
🗓 2020 Year in Review: Life Shuffle
Read Post »
• 2 min read • 1029 votes
👨🏼‍💻 Going Indie, Again
Read Post »
• 2 min read • 700 votes
🗓 2019 Year in Review: Prioritizing Health
Read Post »
• 4 min read • 4283 votes
😈 Productive Procrastination
Read Post »
• 6 min read • 1031 votes
🎈 Abandoning the Static Site
Read Post »
• 6 min read • 430 votes
👔 Quit With Positivity
Read Post »
• 3 min read • 418 votes
📈 Indie to Acquisition
Read Post »
×