Move-VDisk Command | Vmware PowerCLI Reference

Move-VDisk

This cmdlet moves the specified VDisk objects to the specified datastore. For RDM (RawVDisk), only one VDisk object can be moved at once, and only moving from VMFS to VMFS is supported.

Syntax

Move-VDisk
[ -Datastore ] < Datastore >
-VDisk < VDisk[] >
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[-Server < VIServer[] > ]
[-StorageFormat < VDiskStorageFormat > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Datastore Datastore 1
  • wildcards
Specifies the datastore to which you want to move the metadata of the VDisk object. For flat disk, the contents of the disk are also moved to the specified datastore.
required
VDisk VDisk[] named
  • pipeline
Specifies the VDisk objects you want to move.
optional ProgressAction ActionPreference named
optional RunAsync SwitchParameter named
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
optional StorageFormat VDiskStorageFormat named
Specifies the new storage format of the flat VDisk object that is moved.
Move-VDisk
[ -Datastore ] < Datastore >
-ScsiLun < ScsiLun >
-VDisk < VDisk[] >
[-ProgressAction < ActionPreference > ]
[-RunAsync ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Datastore Datastore 1
  • wildcards
Specifies the datastore to which you want to move the metadata of the VDisk object. For flat disk, the contents of the disk are also moved to the specified datastore.
required
ScsiLun ScsiLun named
Specifies the new backing SCSI LUN for the RDM VDisk object that is moved.
required
VDisk VDisk[] named
  • pipeline
Specifies the VDisk objects you want to move.
optional ProgressAction ActionPreference named
optional RunAsync SwitchParameter named
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console.
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

Output

VMware.VimAutomation.ViCore.Types.V1.Storage.VDisk.VDisk

Examples

Example 1

Move-VDisk -VDisk $vDisk -Datastore $ds

Moves the flat VDisk object $vDisk to the $ds datastore.

Example 2

Move-VDisk -VDisk $vDisk -ScsiLun $scsiLun -Datastore $ds

Moves the raw VDisk object $vDisk on the $scsiLun SCSI LUN and stores metadata of this object on the $ds datastore.

Related Commands

VDisk

This cmdlet copies the specified VDisk objects to the specified datastore.

This cmdlet lists VDisk objects based on the specified filters.

This cmdlet moves the specified VDisk objects to the specified datastore.

This cmdlet creates a managed VDisk object whose lifecycle is independent of a virtual machine`s lifecycle on the specified datastore.

This cmdlet removes VDisk objects and the associated backings from the datastore.

This cmdlet renames, inflates, or extends the size of the specified VDisk object.