Copy-VDisk

This cmdlet copies the specified VDisk objects to the specified datastore. For RDM (RawVDisk), only one VDisk can be copied at once, and only copying from VMFS to VMFS is supported.

Syntax

[-Datastore]  <Datastore>
-VDisk  <VDisk[]>
[-Name  <String>]
[-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 copy the metadata of the VDisk object. For flat disk, the contents of the disk are also copied to the specified datastore.
    required
    VDisk
    VDisk[] named
  • pipeline
  • Specifies the VDisk objects you want to copy.
    optional
    Name
    String named Specifies the name of the copy of the VDisk object.
    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 storage format of the copy of the VDisk object.

    [-Datastore]  <Datastore>
    -ScsiLun  <ScsiLun>
    -VDisk  <VDisk[]>
    [-Name  <String>]
    [-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 copy the metadata of the VDisk object. For flat disk, the contents of the disk are also copied to the specified datastore.
    required
    ScsiLun
    ScsiLun named Specifies the backing SCSI LUN for the copy of the VDisk object.
    required
    VDisk
    VDisk[] named
  • pipeline
  • Specifies the VDisk objects you want to copy.
    optional
    Name
    String named Specifies the name of the copy of the VDisk object.
    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

    Copy-VDisk -VDisk $vDisk -Datastore $ds

    Copies the flat VDisk object $vDisk on the $ds datastore.

    Example 2

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

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

    Related Commands

    Feedback

    Was this page helpful?