Yes, thats what I'm looking for... But it doesn't work correctly.
Here is the code I execute and the output of it:
$hd = Get-VM -name epimetheus | Get-HardDisk
$totalcapacity = 0
$hd | foreach-object {
$totalcapacity += $_.CapacityKB
Write-Host $_.Name "" -nonewline
Write-Host $_.DiskType "" -nonewline
Write-Host $_.Persistence "" -nonewline
Write-Host $_.CapacityKB
}
Write-Host $totalcapacity
Output:
Hard Disk 1 Flat Persistent 10485760
Hard Disk 2 Raw Persistent 158334976
168820736
But, as you can see in the screenshot, "Hard Disk 2" is configured as IndependentPersistent. Is this a bug in VIM?
Another Question: How can I get the "Compatibility Mode" of the Raw Disk?