Project

General

Profile

Actions

Feature #11873

open

Hosts vm_compute_attributes API should expose VM Storage attributes

Added by Marcel Colley over 8 years ago. Updated over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - VMware
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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


Related issues 2 (0 open2 closed)

Related to Foreman - Feature #10720: Hosts API should expose VM attributes, such as cpus and memoryClosedWalter Huf06/05/2015Actions
Related to Foreman - Feature #10889: [vSphere] Allow selection of resource poolClosedShlomi Zadok06/20/2015Actions
Actions #1

Updated by Dominic Cleal over 8 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.

Actions #2

Updated by Dominic Cleal over 8 years ago

  • Related to Feature #10720: Hosts API should expose VM attributes, such as cpus and memory added
Actions #3

Updated by Marcel Colley over 8 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
}
Actions #4

Updated by Arnold Bechtoldt over 8 years ago

  • Related to Feature #10889: [vSphere] Allow selection of resource pool added
Actions

Also available in: Atom PDF