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

Migrates an existing virtual machine to another host.

Syntax
PRL_HANDLE PrlVm_MigrateWithRename(
    PRL_HANDLE hVm, 
    PRL_HANDLE hTargetServer, 
    PRL_CONST_STR target_name, 
    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.
hTargetServer
A handle of type PHT_SERVER identifying the target Virtuozzo Service.
target_name
Target VM name (i.e. what name will be given to VM on target system). Specify empty string to preserve VM name from source system.
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

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.