Feature #11873
openHosts vm_compute_attributes API should expose VM Storage attributes
Description
Is it possible to provide more informations of the VM via the API? I need the hdd count, hdd size and the name of the used datastores.
Related to: http://projects.theforeman.org/issues/10720
Updated by Dominic Cleal about 9 years ago
- Subject changed from Hosts API should expose VM Storage attributes to Hosts vm_compute_attributes API should expose VM Storage attributes
- Category changed from API to Compute resources - VMware
- Assignee deleted (
Adam Simpson)
Which compute resource type is this? libvirt does show the volumes correctly when using the vm_compute_attributes API, so it's probably specific to the type.
I'll guess VMware for now.
Updated by Dominic Cleal about 9 years ago
- Related to Feature #10720: Hosts API should expose VM attributes, such as cpus and memory added
Updated by Marcel Colley about 9 years ago
In my case it is VMware vSphere 5
/api/v2/hosts/bdambari.srv.xxxx.de/vm_compute_attributes
{
"cpus": 2,
"memory_mb": 5120,
"guest_id": "centos64Guest",
"path": "/Hosts & Clusters/XXX/vm/Foreman/Prod/Hadoop",
"name": "bdambari.srv.xxxxx.de",
"uuid": "423ad3ac-e99a-da99-aebf-115542ba904e",
"template": false,
"hostname": "bdambari.srv.xxxxxx.de",
"operatingsystem": "CentOS 4/5/6 (64-Bit)",
"public_ip_address": "172.28.216.89",
"power_state": "poweredOn",
"connection_state": "connected",
"hypervisor": null,
"tools_state": "toolsOk",
"tools_version": "guestToolsUnmanaged",
"corespersocket": 1,
"overall_status": "green",
"hardware_version": "vmx-08",
"cpuHotAddEnabled": false,
"memoryHotAddEnabled": false,
"firmware": "bios",
"mo_ref": "vm-263805",
"datacenter": null,
"cluster": null,
"resource_pool": null,
"mac_addresses": {
"Netzwerkadapter 1": "00:50:56:ba:5b:32"
},
"instance_uuid": "503a73d3-8093-cf0d-a503-0df6b84d7b4c"
}
/api/v2/compute_resources/
[...]
{
"description": "",
"url": "vcenter.xxx.rd.local",
"created_at": "2014-12-23T15:43:30+01:00",
"updated_at": "2015-04-10T13:17:24+02:00",
"id": 2,
"name": "vCenter-xxx-FM",
"provider": "Vmware",
"provider_friendly_name": "VMware",
"user": "foreman",
"datacenter": "xxxx",
"server": "vcenter.xxx.rd.local",
"set_console_password": false
}
Updated by Arnold Bechtoldt about 9 years ago
- Related to Feature #10889: [vSphere] Allow selection of resource pool added