LinuxCommandLibrary

vboxmanage-registervm

Register an existing virtual machine

TLDR

Register an existing VM

$ VBoxManage registervm [path/to/filename.vbox]
copy

Supply the encryption password file of the VM
$ VBoxManage registervm [path/to/filename.vbox] --password [path/to/password_file]
copy

Prompt for the encryption password on the command-line
$ VBoxManage registervm [path/to/filename.vbox] --password -
copy

SYNOPSIS

VBoxManage registervm <path_to_vbox_file>
Note: This command is a subcommand of VBoxManage, not a standalone executable named vboxmanage-registervm.

PARAMETERS

<path_to_vbox_file>
    The absolute or relative path to the .vbox XML configuration file of the virtual machine you wish to register. This file contains all settings, hardware definitions, and linked storage for the VM. Example: /home/user/VirtualBox VMs/MyVM/MyVM.vbox

DESCRIPTION

The VBoxManage registervm command is a crucial subcommand of the Oracle VM VirtualBox command-line utility, VBoxManage. Its primary function is to add an existing virtual machine definition back into the VirtualBox inventory. This is particularly useful in scenarios where a virtual machine's configuration file (.vbox) has been manually moved, copied, or restored from a backup, and it no longer appears in the VirtualBox Manager GUI or in the output of VBoxManage list vms.

Instead of creating a new virtual machine, registervm simply informs VirtualBox about the location of an existing VM's .vbox configuration file, allowing VirtualBox to recognize and manage it once again. It does not move or copy any files; it merely updates the VirtualBox internal database. Users typically provide the full path to the .vbox file as an argument. Upon successful registration, the VM becomes visible and manageable via both the VirtualBox Manager GUI and other VBoxManage subcommands.

CAVEATS

The requested command vboxmanage-registervm is not a standalone executable. Instead, registervm is a subcommand of the main VBoxManage utility. All operations are performed using VBoxManage registervm ....

The specified .vbox configuration file must exist and be valid. If the file is corrupted or missing, the command will fail.

This command only registers the VM configuration; it does not automatically resolve issues with missing disk images (VDIs, VHDs, etc.) that the .vbox file refers to. You may need to manually locate or re-register those if they have also been moved.

registervm does not create a new virtual machine; it only brings an existing, previously defined VM back into the VirtualBox inventory.

DEFAULT VM LOCATION

By default, VirtualBox stores VM configuration files (.vbox) and associated disk images in a directory structure typically located under your user's home directory, for example, ~/VirtualBox VMs/<VM_Name>/<VM_Name>.vbox. When registering a VM, ensure you point to the correct .vbox file within its respective VM folder.

UUID CONFLICTS

If you attempt to register a .vbox file that has the same UUID as an already registered VM, VBoxManage will report an error. To resolve this, you might need to unregister the existing VM or use VBoxManage internalcommands sethduuid (or similar for VM UUID) to generate a new UUID for the configuration you wish to register, though this is an advanced operation.

HISTORY

Oracle VM VirtualBox, commonly known as VirtualBox, began its life as an open-source virtualization product developed by Innotek GmbH. Acquired by Sun Microsystems in 2008, it subsequently became part of Oracle Corporation in 2010. Throughout its development, VBoxManage has served as the powerful command-line interface for controlling and scripting VirtualBox operations, offering an alternative to the graphical user interface. The registervm subcommand has been a fundamental part of VBoxManage for a long time, evolving alongside the core product to facilitate robust management of virtual machine configurations, especially in headless server environments or for automation tasks.

SEE ALSO

VBoxManage unregistervm(1), VBoxManage createvm(1), VBoxManage list vms(1), VirtualBox(1)

Copied to clipboard