vboxmanage-createvm
Create a new Virtual Machine definition
TLDR
Create a new VM with default settings
Set the base folder where the VM configuration will be stored
Set the guest OS type (one of VBoxManage list ostypes) for the imported VM
Register the created VM in VirtualBox
Set the VM to the specified groups
Set the Universally Unique Identifier (UUID) of the VM
Set the cipher to use for encryption
SYNOPSIS
vboxmanage createvm --name <name> --ostype <ostype> [
[--uuid <uuid>]
[--group <group>]
[--basefolder <folder>]
[--register | --unregister]
[--default]]
PARAMETERS
--name <name>
(Mandatory) Specifies the name of the new virtual machine. This name must be unique among all registered VMs.
--ostype <ostype>
(Mandatory) Defines the operating system type for the VM. This helps VirtualBox set optimal default settings for the virtual hardware. Use vboxmanage list ostypes to see a list of valid types.
--uuid <uuid>
Assigns a specific UUID to the VM instead of generating a random one. UUIDs are unique identifiers for VMs.
--group <group>
Assigns the new VM to a logical group. Groups help organize multiple VMs in the VirtualBox Manager.
--basefolder <folder>
Specifies the absolute path to the directory where the VM's configuration file and associated data will be stored. If not specified, VirtualBox's default VM folder is used.
--register
(Default behavior) Registers the newly created VM with VirtualBox, making it visible in the VirtualBox Manager and accessible via other vboxmanage commands.
--unregister
Creates the VM configuration file but does not register it with VirtualBox. This can be useful if you plan to move or copy the VM before registering it manually.
--default
Marks this VM as the default machine (less commonly used with createvm).
DESCRIPTION
The vboxmanage createvm command is a fundamental tool within Oracle VirtualBox for setting up a new virtual machine (VM) definition. It creates the necessary configuration file (.vbox file) for a VM, establishing its basic properties such as its name, operating system type, and storage location. This command does not create a virtual hard disk or install an operating system; it merely prepares the virtual machine's empty shell. After creating the VM, you would typically use other vboxmanage commands like modifyvm to configure its hardware (e.g., RAM, CPU, network adapters) and createmedium disk or storageattach to connect virtual hard disks. The createvm command is the initial step in a multi-step process to deploy a fully functional virtual machine.
CAVEATS
This command only creates the VM definition; it does not automatically create a virtual hard disk or install an operating system.
The --name provided must be unique among all registered VirtualBox VMs.
The --ostype parameter requires a valid OS type string, which can be found by running vboxmanage list ostypes. Using an incorrect or misspelled OS type will result in an error.
FINDING OS TYPES
To get a comprehensive list of supported operating system types for the --ostype parameter, run the command vboxmanage list ostypes. This output provides the ID string needed for the command.
NEXT STEPS AFTER CREATION
After executing createvm, the VM is an empty shell. You will typically need to perform the following steps:
- Configure Hardware: Use vboxmanage modifyvm to adjust RAM, CPU cores, video memory, and other settings.
- Attach Storage: Use vboxmanage createmedium disk to create a new virtual hard disk, and then vboxmanage storagectl and vboxmanage storageattach to attach it and an optical drive (for an ISO installer) to the VM.
- Install OS: Start the VM and proceed with the operating system installation.
HISTORY
The vboxmanage command-line interface, including createvm, has been a core component of VirtualBox since its early development by Innotek GmbH. VirtualBox was first released in 2007. After Innotek was acquired by Sun Microsystems in 2008, and then Sun by Oracle Corporation in 2010, vboxmanage continued to evolve as the primary tool for scripting and automating VirtualBox operations on headless servers or for advanced users. The createvm subcommand has consistently provided a programmatic way to initialize new virtual machine configurations, reflecting the need for automation in virtualized environments.
SEE ALSO
vboxmanage list vms, vboxmanage modifyvm, vboxmanage registervm, vboxmanage unregistervm, vboxmanage storageattach, vboxmanage createmedium disk, vboxmanage showvminfo