Syntax
New-VDisk -CapacityGB <Decimal> -Datastore <Datastore> [-DiskType <DiskType>] -Name <String> [-Server <VIServer[]>] [-StorageFormat <VDiskStorageFormat>] [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed Description
This cmdlet creates a managed VDisk object whose lifecycle is independent of a virtual machine`s lifecycle on the specified datastore. For RDM (RawVDisk), you must specify the device name of the SCSI LUN and the virtual machine host which is connected to the SCSI LUN.Parameters
Return Type
The newly created VDisk objectsNotes
Examples
-------------------------- Example 1 --------------------------
New-VDisk -Name 'MyDisk' -CapacityGB 1 -Datastore $ds -DiskType Flat -StorageFormat Thin
Creates a new thin-provisioned flat VDisk object named 'MyDisk' on the $ds datastore with capacity of 1 GB.
-------------------------- Example 2 --------------------------
New-VDisk -Name 'MyDisk' -Datastore $ds -DiskType RawPhysical -ScsiLun $scsiLun
Creates a new physical raw VDisk object named 'MyDisk' backed by the $scsiLun SCSI LUN and with metadata on the $ds datastore.
-------------------------- Example 3 --------------------------
New-VDisk -HardDisk $hd -Name $newName
Promotes the $hd virtual hard disk to a VDisk object.