A.141 moveVmToRepository

Moves a virtual machine to a storage repository that has been defined within a clone customizer.

Syntax

moveVmToRepository Vm instance cloneCustomizer=value targetRepository=value

Where instance is:

{ id=value | name=value }

Description

This command moves a virtual machine to a target storage repository. The target storage repository is set using a predefined clone customizer. Use the create VmCloneCustomizer command to create a clone customizer.

Any VmDiskMapping objects are renamed during the move operation. The move job copies any virtual disks to the target storage repository, and, consequently, the new virtual disks have new UUIDs. New VmDiskMapping objects are created to map the newly created virtual disks and added to the virtual machine. The old VmDiskMapping objects are then deleted. Deleting the VmDiskMapping object also causes any associated VmCloneStorageMapping objects to be deleted.

Options

The following table shows the available options for this command.

Option

Description

cloneCustomizer=value

The name or ID of the clone customizer to use to move the virtual machine to a storage repository.

targetRepository=value

The name or ID of the storage repository to which the virtual machine is to be moved.

{ id=value | name=value }

The instance of the object using either the id or name option, for example name=MyVm.

Examples

Example A.183 Moving a virtual machine to a storage repository

OVM> moveVmToRepository Vm name=MyVm cloneCustomizer=MyVMCloneCustomizer \
  targetRepository=MyRepository

See Also