Hi everybody,
Long story short.
___________________________________
Environment Summary:
vCenter 5.1, ESXi 5.1
Remote Server:
Windows 2008 R2
PowerShell 2.0
PowerCLI 5.0
Shared Storage File System: VMFS 5.54
Block Size: 1Mb
Size: 2TB
Local Storage File System: VMFS 5.58
Block Size: 1Mb
Size: 0.274TB
Guest Virtual Disk: 10Gb
Disk Format: Eager Zeroed Thick
Guest OS: XP x86
Snapshots files in console (there are 2 snapshots):
-rw------- 1 root root 16.0M SomeVM-delta.vmdk
-rw------- 1 root root 331 SomeVM-000001.vmdk
-rw------- 1 root root 48.0M SomeVM-000002-delta.vmdk
-rw------- 1 root root 338 SomeVM-000002.vmdk
-rw------- 1 root root 27.8K SomeVM-Snapshot1.vmsn
-rw------- 1 root root 27.8K SomeVM-Snapshot2.vmsn
___________________________________
Test 1
Local Datastore:
VM is off/on
Get-VM SomeVM | Get-Snapshot | %{ $_.SizeMb }
0.02715587615966796875
10256.0506000518798828125
___________________________________
Test 2
Shared Datastore
1. VM is off after Host+Storage migration from Local Datastore:
Get-VM $vm | Get-Snapshot | %{ $_.SizeMb }
0.02715587615966796875
10288.0506000518798828125
2. VM is on:
Get-VM SomeVM | Get-Snapshot | %{ $_.SizeMb }
0.02715587615966796875
64.0506000518798828125
3. VM is off:
Get-VM SomeVM | Get-Snapshot | %{ $_.SizeMb }
0.02715587615966796875
64.0506000518798828125
___________________________________
Test 3
Migrating back to Local Datastore
VM is off/on
Get-VM SomeVM | Get-Snapshot | %{ $_.SizeMb }
0.02715587615966796875
10256.0506000518798828125
___________________________________
Test 4
I tried to clone the VM and it makes no difference
____________________________________
Is it fixable at all since there are some local datastores to monitor remotely?
Regards,
rindr
Well, well, well, it turns out to be a long lasting story and still not fixed?
Get-Snapshot SizeMB property bug in 4.1
Now the same applies to PowerCLI 5.1 on local datastores only as well.
Checked it back in old 4.1 environment. In GUI there is no such confusion at all: the snapshot size summary is always correct in Storage Views in Snapshot Space column should it be single or multiple snapshots. So how come that according to the link above "it's a matter of how vSphere interpretes how the size of a snapshot is calculated" if it comes to Get-Snapshot, but the same inconsistency does not exist for the information reflected in GUI?
Is there any workaround to get local datastores snapshots size using Get-Snapshot? At least, the sum value from the GUI.
Thank you,
rindr