How does get-vmdisk work with a system that has snapshots?

Feb 4, 2009 at 4:37 PM
It looks like it is giving me the size of just the .avhd file...

Is this expected behavior?

Feb 8, 2009 at 11:06 PM
yes , it is expected.

Quick explanation, when you take a snapshot , a new differencing VHD is created with an extension of .aVHD that is attached as the disk on the drive on disk controller on the VM.

Sometimes this this is what you want and sometimes not,  you can call  Get-VHDInfo $_.diskpath with the path to the aVHD and get its .parent property. And keep doing so recursively until one finds a file with a VHD extension instead of aVHD.

I'll probably add this in a future version, so the ancestor and currently attached disk are both accessible .