vmware/pyvmomi-community-samples

Sample: get consumed storage of a vm, excluding the snap shot drives?

Open

#111 geöffnet am 19. Aug. 2014

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (914 Forks)batch import
help wantedlow hanging fruitsample request

Repository-Metriken

Stars
 (972 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Reference: https://github.com/vmware/pyvmomi/issues/111

I've notice when summarizing the consumed storage for billing purposes that you get variable data due to snapshots. The size of consumed grows based on if there is a snap shot or not. is there a way to account for this and get actual consumed storage of a vm excluding the snapshots?

currently im using the following ways to get consumed: round(Decimal(vm['summary.storage.committed'] + vm['summary.storage.uncommitted']) / Decimal(1.0 * 2**30), 5)

Create a full sample that demonstrates various ways to look at the consumed datastore storage of a virtual machine.

Contributor Guide