[ovirt-users] Virtual Machine Storage Size
Hari Prasanth Loganathan
hariprasanth.l at msystechnologies.com
Thu Apr 26 10:05:19 UTC 2018
Hi Team,
How to get the total and used storage size of a VM? When I run statistics
Rest URL I get the following response, Which is the Total and Used storage
in it?
{
"next_run_configuration_exists": "false",
"numa_tune_mode": "interleave",
"status": "down",
"stop_time": 1524728637295,
"original_template": {
"href":
"/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000",
"id": "00000000-0000-0000-0000-000000000000"
},
"statistics": {
"statistic": [
{
"kind": "gauge",
"type": "integer",
"unit": "bytes",
"values": {
"value": [
{
"datum": 1073741824
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "memory.installed",
"description": "Total memory configured",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/5a89a1d2-32be-33f7-a0d1-f8b5bc974ff6",
"id": "5a89a1d2-32be-33f7-a0d1-f8b5bc974ff6"
},
{
"kind": "gauge",
"type": "integer",
"unit": "bytes",
"values": {
"value": [
{
"datum": 0
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "memory.used",
"description": "Memory used (agent)",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/b7499508-c1c3-32f0-8174-c1783e57bb08",
"id": "b7499508-c1c3-32f0-8174-c1783e57bb08"
},
{
"kind": "gauge",
"type": "decimal",
"unit": "percent",
"values": {
"value": [
{
"datum": 0
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "cpu.current.guest",
"description": "CPU used by guest",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/ef802239-b74a-329f-9955-be8fea6b50a4",
"id": "ef802239-b74a-329f-9955-be8fea6b50a4"
},
{
"kind": "gauge",
"type": "decimal",
"unit": "percent",
"values": {
"value": [
{
"datum": 0
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "cpu.current.hypervisor",
"description": "CPU overhead",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/d849a55f-0049-36f8-ae65-face541473ac",
"id": "d849a55f-0049-36f8-ae65-face541473ac"
},
{
"kind": "gauge",
"type": "decimal",
"unit": "percent",
"values": {
"value": [
{
"datum": 0
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "cpu.current.total",
"description": "Total CPU used",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/2ec286fe-4bec-32f5-8d63-dba7bed58763",
"id": "2ec286fe-4bec-32f5-8d63-dba7bed58763"
},
{
"kind": "gauge",
"type": "decimal",
"unit": "percent",
"values": {
"value": [
{
"datum": 0
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "migration.progress",
"description": "Migration Progress",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/892b69a7-41ca-36b1-9a2e-ae5177ef21bb",
"id": "892b69a7-41ca-36b1-9a2e-ae5177ef21bb"
},
{
"kind": "gauge",
"type": "integer",
"unit": "bytes",
"values": {
"value": [
{
"datum": 0
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "memory.buffered",
"description": "Memory buffered (agent)",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/09e07489-64fd-32ab-8e4e-a2b61eed8d60",
"id": "09e07489-64fd-32ab-8e4e-a2b61eed8d60"
},
{
"kind": "gauge",
"type": "integer",
"unit": "bytes",
"values": {
"value": [
{
"datum": 0
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "memory.cached",
"description": "Memory cached (agent)",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/1b6244ee-8dbd-365d-8762-482ddc05ee11",
"id": "1b6244ee-8dbd-365d-8762-482ddc05ee11"
},
{
"kind": "gauge",
"type": "integer",
"unit": "bytes",
"values": {
"value": [
{
"datum": 0
}
]
},
"vm": {
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded"
},
"name": "memory.free",
"description": "Memory free (agent)",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics/5a0fba9d-33d7-3cbf-addd-ba462040c946",
"id": "5a0fba9d-33d7-3cbf-addd-ba462040c946"
}
]
},
"template": {
"href":
"/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000",
"id": "00000000-0000-0000-0000-000000000000"
},
"actions": {
"link": [
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/detach",
"rel": "detach"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/export",
"rel": "export"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/ticket",
"rel": "ticket"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/reboot",
"rel": "reboot"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/migrate",
"rel": "migrate"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/commitsnapshot",
"rel": "commitsnapshot"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/cancelmigration",
"rel": "cancelmigration"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/clone",
"rel": "clone"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/freezefilesystems",
"rel": "freezefilesystems"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/logon",
"rel": "logon"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/maintenance",
"rel": "maintenance"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/previewsnapshot",
"rel": "previewsnapshot"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/reordermacaddresses",
"rel": "reordermacaddresses"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/thawfilesystems",
"rel": "thawfilesystems"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/undosnapshot",
"rel": "undosnapshot"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/shutdown",
"rel": "shutdown"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/start",
"rel": "start"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/stop",
"rel": "stop"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/suspend",
"rel": "suspend"
}
]
},
"name": "memory",
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded",
"id": "b89deb8c-882c-47a4-9911-b4978cddcded",
"bios": {
"boot_menu": {
"enabled": "false"
}
},
"cpu": {
"architecture": "x86_64",
"topology": {
"cores": "1",
"sockets": "1",
"threads": "1"
}
},
"display": {
"allow_override": "false",
"copy_paste_enabled": "true",
"disconnect_action": "LOCK_SCREEN",
"file_transfer_enabled": "true",
"monitors": "1",
"single_qxl_pci": "false",
"smartcard_enabled": "false",
"type": "spice"
},
"io": {
"threads": "0"
},
* "memory": 1073741824,*
"migration": {
"auto_converge": "inherit",
"compressed": "inherit"
},
"origin": "ovirt",
"os": {
"boot": {
"devices": {
"device": [
"hd"
]
}
},
"type": "other"
},
"sso": {
"methods": {
"method": [
{
"id": "guest_agent"
}
]
}
},
"stateless": "false",
"type": "desktop",
"usb": {
"enabled": "false"
},
"cluster": {
"href":
"/ovirt-engine/api/clusters/8111b6c0-c60d-416d-bcdb-ea926f8035fc",
"id": "8111b6c0-c60d-416d-bcdb-ea926f8035fc"
},
"quota": {
"id": "96e54503-092a-467e-be8e-12ac203b9991"
},
"link": [
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/cdroms",
"rel": "cdroms"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/watchdogs",
"rel": "watchdogs"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/katelloerrata",
"rel": "katelloerrata"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/permissions",
"rel": "permissions"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/tags",
"rel": "tags"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/diskattachments",
"rel": "diskattachments"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/snapshots",
"rel": "snapshots"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/applications",
"rel": "applications"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/affinitylabels",
"rel": "affinitylabels"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/hostdevices",
"rel": "hostdevices"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/numanodes",
"rel": "numanodes"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/reporteddevices",
"rel": "reporteddevices"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/sessions",
"rel": "sessions"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/graphicsconsoles",
"rel": "graphicsconsoles"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/nics",
"rel": "nics"
},
{
"href":
"/ovirt-engine/api/vms/b89deb8c-882c-47a4-9911-b4978cddcded/statistics",
"rel": "statistics"
}
],
"cpu_shares": "0",
"creation_time": 1524728637178,
"delete_protected": "false",
"high_availability": {
"enabled": "false",
"priority": "0"
},
"large_icon": {
"href":
"/ovirt-engine/api/icons/ae1951e6-d1c8-50a9-4dc3-59a0967afd21",
"id": "ae1951e6-d1c8-50a9-4dc3-59a0967afd21"
},
"memory_policy": {
"guaranteed": 1073741824,
"max": 4294967296
},
"migration_downtime": "-1",
"placement_policy": {
"affinity": "migratable"
},
"small_icon": {
"href":
"/ovirt-engine/api/icons/07a3e3fc-a384-e5cc-d496-942f8047eea8",
"id": "07a3e3fc-a384-e5cc-d496-942f8047eea8"
},
"start_paused": "false",
"storage_error_resume_behaviour": "auto_resume",
"time_zone": {
"name": "Etc/GMT"
},
"cpu_profile": {
"href":
"/ovirt-engine/api/cpuprofiles/ab2e9ead-2464-41f9-94f4-1e68c648a8a1",
"id": "ab2e9ead-2464-41f9-94f4-1e68c648a8a1"
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180426/0f076a26/attachment.html>
More information about the Users
mailing list