🏁 Start VirtualBox VM in Headless Mode

• 1 min read • 106 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 🤗

106 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 »
• 2 min read • 692 votes
👨🏼‍💻 Going Indie, Again
Read Post »
• 2 min read • 699 votes
🗓 2019 Year in Review: Prioritizing Health
Read Post »
• 4 min read • 4279 votes
😈 Productive Procrastination
Read Post »
• 6 min read • 401 votes
👔 Quit With Positivity
Read Post »
• 6 min read • 843 votes
🎈 Abandoning the Static Site
Read Post »
• 3 min read • 411 votes
📈 Indie to Acquisition
Read Post »
• 5 min read • 535 votes
🚀 Getting Over the Fear of Launching
Read Post »
×