vboxmanage-startvm
Start a VirtualBox virtual machine
TLDR
Start a virtual machine
Start a virtual machine with the specified UI mode
Specify a password file to start an encrypted virtual machine
Specify a password ID to start an encrypted virtual machine
Start a virtual machine with an environment variable pair name value
SYNOPSIS
VBoxManage startvm <uuid|name> [--type <gui|sdl|headless>]
PARAMETERS
<uuid|name>
The unique identifier (UUID) or the registered name of the virtual machine to be started. This is a mandatory argument to specify which VM to operate on.
--type <gui|sdl|headless>
Specifies the type of session for the virtual machine.
gui: (Default) Starts the VM and opens a full graphical user interface window.
sdl: Starts the VM and opens a simpler window using the Simple DirectMedia Layer (SDL) library.
headless: Starts the VM completely in the background without any graphical window. This mode is ideal for server environments or when the VM is accessed via RDP/SSH.
DESCRIPTION
VBoxManage startvm is a powerful subcommand of the VBoxManage utility, which serves as the command-line interface for Oracle VM VirtualBox. This command is used to initiate or resume the execution of a registered virtual machine. It's a fundamental tool for automating VM operations, especially in server environments, scripting, or CI/CD pipelines where a graphical user interface is not desired or available.
When executed, startvm powers on the specified virtual machine and, depending on the chosen type, opens a graphical window (GUI or SDL) or runs it completely in the background (headless mode). It allows administrators and developers to programmatically control VM lifecycle, making it an essential part of managing VirtualBox instances without direct interaction with the VirtualBox GUI application. This command ensures efficient resource utilization and enables seamless integration of virtualized environments into automated workflows.
CAVEATS
- Resource Availability: Ensure your host machine has sufficient RAM, CPU, and disk resources available for the VM to start successfully.
- VM State: If a VM was not properly shut down (e.g., powered off abruptly), it might require a 'discard saved state' or 'poweroff' command using VBoxManage controlvm before it can be started cleanly.
- Permissions: The user running VBoxManage must have appropriate permissions to access VirtualBox configuration files and directories.
- Path: Ensure VBoxManage is in your system's PATH, or provide its full path (e.g., /usr/bin/VBoxManage on Linux).
- Conflicting Sessions: A VM cannot be started if another session for the same VM is already active.
FINDING VM IDENTIFIERS
Before starting a VM, you might need its exact name or UUID. You can obtain a list of all registered VMs and their identifiers using the command: VBoxManage list vms.
HEADLESS MODE FOR SERVERS
The --type headless option is particularly valuable in server environments or CI/CD pipelines where VMs need to run without a GUI. This mode conserves host resources by not rendering a display and allows for remote management via RDP (if configured) or SSH to the guest OS.
HISTORY
Oracle VM VirtualBox, initially developed by Innotek GmbH, introduced VBoxManage as its primary command-line interface from its early versions. When Sun Microsystems acquired Innotek in 2008 and subsequently Oracle acquired Sun in 2010, VBoxManage continued to be a core and continuously developed component. The startvm subcommand has been present since the initial releases, reflecting the fundamental need for programmatic control over VM lifecycle. Its functionality has evolved alongside VirtualBox's features, supporting new session types and error handling mechanisms to provide robust automation capabilities.
SEE ALSO
VBoxManage(1), VBoxManage list vms(1), VBoxManage controlvm(1), VBoxManage showvminfo(1), VBoxManage registervm(1)