Gets the virtual disk configuration for the specified host disk of a virtual machine, which can be either a file-based or pass-through disk.
Syntax
Get-EmcVirtualDiskConfiguration -Hypervisor <IHypervisor> [-Silent] [<CommonParameters>]
Get-EmcVirtualDiskConfiguration [-Silent] -HostDisk <Disk> [<CommonParameters>]
Get-EmcVirtualDiskConfiguration [-Silent] -HostSystem <IHostSystem> [<CommonParameters>]
Get-EmcVirtualDiskConfiguration [-Silent] -VirtualMachineConfiguration <VirtualMachineConfiguration> [<CommonParameters>]
Parameters
-Hypervisor <IHypervisor>
Attributes: Required, Position: named
Specifies the hypervisor object for the ESI virtual machine, which you can get by using the Get-EmcVirtualMachineHypervisor cmdlet.
-Silent <SwitchParameter>
Attributes: Optional, Position: named
Turns off all the informational and verbose messages. However, it still displays errors.
-HostDisk <Disk>
Attributes: Required, Position: named
Specifies the ESI host disk object, which you can get from the ESI host system object or by using the Get-EmcHostDisk or Find-EmcHostDisk cmdlets.
-HostSystem <IHostSystem>
Attributes: Required, Position: named
Specifies the ESI host system object. You can use the EmcHostSystemCredential and Connect-EmcSystem cmdlets to add a host system object to ESI. You can use the Get-EmcHostSystem cmdlet to get a host system object. The host system can either a stand-alone host system, a virtual machine, or a hypervisor.
-VirtualMachineConfiguration <VirtualMachineConfiguration>
Attributes: Required, Position: named
Specifies the ESI virtual machine configuration object, which you can get from the ESI hypervisor host system VirtualMachinesConfigurations parameter or by using the Get-EmcVirtualMachineConfiguration cmdlet.
<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 *.200
C:\PS>$hyperv.Model
Hyper-V, PowerEdge R710
C:\PS>$hyperv|Update-EmcSystem -Silent
$vm = Get-EmcHostSystem *.148
C:\PS>$vm | Update-EmcSystem -Silent
C:\PS>$vm.model
Virtual Machine
C:\PS>$hd = $vm.HostDisks[3]
C:\PS>$hd.HostDiskIdentifier
\\?\PhysicalDrive8
C:\PS>$hd.DiskType
FilebasedVmDisk
C:\PS>$diskconfig = $hd | Get-EmcVirtualDiskConfiguration
C:\PS>$diskconfig.Path
E:\ps_test1.vhd
C:\PS>$diskconfig.server
This example gets the virtual disk configuration of a file-based disk in a virtual machine.
-------------- Example 2 --------------
C:\PS>$hyperv = Get-EmcHostSystem *.200
C:\PS>$hyperv.Model
Hyper-V, PowerEdge R710
C:\PS>$hyperv|Update-EmcSystem -Silent
C:\PS>$vm = Get-EmcHostSystem *.148
C:\PS>$vm | Update-EmcSystem -Silent
C:\PS>$diskconfigs = $vm.HostDisks | Get-EmcVirtualDiskConfiguration
C:\PS>$diskconfigs.path
E:\ps_test1.vhd
C:\PS>$diskconfigs.ScsiControllerIndex
0
C:\PS>$diskconfigs.HostLunIdentifier.ScsiControllerId
{9052A0C0-C066-4C6E-95EC-A66CF32336A3}
C:\PS>
This example gets virtual machine configurations of all disks.
-------------- Example 3 --------------
C:\PS>$vm = Get-EmcHostSystem *.150
C:\PS>$vm | Update-EmcSystem -Silent
C:\PS>$vm.model
Virtual Machine
C:\PS>$hyperv = Get-EmcHostSystem *.200
C:\PS>$hyperv | Update-EmcSystem -Silent
C:\PS>$vm.model
Hyper-V, PowerEdge R710
C:\PS>$diskconfig = $vm | Get-EmcVirtualDiskConfiguration
This example gets the virtual disk configurations of a virtual machine. You must update the virtual machine hypervisor before retrieving the disk configuration.
-------------- Example 4 --------------
C:\PS>$hyperv = Get-EmcHostSystem *.200
C:\PS>$hyperv | Update-EmcSystem -Silent
C:\PS>$vm.model
Hyper-V, PowerEdge R710
C:\PS>$vmconfig = Get-EmcVirtualMachineConfiguration -Hypervisor $hyperv
C:\PS>$vmconfig
C:\PS>$diskconfig = $vmconfig[1] | Get-EmcVirtualDiskConfiguration
or
C:\PS>$diskconfig = $vmconfig | Get-EmcVirtualDiskConfiguration
This example updates the hypervisor and gets the virtual machine configurations. It then gets the virtual disk configurations for the virtual machine configuration.