Scripting Object - VcHostVMotionManager

Scripting-object corresponding to
HostVMotionManager
Attribute of
VcHostInternalConfigManager

Scripting Object Description

Managed object that is responsible for performing VMotion migrations to and from a given host; interface is exported by hostd (used by vpxa) and by vpxa (used by vpxd). The flow at the vpxd level is as follows: ccagent/hostagent handles the actual transfer of VM state as well as VM registration/unregistration. If any of the invocations throw an exception, or a Task completes with an error, vpxd should abort the sequence at that point. ccagent/hostagent and the vmkernel will handle the necessary fallback of the VM to the source host.

After the above sequence has been completed (successfully or not) or aborted, vpxd will invoke completeSource and completeDestination on the VMotionManagers of the appropriate hosts, for cleanup.

At the vpxa level, vpxa handles a VMotionManager invocation by issuing VMDB commands to ccagent (if on a legacy ESX host) or by re-invoking the same VMotionManager method on the hostagent's VMotionManager (if on an ESX 3.x host or later). When dealing with MoRefs (Tasks and the VM) vpxa must translate between its managed objects and hostagent's managed objects.

Attributes

Name Type Description
idString

@since Unknown
morefVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject @since Unknown
sdkConnectionVcSdkConnection

@since Unknown
sdkIdString

@since Unknown
typeStringDeprecated.

Returns the name for the this managed object's vim type @since Unknown
vimHostVcSdkConnection

@since Unknown
vimIdString

@since Unknown
vimTypeString

@since Unknown

Methods

Methods defined in this Scripting Object
_getRef, completeDestination, completeSource, createTrigger, initiateDestination, initiateSource_Task, initiateSourceEx_Task, prepareDestination, prepareDestinationEx_Task, prepareSource, prepareSourceEx_Task, queryMigrationIds, updateMemMirrorFlag, upgradeDestination_Task

_getRef

@since Unknown

Parameters

NameTypeDescription
None

Return Value

Type Description
VcManagedObjectReference

createTrigger

@since Unknown

Parameters

NameTypeDescription
timeoutNumber

filterString

conditionString

filterToSyncString


Return Value

Type Description
Trigger

completeSource

Tell the source that VMotion is over (success or failure). This function is used to inform the caller that the callee has done any processing required to deal with the VMotion results. @since VI API 2.5

Parameters

NameTypeDescription
arg0Number


Return Value

Type Description
None

prepareSource

Prepare a VMotion send operation. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostVMotionManagerSpec

arg1VcVirtualMachine


Return Value

Type Description
None

upgradeDestination_Task

Tell the destination to reparent the disks and commit the redo logs at the end of a dMotion. This is a slightly odd place for this method, since (a) it doesn't technically relate to vMotion and (b) this method gets called after completeDestination, which is slightly counterintuitive. But it's a single internal and transient method, so creating a whole new class for it seems like overkill. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcVirtualMachine

arg1VcHostVMotionManagerReparentSpec []


Return Value

Type Description
VcTask

prepareDestinationEx_Task

Asynchronous version of {@link vim.host.VMotionManager#prepareDestination} @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcHostVMotionManagerSpec

arg1VcResourcePool


Return Value

Type Description
VcTask

updateMemMirrorFlag

Tell VMotionManager that MemMirror migrate is enabled/disabled. Once MemMirror migrate is enabled, all other types of migration will not be allowed. @since vSphere API 4.0

Parameters

NameTypeDescription
arg0Boolean


Return Value

Type Description
None

prepareDestination

Prepare a VMotion receive operation. @since VI API 2.5

Parameters

NameTypeDescription
arg0VcHostVMotionManagerSpec

arg1VcResourcePool


Return Value

Type Description
None

prepareSourceEx_Task

Asynchronous version of {@link vim.host.VMotionManager#prepareSource} @since vSphere API 4.0

Parameters

NameTypeDescription
arg0VcHostVMotionManagerSpec

arg1VcVirtualMachine


Return Value

Type Description
VcTask

queryMigrationIds

Returns a list of migrationIDs where the host is either the source or the destination of the migration. This function is used by VPXD to gather a list of active migrations. @since vSphere API 6.5

Parameters

NameTypeDescription
None

Return Value

Type Description
Number []

initiateSourceEx_Task

Initiate a VMotion send operation. Should be used with hosts ver 4.1 and later. In contrast to InitiateSource method this method initializes task result. @since vSphere API 4.1

Parameters

NameTypeDescription
arg0Number

arg1Number


Return Value

Type Description
VcTask

completeDestination

Tell the destination that VMotion is over (success or failure). This function is used to inform the caller that the callee has done any processing required to deal with the VMotion results. @since VI API 2.5

Parameters

NameTypeDescription
arg0Number


Return Value

Type Description
None

initiateDestination

Initiate a VMotion receive operation. @since VI API 2.5

Parameters

NameTypeDescription
arg0Number

arg1String


Return Value

Type Description
VcHostVMotionManagerDestinationState

initiateSource_Task

Initiate a VMotion send operation. @since VI API 2.5

Parameters

NameTypeDescription
arg0Number

arg1Number


Return Value

Type Description
VcTask