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

Shuts down the Virtuozzo Service.

Syntax
PRL_HANDLE PrlSrv_Shutdown(
    PRL_HANDLE hServer, 
    PRL_BOOL bForceShutdown
);
File

PrlApiDisp.h

Parameters

hServer
A handle of type PHT_SERVER identifying the Virtuozzo Service.
bForceShutdown
Specifies whether the shutdown operation should be forced. The value of PRL_TRUE will force the shutdown; PRL_FALSE will perform a normal shutdown. If one or more virtual machines are running, clients are connected, or some tasks are currently in progress, then forcing the shutdown will stop all processes automatically and shut down the machine.
nFlags
A flags to select shutdown mode( from enum PRL_SRV_SHUTDOWN_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

The current user must have sufficient privileges to execute the Virtuozzo Service shutdown. 

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_ACCESS_TOKEN_INVALID - the user doesn't have sufficient privileges. 

PRL_ERR_ANOTHER_USER_SESSIONS_PRESENT - another user is currently connected to the Virtuozzo Service, the Virtuozzo Service shutdown aborted. 

PRL_ERR_SOME_VMS_RUNNING - running virtual machines found, stop the running machines first. 

PRL_ERR_SOME_TASKS_PRESENT - running tasks detected, wait for the tasks to finish or cancel them. 

PRL_ERR_SUCCESS - function completed successfully. 

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