New-EmcFileBasedDisk

Creates a file-based disk for a specified hypervisor.

 

Syntax

 

Parameters

-VhdType <VhdType>

Attributes: Optional, Position: named

Specifies the file-based disk type of VHD or VHDX for Hyper-V systems. Valid values are Fixed and Dynamic.

 

-Hypervisor <IHypervisor>

Attributes: Required, Position: named

Specifies the ESI hypervisor host system object, which you can get from the host system by using the Get-EmcHostSystem cmdlet. You can add a hypervisor by using the Get-EmcHostSystemCredential and Connect-EmcSystem cmdlets.

 

-Path <String>

Attributes: Required, Position: named

Specifies the path of the file-based disk.

 

-Size <UInt64>

Attributes: Required, Position: named

Specifies the size of the file-based disk.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

Turns off all the informational and verbose messages. However, it still displays errors.

 

-VmdkType <VmdkType>

Attributes: Optional, Position: named

Specifies the file-based disk type for VMDK files for VMware systems. Valid values are Lazy Zeroed Thick, Thin, and Eager Zeroed Thick.

 

<CommonParameters>

This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. Type get-help about_commonparameters for more details.

 

Examples

-------------- Example 1 --------------

C:\PS>$hyperv = Get-EmcHostSystem *.133

C:\PS>$hyperv.Model

Hyper-V, PowerEdge R710

C:\PS>New-EmcFileBasedDisk -Hypervisor $hyperv -SizeInGB 1 -DiskType fixed -Path "E:\ps_test1.vhd"

 

This example creates a file-based disk in a Hyper-V hypervisor.

 

-------------- Example 2 --------------

C:\PS>$h= Get-EmcHostSystem *99

C:\PS>New-EmcFileBasedDisk -Hypervisor $h -Size 1GB  -Path "[datastore1] VM-ESX-WS2K8R2-1/ESIQA.vmdk" -VmdkType EagerZeroedThick

This example creates a file-based disk in a VMware hypervisor.

 

-------------- Example 3 --------------

C:\PS>$h= Get-EmcHyperVSystem *109

C:\PS>New-EmcFileBasedDisk -Hypervisor $h -VhdType Dynamic -Path "C:\VHDs\VM24.vhdx" -Size 5GB

 

This example creates a file-based disk in a Hyper-V hypervisor with the VHDX type disk format.