Collapse All
Virtuozzo Virtualization SDK C API Reference
ContentsIndex
PreviousUpNext
PrlSrv_GetDefaultVmConfig Function
PHT_SERVER

Obtains a new handle of type PHT_VIRTUAL_MACHINE.

Syntax
PRL_HANDLE PrlSrv_GetDefaultVmConfig(
    PRL_HANDLE hServer, 
    PRL_CONST_GET_VM_CONFIG_PARAM_DATA_PTR pParam, 
    PRL_UINT32 nFlags
);
File

PrlApiVm.h

Parameters

hServer
A handle of type PHT_SERVER identifying the Virtuozzo Service.
pParam
Pointer to the PRL_GET_VM_CONFIG_PARAM_DATA structure.

Returns

PRL_RESULT. Possible values: 

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed. 

PRL_ERR_SUCCESS - function completed successfully. 

Remarks

Obtaining a new PHT_VIRTUAL_MACHINE handle is the first step when creating a virtual machine. The second step is setting the virtual machine configuration parameters. The final step is calling the PrlVm_Reg function, which will create a new virtual machine. 

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. 

To get the result from the PHT_JOB object:

  1. Use the PrlJob_GetResult function to obtain a handle to the PHT_RESULT object.
  2. Use the PrlResult_GetParam function to obtain a handle of type PHT_VIRTUAL_MACHINE.

Links
Copyright ©2016-2017 Parallels International GmbH. All rights reserved.