Collapse All
Parallels C API Reference Guide
PrlVm_Migrate Function
PrlApi.h PHT_VIRTUAL_MACHINE

Migrates an existing virtual machine to another host.

Syntax
PRL_HANDLE PrlVm_Migrate(
    PRL_HANDLE hVm, 
    PRL_HANDLE hTargetServer, 
    PRL_CONST_STR target_home_path, 
    PRL_UINT32 migration_flags, 
    PRL_UINT32 reserved_flags, 
    PRL_BOOL force_operation
);
File
Parameters

hVm
A handle of type PHT_VIRTUAL_MACHINE identifying the virtual machine.
hTargetServer
A handle of type PHT_SERVER identifying the target Parallels Service.
target_home_path
Target VM home path (i.e. where VM will be placed on target system). Empty string accounts as default VM directory path
migration_flags
Flags that specify migration type and etc. Acceptable flags: PVMT_COLD_MIGRATION, PVMT_WARM_MIGRATION, PVMT_HOT_MIGRATION, PVMSL_LOW_SECURITY, PVMSL_NORMAL_SECURITY, PVMSL_HIGH_SECURITY
reserved_flags
Reserved parameter for further purposes
force_operation
Specifies to process VM migration action without asking any additional questions from the Parallels Service side (non-interactive clients should use this option).
Returns

A handle of type PHT_JOB containing the results of this asynchronous operation or PRL_INVALID_HANDLE if there's not enough memory to instantiate the job object.

Remarks

To get the return code from the PHT_JOB object, use the PrlJob_GetRetCode function. Possible values are:

PRL_ERR_INVALID_ARG - invalid handle was passed.

PRL_ERR_SUCCESS - function completed successfully.

Links
Copyright © 1999-2011 Parallels Holdings, Ltd. and its affiliates. All rights reserved.
What do you think about this topic? Send feedback!