Add-EmcXenServerVirtualDisk

Adds a virtual disk image (VDI) to a virtual machine hosted on a XenServer.

 

Syntax

Add-EmcXenServerVirtualDisk -VirtualDisk <VirtualDiskImage> -VirtualMachineConfiguration <VirtualMachineConfiguration> [-Silent] [<CommonParameters>]

 

Parameters

-VirtualDisk <VirtualDiskImage>

Attributes: Required, Position: named

Specifies the virtual disk image to be added or attached.

 

-VirtualMachineConfiguration <VirtualMachineConfiguration>

Attributes: Required, Position: named

Specifies which virtual machine gets the virtual disk image (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>$xs = Get-EmcXenServerSystem *183

C:\PS>$xs | Update-EmcSystem -Silent

C:\PS> $sr = Get-EmcXenServerStorageRepository test_sr –XenServer $xs

C:\PS>$vdi = New-EmcXenServerVirtualDiskImage –StorageRepository $sr –XenServer $xs –Size 2GB –Name test_vdi

C:\PS>$vms = Get-EmcVirtualMachineConfiguration –Hypervisor $xs

C:\PS>$vm = $vms[0]

C:\PS>Add-EmcXenServerVirtualDisk -VirtualDisk $vdi -VirtualMachineConfiguration $vm

This example adds the specified virtual disk image (VDI) to the specified virtual machine.