Collapse All
Virtuozzo Virtualization SDK C API Reference
ContentsIndex
PreviousUpNext
PrlVm_MigrateEx Function
PHT_VIRTUAL_MACHINE

Migrates an existing virtual machine to another host.

Syntax
PRL_HANDLE PrlVm_MigrateEx(
    PRL_HANDLE hVm, 
    PRL_CONST_STR target_host, 
    PRL_UINT32 target_port, 
    PRL_CONST_STR target_session_id, 
    PRL_CONST_STR target_home_path, 
    PRL_UINT32 migration_flags, 
    PRL_UINT32 reserved_flags, 
    PRL_BOOL force_operation
);
File

PrlApiVm.h

Parameters

hVm
A handle of type PHT_VIRTUAL_MACHINE identifying the virtual machine.
target_host
The name of the target host machine.
target_port
The port number on the target host.
target_session_id
The target Virtuozzo Service session ID. This ID can be retrieved with PrlLoginResponse_GetSessionUuid from the response of the login request.
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. See acceptable flags at PrlCommandsFlags.h
reserved_flags
Reserved parameter for further purposes
force_operation
Specifies to process VM migration action without asking any additional questions from the Virtuozzo 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

This is an extended version of PrlVm_Migrate function that allows to initiate VM migration process without active connection to target Virtuozzo Service. 

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 ©2016-2017 Parallels International GmbH. All rights reserved.