8.9. VBoxManage clonevm

Oracle VM VirtualBox

8.9. VBoxManage clonevm

This command creates a full or linked copy of an existing virtual machine.

The clonevm subcommand takes at least the name of the virtual machine which should be cloned. The following additional settings can be used to further configure the clone VM operation:

  • --snapshot <uuid>|<name>: Select a specific snapshot where the clone operation should refer to. Default is referring to the current state.

  • --mode machine|machineandchildren|all: Selects the cloning mode of the operation. If machine is selected (the default), the current state of the VM without any snapshots is cloned. In the machineandchildren mode the snapshot provided by --snapshot and all child snapshots are cloned. If all is the selected mode all snapshots and the current state are cloned.

  • --options link|keepallmacs|keepnatmacs|keepdisknames: Allows additional fine tuning of the clone operation. The first option defines that a linked clone should be created, which is only possible for a machine cloned from a snapshot. The next two options enable specification of the handling of MAC addresses of every virtual network card. They can either be reinitialized (the default), left unchanged (keepallmacs) or left unchanged when the network type is NAT (keepnatmacs). If you add keepdisknames all new disk images are called like the original ones, otherwise they are renamed.

  • --name <name>: Select a new name for the new virtual machine. Default is "Original Name Clone".

  • --groups <group>, ... Enables the clone to be assigned membership of the specified VM groups in the list. Note that group ids always start with a / and can be nested. By default, clones are always assigned membership of the group /.

  • --basefolder <basefolder>: Select the folder where the new virtual machine configuration should be saved in.

  • --uuid <uuid>: Select the UUID the new VM should have. This id has to be unique in the VirtualBox instance this clone should be registered. Default is creating a new UUID.

  • --register: Automatically register the new clone in this VirtualBox installation. If you manually want to register the new VM later, see Section 8.6, “VBoxManage registervm / unregistervm” for instructions how to do so.