Dynamic HDD Provisioning Hyper-V Cluster

Heybuzzz76 1 Reputation point
2023-03-15T15:22:02.21+00:00

Is there a way to see how much dynamically HDD space I've allocated without going to each VM "settings page" and adding it up?

I can go to Failover Cluster Manager >Storage > Disks and see my SAN attached LUNs and those LUNs will show the space that's actual being used by the VMs, but how about the total amount of dynamic storage the VM's on that LUN have been actually allocated when built.

If I was the only person creating VM's it wouldn't be that hard to track, but with multiple people creating VM's and different amounts of storage being allocated per VM I don't want to get into a situation where the Dynamically allocated space (IF fully used) consumes the entire LUN.

I don't have VMM (I'm not even sure if this would show me).

Any ideas?

Thanks!

System Center Virtual Machine Manager
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,538 questions
Windows Server Clustering
Windows Server Clustering
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Clustering: The grouping of multiple servers in a way that allows them to appear to be a single unit to client computers on a network. Clustering is a means of increasing network capacity, providing live backup in case one of the servers fails, and improving data security.
958 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,058 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 43,941 Reputation points
    2023-03-16T15:25:40.38+00:00

    Hello

    Thank you for your question and reaching out. I can understand you are having query\issues related to Dynamic disk information from Hyper-V Cluster.

    You can use below Powershell from your Hyper-V Cluster to get Dynamic disk information allocated to VMs.


    $Cluster = "MyCLUSTERNAME.mydom.local"

    $SaveTo = "C:\Test\Disknfo.csv"

    $HVNodes = Get-ClusterNode -Cluster $Cluster

    $Results = ForEach ($HVNode in $HVNodes) {

    Invoke-Command -Computername $HVNode.name {   
    
    ForEach ($VM in (Get-VM)){
    
    Get-VM -Name $VM.name | Select-Object VMID | get-vhd | Where-Object {$_.vhdType -eq "Dynamic"} | fl @{Label="VirtualMachine";Expression={($VM.name)}},ComputerName, Path, VHDFormat, VHDType
    
    }
    
    }
    
    }
    

    $Results | out-file -FilePath $SaveTo


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments