Quick Intro to VBoxManage

By | 2011/04/15

VBoxManage is the command line utility to manage all things VirtualBox. VirtualBox geeks will all tell you that there is much more you can do with VBoxManage – many things that are not written into the GUI. Below is a simple intro to VBoxManage!

1. List your available virtual machines:

VBoxManage list vms

stmiller@brahms:~$ VBoxManage list vms
"Windows7" {5000a009-ec54-46ae-8952-3ba2f0780097}
"xp32bit" {a0707816-7f79-450a-96f1-35f83a080cff}
"Centos" {a050337e-bb39-41a1-9402-c9dadd4724c9}
"Ubuntu_10_10" {36b57c05-d6b6-404f-9c97-e385fdddcc00}
"Ubuntu_11_04" {ba762433-3d8b-4c5a-864f-33069c23064c}
"OSX_10_6" {d707e411-21f3-4afc-aba1-67d0743a7f29}
"Debian_6" {633c1f0e-8c6b-48d5-b7b7-4128dd47ad84}
"Suse_11_4" {f5bd68bc-887a-4207-a0f5-b647cd3eb2f2}
"Windows_Server_2008_R2" {26a581b3-0268-4466-8095-9229c45a4cbb}
"live_linux" {84dfd459-dca4-42c9-9942-163db0b1f01b}

2. Show configuration info about a vm:

VBoxManage showvminfo “Ubuntu_10_10”

stmiller@brahms:~$ VBoxManage showvminfo "Ubuntu_10_10"
Name:            Ubuntu_10_10
Guest OS:        Ubuntu
UUID:            36b57c05-d6b6-404f-9c97-e385fdddcc00
Config file:     /home/stmiller/.VirtualBox/Machines/Ubuntu_10_10/Ubuntu_10_10.xml
Snapshot folder: /home/stmiller/.VirtualBox/Machines/Ubuntu_10_10/Snapshots
Log folder:      /home/stmiller/.VirtualBox/Machines/Ubuntu_10_10/Logs
Hardware UUID:   36b57c05-d6b6-404f-9c97-e385fdddcc00
Memory size:     1024MB
Page Fusion:     off
VRAM size:       12MB
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): HardDisk
Boot Device (3): Not Assigned
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
PAE:             on
Time offset:     0 ms
RTC:             UTC
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
State:           powered off (since 2011-04-15T16:18:48.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA Controller
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      1
Storage Controller Bootable (1):        on
IDE Controller (1, 0): Empty
SATA Controller (0, 0): /home/stmiller/.VirtualBox/HardDisks/Ubuntu_10_10.vdi (UUID: 9a928f80-b57f-4832-92ea-08885760f77f)
NIC 1:           MAC: 0800270F33AC, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0
NIC 1 Settings:  MTU: 0, Socket( send: 64, receive: 64), TCP Window( send:64, receive: 64)
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
Audio:           enabled (Driver: ALSA, Controller: AC97)
Clipboard Mode:  Bidirectional
VRDE:            enabled (Address, Ports 3389, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
Video redirection: disabled
VRDE property: TCP/Ports  = "3389"
VRDE property: TCP/Address = 
VRDE property: VideoChannel/Enabled = "false"
VRDE property: VideoChannel/Quality = "75"
VRDE property: Client/DisableDisplay = 
VRDE property: Client/DisableInput = 
VRDE property: Client/DisableAudio = 
VRDE property: Client/DisableUSB = 
VRDE property: Client/DisableClipboard = 
VRDE property: Client/DisableUpstreamAudio = 
USB:             enabled

USB Device Filters:

Available remote USB devices:

Currently Attached USB Devices:

Shared folders:  

VRDE Connection:    not active
Clients so far:     0


OS type:                             Ubuntu
Additions run level:                 0
Configured memory balloon size:      0 MB

3. Start a vm:

VBoxManage startvm ‘name’

VBoxManage startvm “name” -type headless

Optionally add “-type headless” at the end if you are remotely starting a vm. Otherwise it will throw errors complaining of not being able to open a display:

stmiller@brahms:~$ VBoxManage startvm "Ubuntu_10_10"
Waiting for the remote session to open...
ERROR: Virtual machine 'name' has terminated unexpectedly during startup
Details: code NS_ERROR_FAILURE (0x80004005), component Machine, interface IMachine, callee 

stmiller@brahms:~$ VBoxManage startvm "Ubuntu_10_10" -type headless
Waiting for the VM to power on...
VM has been successfully started.

4. List your currently running vms:

VBoxManage list runningvms

stmiller@brahms:~$ VBoxManage list runningvms
"Ubuntu_10_10" {36b57c05-d6b6-404f-9c97-e385fdddcc00}

5. Pause / resume / reset / poweroff / savestate of your currently running vm:

VBoxManage controlvm “name” pause|resume|reset|poweroff|savestate

stmiller@brahms:~$ VBoxManage controlvm Ubuntu_10_10 poweroff

That should get you started! RTFM and good luck!