8.6. VBoxManage registervm / unregistervm

Oracle VM VirtualBox

8.6. VBoxManage registervm / unregistervm

The registervm command allows you to import a virtual machine definition in an XML file into VirtualBox. The machine must not conflict with one already registered in VirtualBox and it may not have any hard or removable disks attached. It is advisable to place the definition file in the machines folder before registering it.

Note

When creating a new virtual machine with VBoxManage createvm (see below), you can directly specify the --register option to avoid having to register it separately.

The unregistervm command unregisters a virtual machine. If --delete is also specified, the following files will automatically be deleted as well:

  1. all hard disk image files, including differencing files, which are used by the machine and not shared with other machines;

  2. saved state files that the machine created, if any (one if the machine was in "saved" state and one for each online snapshot);

  3. the machine XML file and its backups;

  4. the machine log files, if any;

  5. the machine directory, if it is empty after having deleted all the above.