SEND US FEEDBACK!
vSphere API/SDK Documentation > vSphere Management SDK > vSphere Web Services SDK Documentation > VMware vSphere API Reference > Managed Object Types > S
  • 0 Ratings

Managed Object - ServiceInstance(vim.ServiceInstance)

See also
Capability, Event, HostSystem, HostVMotionCompatibility, ProductComponentInfo, ResourcePool, ServiceContent, VirtualMachine, VirtualMachinePowerState


Managed Object Description

The ServiceInstance managed object is the singleton root object of the inventory on both vCenter servers and servers running on standalone host agents. The server creates the ServiceInstance automatically, and also automatically creates the various manager entities that provide services in the virtual environment. Some examples of manager entities are LicenseManager, PerformanceManager, and ViewManager. You can access the manager entities through the content property.

A vSphere API client application begins by connecting to a server and obtaining a reference to the ServiceInstance. The client can then use the RetrieveServiceContent method to gain access to the various vSphere manager entities and to the root folder of the inventory.

When you create managed objects, the server adds them to the inventory. The inventory of managed objects includes instances the following object types:

The following figure shows the organization of managed objects in the vCenter hierarchy:

vCenter ServiceInstance Hierarchy

Every Datacenter has the following set of dedicated folders. These folders are empty until you create entities for the Datacenter.

The host agent hierarchy has the same general form as the vCenter hierarchy, but most of the objects are limited to one instance:

Host Agent Service Instance Hierarchy

Properties

Name Type Description
capability PCapability

API-wide capabilities.
content PServiceContent

The properties of the ServiceInstance managed object. The content property is identical to the return value from the RetrieveServiceContent method.

Use the content property with the PropertyCollector to perform inventory traversal that includes the ServiceInstance. (In the absence of a content property, a traversal that encounters the ServiceInstance would require calling the RetrieveServiceContent method, and then invoking a second traversal to continue.)

serverClock Pxsd:dateTime

Contains the time most recently obtained from the server. The time is not necessarily current. This property is intended for use with the PropertyCollector WaitForUpdates method. The PropertyCollector will provide notification if some event occurs that changes the server clock time in a non-linear fashion.

You should not rely on the serverClock property to get the current time on the server; instead, use the CurrentTime method.

PRequired privilege - see tooltip for details

Methods

Methods defined in this Managed Object
CurrentTime, QueryVMotionCompatibility, RetrieveProductComponents, RetrieveServiceContent, ValidateMigration

CurrentTime(currentTime)

Returns the current time on the server. To monitor non-linear time changes, use the serverClock property.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ServiceInstance used to make the method call.

Return Value

Type Description
xsd:dateTimeThe date and time on the server.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



QueryVMotionCompatibility(queryVMotionCompatibility)

Deprecated. As of vSphere API 4.0, use QueryVMotionCompatibilityEx_Task instead.

Investigates the general VMotion compatibility of a virtual machine with a set of hosts. The virtual machine may be in any power state. Hosts may be in any connection state and also may be in maintenance mode.
Required Privileges
Resource.QueryVMotion

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ServiceInstance used to make the method call.
vmManagedObjectReference
to a VirtualMachine

The virtual machine that is the designated VMotion candidate.
hostManagedObjectReference[]
to a HostSystem[]

The group of hosts to analyze for compatibility.
compatibility*xsd:string[]

The set of compatibility types to investigate. Each is a string chosen from VMotionCompatibilityType. If this argument is not set, then all compatibility types are investigated.
*Need not be set

Return Value

Type Description
HostVMotionCompatibility[]An array where each element, associated with one of the input hosts, specifies which of the requested compatibility types applies to that host. If an input host has never been connected and therefore has no information available for determining its compatibility, it is omitted from the return list.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



RetrieveProductComponents(retrieveProductComponents)

Component information for bundled products
Required Privileges
System.Anonymous
Since
VI API 2.5

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ServiceInstance used to make the method call.

Return Value

Type Description
ProductComponentInfo[]

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



RetrieveServiceContent(retrieveContent)

Retrieves the properties of the service instance.
Required Privileges
System.Anonymous

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ServiceInstance used to make the method call.

Return Value

Type Description
ServiceContentThe properties belonging to the service instance, including various object managers.

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition



ValidateMigration(validateMigration)

Deprecated. As of vSphere API 4.0, use VirtualMachineProvisioningChecker instead.

Checks the validity of a set of proposed migrations. A migration is the act of changing the assigned execution host of a virtual machine, which can result from invoking MigrateVM_Task or RelocateVM_Task.
Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the ServiceInstance used to make the method call.
vmManagedObjectReference[]
to a VirtualMachine[]

The set of virtual machines intended for migration.
state*VirtualMachinePowerState

The power state that the virtual machines must have. If this argument is not set, each virtual machine is evaluated according to its current power state.
testType*xsd:string[]

The set of tests to run. If this argument is not set, all tests will be run.
pool*ManagedObjectReference
to a ResourcePool

The target resource pool for the virtual machines. If the pool parameter is left unset, the target pool for each particular virtual machine's migration will be that virtual machine's current pool. If the virtual machine is a template then either this parameter or the host parameter must be set; additionally if resource tests are requested then this parameter is required.
host*ManagedObjectReference
to a HostSystem

The target host on which the virtual machines will run. The host parameter may be left unset if the compute resource associated with the target pool represents a stand-alone host or a DRS-enabled cluster. In the former case the stand-alone host is used as the target host. In the latter case, each connected host in the cluster that is not in maintenance mode is tested as a target host. If the virtual machine is a template then either this parameter or the pool parameter must be set.
*Need not be set

Return Value

Type Description
Event[]A set of events that describe the warnings or errors that would apply if the proposed set of migrations were executed.

Faults

Type Description
InvalidArgumentThrown if the target host(s) and target pool for a migration are not associated with the same compute resource, or if the host parameter is left unset when the target pool is associated with a non-DRS cluster.
InvalidPowerStateThrown if the state argument is set and at least one of the specified virtual machines is not in that power state.
InvalidState
NoActiveHostInClusterThrown if a target host is not specified and a cluster associated with a target pool does not contain at least one potential target host. A host must be connected and not in maintenance mode in order to be considered as a potential target host.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition






Feedback

  • 0 Ratings