-
Notifications
You must be signed in to change notification settings - Fork 1
VSphere
How does the communication with VSphere work?
The communication to the VSphere API is wrapped in the VmApi class. It provides methods for retrieving and editing VMs and Hosts.
What information can be retrieved about servers and vm’s?
Server:
-
all_clusters -> Hash[]
(selection of properties of ComputeResource Object provided by the VMSphere API)
returns an Array of Hashes:- :name
- :stats
- :cores
- :threads
-
all_hosts -> Hash[]
returns an Array of Hashes as specified for the get_host(name) method -
get_host(name) -> Hash
(selection of properties of HostSystem Object provided by the VMSphere API)
returns a Hash containing:- :name
- :vm_names => String[] with the names of the VMs running on this host
- :model
- :vendor => manufacturer
- :bootTime
- :connectionState
- :summary => a VSphere HostListSummary object containing detailed information about the host
VM:
-
all_vms -> Hash[] (selection of properties of VirtualMachine Object provided by the VMSphere API)
returns an Array of Hashes containing:- :name
- :state => boolean set to true then VM is powered on
- :boot_time:
-
get_vm(name) -> Hash
returns a Hash containing:- :name
- :boot_time
- :host => name of the host the VM runs on,
- :state => boolean set to true then VM is powered on,
- :guestHeartbeatStatus => String
- gray - VMware Tools are not installed or not running.
- red - No heartbeat. Guest operating system may have stopped responding.
- yellow - Intermittent heartbeat. May be due to guest load.
- green - Guest operating system is responding normally.
- :summary => a VSphere VirtualMachineSummary object containing detailed information about the VM
Capabilities and Documentation of the VMSphere API that is used by our API