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

The PrlVm_RefreshConfigEx function updates the configuration information contained in the specified virtual machine object (handle).

Syntax
PRL_HANDLE PrlVm_RefreshConfigEx(
    PRL_HANDLE hVm, 
    PRL_UINT32 nFlags
);
File

PrlApiVm.h

Parameters

hVm
A handle of type PHT_VIRTUAL_MACHINE identifying the virtual machine. This is the object that will be updated.
nFlags
A bitset of flags.

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

When you obtain a virtual machine handle that refers to an existing virtual machine, it is populated with the virtual machine configuration data. When working with configuration data, you always work with this local copy. Naturally, the configuration can change on the Virtuozzo Service side at any time. The PrlVm_RefreshConfigEx function allows to re-retrieve the configuration data from the Virtuozzo Service. The function can be used when an event of type PET_DSP_EVT_VM_CONFIG_CHANGED is triggered (the event notifies the client that the virtual machine configuration has been modified), or on unsuccessful PrlVm_Commit operation, or at any time you want to synchronize your local virtual machine object with the Virtuozzo Service. Please note that the function replaces the local data, so if you made any modification to it, the changes will be lost. 

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

PRL_ERR_INVALID_ARG - invalid handle or null pointer was passed. 

PRL_ERR_SUCCESS - function completed successfully. 

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