Brad Dickinson

An Introduction to the VirtualBox CLI

The content below is taken from the original (An Introduction to the VirtualBox CLI), to continue reading please visit the site. Remember to respect the Author & Copyright.

This post provides a basic introduction to the VirtualBox CLI (command-line interface) tool, vboxmanage. This post does not attempt to replace the comprehensive documentation; rather, its purpose is to help users who are new to vboxmanage (such as myself, having recently adopted VirtualBox for my Vagrant environments) get somewhat up to speed as quickly and as painlessly as possible.

Basic Commands

Let’s start with some basic operations. Here are a few to get you started:

Viewing and Modifying the Configuration of a Stopped VM

To view the information about a VM, run vboxmanage showvminfo <name or UUID>. Because this command is “read only” (it doesn’t attempt to modify the configuration of the VM in any way), you can use this on running, paused, or stopped VMs.

To change the configuration of a stopped VM, you’ll use the modifyvm keyword to vboxmanage. Here are some quick examples of modifying the configuration of a stopped VM:

Note that these commands won’t work on a paused VM; the VM must actually be shutdown/stopped. If the VM isn’t stopped, then you’ll need to switch from the modifyvm command to the controlvm command, as described in the next section.

Modifying the Configuration of a Running VM

Not all configuration options can be modified for a running VM, but for those that can you can use the controlvm subcommand. I’ve already discussed the controlvm subcommands that affect VM state (pause, resume, reset, poweroff, and savestate); here are a few more that you might find useful:

Obviously, this is only a subset of what you can do with vboxmanage; use vboxmanage <command> help to get more information on the options available for each command. What I’ve included here will help you at least get started. Have fun!

Exit mobile version