Creates the new XenServer storage repositories.
Syntax
New-EmcXenServerStorageRepository -Lun <Lun> -XenServer <IXenServer> -Name <String> -TargetPort <StoragePort> [-Description <String>] [-Silent] [<CommonParameters>]
Parameters
-Lun <Lun>
Attributes: Required, Position: named
Specifies the LUN that hosts the storage repository.
-XenServer <IXenServer>
Attributes: Required, Position: named
Specifies the XenServer owner of the storage repository.
-Name <String>
Attributes: Required, Position: named
Specifies the name of the created storage repository.
-TargetPort <StoragePort>
Attributes: Required, Position: named
Specifies the target port for which the created storage repository connects.
-Description <String>
Attributes: Optional, Position: named
Specifies the description for the created storage repository.
-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>$xen = Get-EmcXenServerSystem myXen
C:\PS>Set-EmcLunAccess -Lun $lun -HostSystem $xen -Available
C:\PS>$storage = Get-EmcStorageSystem myStorage
C:\PS>$tp=Get-EmcTargetPort -BlockStorageSystem $storage
C:\PS>New-EmcXenServerStorageRepository -Lun $lun -XenServer $xen -Name "Test SR" -TargetPort $tp[0]
This example creates a storage repository on a XenServer system with a specified LUN. The LUN is then unmasked to the XenServer. If the target port is a Fibre Channel port, it creates a hardware HBA storage repository. If the target port is iSCSI, it creates a software iSCSI storage repository.