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:
-
all hard disk image files, including differencing files, which are used by the machine and not shared with other machines;
-
saved state files that the machine created, if any (one if the machine was in "saved" state and one for each online snapshot);
-
the machine XML file and its backups;
-
the machine log files, if any;
-
the machine directory, if it is empty after having deleted all the above.