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

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

Is this expected behavior?

Blake
Coordinator
Feb 8, 2009 at 10: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 .