大网数据广告活动
Hyper-V与虚拟化

CheckVirtualSystemIsMigratableToHost method of the CIM_VirtualSystemMigrationService class

· 52CE 我爱测

Method to perform a pre-check to determine whether a virtual system is likely to be successfully migrated to a target host specified by a network name or IP address.

Method to perform a pre-check to determine whether a virtual system is likely to be successfully migrated to a target host specified by a network name or IP address. This method does not guarantee that a subsequent migration will always succeed, due to dynamic resource availability.

Return code description:

Note: This method is intended as a transitional solution only until modeling of cluster support is available.

Syntax

uint32 CheckVirtualSystemIsMigratableToHost(
  [in]  CIM_ComputerSystem REF ComputerSystem,
  [in]  string                 DestinationHost,
  [in]  string                 MigrationSettingData,
  [in]  string                 NewSystemSettingData,
  [in]  string                 NewResourceSettingData[],
  [out] boolean                IsMigratable
);

Parameters

ComputerSystem [in]

A CIM_ComputerSystem reference to the source virtual computer system to be migrated.

DestinationHost [in]

Target host system for the migration.

Acceptable formats for this parameter are conveyed through values of elements of the DestinationHostFormatsSupported[ ] array property in the instance of the CIM_VirtualSystemMigrationCapabilities that is associated through the CIM_ElementCapabilities association.

MigrationSettingData [in]

String containing an embedded instance of the CIM_VirtualSystemMigrationSettingData class representing migration settings applicable to the migration operation.

NewSystemSettingData [in]

String containing an embedded instance of the CIM_VirtualSystemSettingData class representing new properties applicable to the virtual system after it is migrated.

NewResourceSettingData [in]

Array of strings each containing an embedded instance of the CIM_ResourceAllocationSettingData class representing new properties applicable to virtual resources in the scope of the virtual system after it is migrated.

IsMigratable [out]

The migration check result indicating whether or not the virtual system can be successfully migrated.

Return value

Returns a 0 on success; otherwise, returns an error.

Return code/value Description
Completed with No Error 0 Check performed; result reported through the value of the [Out] IsMigratable parameter.
Not Supported 1 Method not supported by implementation. No result reported through the value of the [Out] IsMigratable parameter.
Failed 2 Check failed for unspecified reasons. No result reported through the value of the [Out] IsMigratable parameter.
Timeout 3 Check timed out. No result reported through the value of the [Out] IsMigratable parameter.
Invalid Parameter 4 One or more parameters are formally invalid. For example, the value of the DestinationHost parameter could have been specified in an unsupported format. No result reported through the value of the [Out] IsMigratable parameter.
Invalid State 5 The source virtual system, the source host system or the target host system are in a state that does allow initiation of the requested virtual system migration; this may be a temporary condition. No result reported through the value of the [Out] IsMigratable parameter.
Incompatible Parameters 6 One or more input parameters are incompatible as a set, or with respect to the target host. For example the value of the MigrationNewSettingData parameter contains properties that are not supported by the target host system identified by the value of the DestinationHost parameter. No result reported through the value of the [Out] IsMigratable parameter.
DMTF Reserved ..
Method Reserved 4097..32767
Vendor Specific 32768..65535

Requirements

Requirement Value
Minimum supported client Windows 8.1
Minimum supported server Windows Server 2012 R2
Namespace Root\virtualization\v2
MOF WindowsVirtualization.V2.mof
DLL Vmms.exe

See also

CIM_VirtualSystemMigrationService

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。