The VI Object Model

VI API Webinar Series January 17, 2007 Henry Robinson

Objective
Understand the VI Object Model for Inventory Objects

A Typical Datacenter Servers Storage and Networks Applications .

Physical View of a Datacenter Datacenter .

Folder HostSystem VirtualMachineSnapshot Datastore Alarm Network Managed Objects ResourcePool Datacenter ComputeResource VirtualMachine Managed Entities . The VI API manages resources (hosts and virtual machines) into an inventory hierarchy.Objects The VI Data Model is organized into a set of objects that contain properties (details) and methods (actions).

Objects The VI Data Model is organized into a set of objects that contains properties (details) and methods (actions). The VI API manages resources (hosts and virtual machines) into an inventory hierarchy. Folder HostSystem ResourcePool Datacenter ComputeResource VirtualMachine Managed Entities .

Object Model VirtualCenter Web Service “moRef” RetrieveProperties or get_view to retrieve object contents Client App . The moRef is a pointer to an object. The same object will have a different moRef if referenced from VirtualCenter or ESX.Referencing Objects A Managed Object has a Managed Object Reference (or moRef). For example. A moRef is “server-specific. don’t store the moRef on disk for later use. A moRef is “stable” but NOT “persistent”.

Inventory Hierarchy Folder HostSystem ResourcePool Datacenter ComputeResource VirtualMachine Managed Entities Inventory Hierarchy .

Inventory Hierarchy ESX VC Inventory Hierarchy .

Managed Object Browser (MOB) “appManager eval” Simple value “green” Simple Type Managed Object Reference Reference to a Managed Object (moRef) guest->guestState = “not running” Reference to a data object Simply enter https://<host name>/mob to access browser on any VirtualCenter or ESX Server .

Building the Inventory Hierarchy Datacenter .

Folder Objects An object that groups a set of similar objects. Allows you to manage a collection into an administrative set (all Webserver VMs). 3 folders automatically created. Can’t be modified. Root folder VM Folder named “vm” Host Folder named “host” VM Resource Pool Host Root Folder Datastore Datacenter Network VM Folder vm Host Folder host Compute Resource .

hosts. 3 folders automatically created. Allows you to manage a collection into an administrative set (all Webserver VMs). Can’t be modified. VM .Folder Objects An object that groups a set of similar objects. and Virtual Machines. Root folder VM Folder named “vm” Host Folder named “host” Root Folder Folder Datastore Datacenter Network VM Folder Folder Host Folder Folder Compute Resource Resource Pool Host You can add folders to group datacenters.

and network resources Has links to: Hosts VMs Datastores Networks Compute Resource Resource Pool Host VM Folder Host Folder Root Folder Datastore Datacenter Network An ESX Host has a single (default) datacenter VirtualCenter supports multiple datacenters VM . disk.Datacenter Object Allows partitioning of compute.

Datacenter Object Root Folder Datastore Datacenter Datacenter Datastore Network VM Folder Host Folder Compute Resource Network VM Folder Host Folder Compute Resource Resource Pool Host Resource Pool Host VM VM .

22 GB) Root Folder Datastore : 2 x (10 GHz. Mem = 10 GB) Resource Pool 2 (5 GHz. 16 GB) = (20 GHz.ComputeResource Object Provides: Hosts: Set of physical resources Resource Pools: How those resources should be allocated VM Folder Datacenter Network Host Folder Compute Resource Resource Pool 1 (CPU = 15 GHz. 32 GB) VM Resource Pool Host Host .

ResourcePool Object Allows you to divide CPU and Memory resources according to policies Virtual Machines are assigned to a Resource Pool and allowed to consume resource according to policy VM Folder Host Folder Compute Resource Resource Pool Resource Pool Resource Pool Host Host VM VM VM VM VM Resource Pool 1 (CPU = 15 GHz. Mem = 10 GB) Resource Pool 2 (5 GHz. 22 GB) VM VM VM VM VM .

and perform host configuration and maintenance activities Root Folder Datastore Datacenter Network VM Folder Host Folder Compute Resource Resource Pool Host VM .Host Object Represents a physical compute resource (1 per server) Has methods to configure datastores and networks.

Properties provide information on: Guest information Virtual file layout Virtualized hardware configuration Compute Resource Resource Pool Host VM Folder Root Folder Datastore Datacenter Network Host Folder Virtual machines are “assigned” to a resource pool but run on a host VM .VirtualMachine Object A virtualized x86 computer environment in which a guest operating system and application software can run.

.VirtualCenter vs ESX Object Model Root Folder Datastore Datacenter Datacenter Root Folder Datastore Network VM Folder Host Folder Compute Resource Host Resource Pool Host Network VM Folder Host Folder Compute Resource Resource Pool VM Virtual Center VM ESX Server Only one allowed.

htm VMware Infrastructure 3 Online Library https://<host>/mob Useful tool to discover and traverse through objects.com/vi301/wwhelp/wwhimpl/js/ html/wwhelp.0 and ESX Server 3. . and properties. Available on any VirtualCenter 2.com/support/developer/vc-sdk/ Latest VI API and SDK documentation Online Reference Guide to inspect objects and properties Getting Started Guide has a good Chapter on Inventory Objects http://pubs.Resources http://www. methods.vmware.0 server.vmware.

All sessions recorded for replay.VI API Webinar Series Future sessions being planned “All you wanted to know about Snapshots” In-depth review of VI 3 CPU and Memory Statistics VItop: Performance monitoring using the VI API Advanced Virtual Machine configuration Sessions planned for delivery approximately every two weeks. . Schedule to be announced soon.

Questions? .

Thank you! .

Sign up to vote on this title
UsefulNot useful