Host Side Linking for Hyper-V with Cluster Shared Volumes
The pattern HyperVCSV (module name HyperV.CSV) is designed to model relationships between physical storage and Hyper-V virtual hosts for the case where Cluster Shared Volumes are used to create virtual hard drives for virtual hosts.
Pattern triggers on Software Instance with type "Microsoft Cluster Server." It then runs Powershell commands to obtain information about the Cluster Shared Volumes (CSVs), partitions, and for each running Virtual Machine, information about the virtual disk drives.
The commands are following:
Command | Description |
|---|---|
Get-ClusterSharedVolume | select -Expand SharedVolumeInfo | Format-List -Property FriendlyVolumeName | Out-String | Get Cluster Shared Volumes names |
Get-Partition | Format-List -Property UniqueId,AccessPaths | Out-String | Get partition's attributes |
Get-VM –VMName %vm_name% | Select-Object VMId | Get-VHD | Format-List -Property Path | Out-String | Get virtual disk drives path for the Virtual Machine |
Based on the obtained outputs, relationships are created between the virtual hosts and Storage Volumes as well as between virtual hosts and Storage Systems.
Below is an example of the Virtual Host with relationships to Storage Volume and Storage System created by the HyperVCSV pattern.
