Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

The task will first transfer the original VMDK, validate, inflate and convert the file to the right vSphere format.

Copy

Similar to importing a VMDK, copying virtual disks across virtual machines allows the flexibility to duplicate a disk from one VM to another with a simple command.

  • Source: 2311P-VM-A

  • Target: 2311P-VM-B

  1. Get source VM disk to copy from the file_name attribute as follows:

Code Block
languagebash
linenumbersfalse
vss-cli -o yaml compute vm get 2311P-VM-A disk
  1. Submit an import request with the vss-cli compute vm set vm-2551 disk cp command:

Code Block
languagebash
linenumbersfalse
vss-cli compute vm set 2311P-VM-B disk cp --disk '{"capacity_gb": 100, "backing_vmdk": "[XXXX-NN] vm-name/vm-name_1.vmdk"}'

3. A confirmation prompt will show with the target VM information, if you would like to skip this step, add the --confirm option to the cp command.

Info

VMDK Copy tasks might take a while based on the source VM size and how much resources are available.

Remove

Disk removal will ask for confirmation if flag -r/--rm is not provided. This is just as fail safe for mistakes that can happen and since disk removal is a one way action, it may end in data loss if not used carefully.

...