7.7. VBoxManage createvm

The VBoxManage createvm command creates a new XML virtual machine definition file.

You must specify the name of the VM by using --name name. This name is used by default as the file name of the settings file that has the .xml extension and the machine folder, which is a subfolder of the .config/VirtualBox/Machines folder. Note that the machine folder path name varies based on the OS type and the Oracle VM VirtualBox version.

Ensure that the VM name conforms to the host OS's file name requirements. If you later rename the VM, the file and folder names will be updated to match the new name automatically.

The --basefolder path option specifies the machine folder path name. Note that the names of the file and the folder do not change if you rename the VM.

The --group group-ID, ... option assigns the VM to the specified groups. Note that group IDs always start with / so that they can be nested. By default, each VM is assigned membership to the / group.

The --ostype ostype option specifies the guest OS to run in the VM. Run the VBoxManage list ostypes command to see the available OS types.

The --uuid uuid option specifies the universal unique identifier (UUID) of the VM. The UUID must be unique within the namespace of the host or of its VM group memberships. By default, the VBoxManage command automatically generates the UUID.

The --default option applies a default hardware configuration for the specified guest OS. By default, the VM is created with minimal hardware.

The --register option registers the VM with your Oracle VM VirtualBox installation. By default, the VBoxManage createvm command creates only the XML configuration for the VM but does not registered the VM. If you do not register the VM at creation, you can run the VBoxManage registervm command after you create the VM.