New-EmcXenServerVirtualDiskImage

Creates a new virtual disk image (VDI) for a storage repository from XenServer.

 

Syntax

New-EmcXenServerVirtualDiskImage -StorageRepository <StorageRepository> -XenServer <IXenServer> -Size <UInt64> -Name <String> [-Silent] [<CommonParameters>]

 

Parameters

-StorageRepository <StorageRepository>

Attributes: Required, Position: named

Specifies the storage repository that will host the virtual disk image (VDI).

 

-XenServer <IXenServer>

Attributes: Required, Position: named

Specifies the XenServer owner of the host storage repository for the VDI.

 

-Size <UInt64>

Attributes: Required, Position: named

Specifies the size of the VDI.

 

-Name <String>

Attributes: Required, Position: named

Specifies the name of the VDI.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

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

 

<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>$params = @{"Username"="root"; "Password"="password"; "ConnectionName"="192.168.222.1"}

C:\PS>$xen = Connect-EmcSystem -CreationParameters $params -SystemType "Citrix XenServer"

C:\PS>$storage = Get-EmcStorageSystem myVNX

C:\PS>$pool = Get-EmcStoragePool testPool

C:\PS>$lun = New-EmcLun -Pool $pool -Capacity 20GB -Name testlun

C;\PS>$targetPort = Get-EmcTargetPort -BlockStorageSystem $storage

C:\PS>Set-EmcLunAccess -Lun $lun -HostSystem $xen -Available

C:\PS>$sr=New-EmcXenServerStorageRepository -Lun $lun -XenServer $xen -Name TestSR -TargetPort $targetPort[0]

C:\PS>New-EmcXenServerVirtualDiskImage -XenServer $xen -StorageRepository $sr -Name "Test VDI" -Size 10GB

This example creates a virtual disk image on a storage repository with 10 GB of capacity.