Collapse All
Virtuozzo Virtualization SDK C API Reference
ContentsIndex
PreviousUpNext
PrlVmCfg_SetDefaultConfig Function
PHT_VM_CONFIGURATION

The PrlVmCfg_SetDefaultConfig function selects a default configuration for a new virtual machine based on the operating system that the virtual machine will be running.

Syntax
PRL_RESULT PrlVmCfg_SetDefaultConfig(
    PRL_HANDLE hVmCfg, 
    PRL_HANDLE hSrvConfig, 
    PRL_UINT32 guestOsVersion, 
    PRL_BOOL needCreateDevices
);
File

PrlApiVm.h

Parameters

hVmCfg
A handle of type PHT_VM_CONFIGURATION identifying the virtual machine configuration.
hSrvConfig
A handle of type PHT_SERVER_CONFIG.
guestOsVersion
The version of the operating system that the virtual machine will be running. The OS versions can be found in the PrlOses.h file. The names of the macros are prefixed with PVS_GUEST_VER_ (e.g. PVS_GUEST_VER_MACOS_LEOPARD).
needCreateDevices
A flag indicating whether default virtual machine devices should be created or not. Specify PRL_TRUE to create default devices, or PRL_FALSE to skip the device creation.

Returns

PRL_RESULT. Possible values: 

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed. 

PRL_ERR_SUCCESS - function completed successfully. 

Remarks

The default configuration information is obtained from the host machine configuration, which is passed to the function as a parameter. Using a default configuration for a new virtual machine is the simplest and safest way to configure a new virtual machine. For the example on how to create a new virtual machine using a default configuration, see the PrlVm_Reg function.

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