VirtualBox – command line

Before you start up a VM

In order to get the networking of your headless VM up and running, you have to install the VirtualBox extension pack. Here’s how.

  1. Download the extension pack that matches your VirtualBox release.
  2. Open the VirtualBox GUI.
  3. Click File -> Preferences.
  4. Navigate to where you saved the Extension Pack and select the .vbox-extension_pack.
  5. When prompted, type your admin password for the host machine.

Starting / stopping / pausing a VM

All of my available VMs
VBoxManage list vms

Say we want to run the “macOS_Catalina DELL” VM as a headless instance.
To do this, you would issue the command:

VBoxManage startvm "macOS_Catalina DELL" --type headless

The VM will start up and hand you back your bash prompt. Your virtual server is now available to you.

 

If you need to pause that VM:

VBoxManage controlvm "macOS_Catalina DELL" pause --type headless

To restart that paused VM:

VBoxManage controlvm "macOS_Catalina DELL" resume --type headless

To shut down the VM:

VBoxManage controlvm "macOS_Catalina DELL" poweroff --type headless

Was this article helpful?

Related Articles

Leave A Comment?