Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlVm_Delete Function
PHT_VIRTUAL_MACHINE

Deletes the specified virtual machine from the host.

Syntax
PRL_HANDLE PrlVm_Delete(
    PRL_HANDLE hVm, 
    PRL_HANDLE hDevicesList
);
File

PrlApiVm.h

Parameters

hVm
A handle of type PHT_VIRTUAL_MACHINE identifying the virtual machine.
hDevicesList
A handle of type PHT_STRINGS_LIST containing a list of files (devices) to be deleted from the virtual machine directory. If the list is empty or the parameter contains a null pointer, the entire virtual machine directory will be deleted from the host. If the list contains one or more items, only the specified files will be delete (the rest of the virtual machines files will remain on the host in the original directory).

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

This function un-registers the machine from the Parallels Service and deletes all its files. This operation cannot be undone. The specified machine must be registered with the Parallels Service. To un-register a machine from the Parallels Service without deleting any of its file, use the PrlVm_Unreg function. 

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
© 2021 Parallels International GmbH. All rights reserved.