Expand-EmcFileBasedDisk

Expands the size of a file-based disk.

 

Syntax

Expand-EmcFileBasedDisk -Size <UInt64> -VirtualMachineConfiguration <VirtualMachineConfiguration> -Location <UInt32> [-ScsiControllerId <String>] [-ScsiControllerIndex <Int32>] [-Silent] [<CommonParameters>]

 

Parameters

-Size <UInt64>

Attributes: Required, Position: named

Specifies the size of the file-based disk.

 

-VirtualMachineConfiguration <VirtualMachineConfiguration>

Attributes: Required, Position: named

Specifies the ESI Virtual Machine Configuration object, which you can get from the ESI hypervisor host system object VirtualMachinesConfigurations parameter or by using the Get-EmcVirtualMachineConfiguration cmdlet. The cmdlets encapsulate VM configuration information, including status, MAC addresses, GUID, attached file-based disks, pass-through disks, and other disks.

 

-Location <UInt32>

Attributes: Required, Position: named

Specifies the available location or LUN number of the specified SCSI controller for adding the file-based disk. You can get the available SCSI controller location from the VM hypervisor object or by using the Get-EmcAvailableScsiControllerLocation cmdlet.

 

-ScsiControllerId <String>

Attributes: Optional, Position: named

Specifies the SCSI controller ID for adding to the specified file-based disk. You can get the ID from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.

 

-ScsiControllerIndex <Int32>

Attributes: Optional, Position: named

Specifies the SCSI controller zero-based index to add or attach to a specified file-based disk. You can get SCSI controller information for a virtual machine from the ESI hypervisor object or by using the Get-EmcVirtualMachineScsiController cmdlet.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

An optional parameter to turn 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>$h = Get-EmcVcenterSystem

C:\PS>$h | update-emcsystem

C:\PS>$h.VirtualMachinesConfigurations | select name

C:\PS>$vmconfig = $h.VirtualMachinesConfigurations[0]

C:\PS>$scsicontroller = Get-EmcVirtualMachineScsiController –VirtualMachineConfiguration $vmconfig

C:\PS>$locations = Get-EmcAvailableScsiControllerLocation -VirtualMachineConfiguration $vmconfig -ScsiControllerId $scsicontroller.ScsiControllerId

 

C:\PS>$Expand-EmcFileBasedDisk -Size 2GB -VirtualMachineConfiguration $vmconfig -Location $location[0] -ScsiControllerIndex $scsicontroller.ScsiControllerIndex

This example expands the size of a file-based disk.