Parallels Python API Referenceupdates.cloudserver.virtuozzo.com/doc/pcs/en_us/parallels/5/rtm/... · Parallels Python API Reference API Documentation September 16, 2009 Contents Contents
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
del (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.8.2 Properties
Name Description
Inherited from objectclass
10
Class Result Package prlsdkapi
1.9 Class Result
object
prlsdkapi. Handle
prlsdkapi.Result
Contains the results of an asynchronous operation.
1.9.1 Methods
get params count(self )
Determine the number of items (strings, objects) in the Result object.
get param by index(self, nIndex )
Obtain an object containing the results identified by index.
get param(self )
Obtain an object containing the results of the corresponding asynchronousoperation.
get param by index as string(self, nIndex )
Obtain a string result from the Result object identified by index.
get param as string(self )
Obtain a string result from the Result object.
len (self )
getitem (self, index )
iter (self )
next(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
11
Class Event Package prlsdkapi
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.9.2 Properties
Name Description
Inherited from objectclass
1.10 Class Event
object
prlsdkapi. Handle
prlsdkapi.Event
Contains information about a system event or an extended error information in an asyn-chronous method invocation.
1.10.1 Methods
get type(self )
Overrides: prlsdkapi. Handle.get type
get server(self )
get vm(self )
get job(self )
get params count(self )
get param(self, nIndex )
get param by name(self, sParamName)
12
Class Event Package prlsdkapi
get err code(self )
get err string(self, bIsBriefMessage, bFormated)
can be ignored(self )
is answer required(self )
get issuer type(self )
get issuer id(self )
create answer event(self, nAnswer)
len (self )
getitem (self, index )
iter (self )
next(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.10.2 Properties
Name Description
Inherited from objectclass
13
Class EventParam Package prlsdkapi
1.11 Class EventParam
object
prlsdkapi. Handle
prlsdkapi.EventParam
Contains the system event parameter data.
1.11.1 Methods
get name(self )
get type(self )
Overrides: prlsdkapi. Handle.get type
to string(self )
to cdata(self )
to uint32(self )
to int32(self )
to uint64(self )
to int64(self )
to boolean(self )
to handle(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
14
Class Job Package prlsdkapi
1.11.2 Properties
Name Description
Inherited from objectclass
1.12 Class Job
object
prlsdkapi. Handle
prlsdkapi.Job
Provides methods for managing asynchronous operations (jobs).
1.12.1 Methods
wait(self, msecs=2147483647)
Suspend the main thread and wait for the job to finish.
cancel(self )
Cancel the specified job.
get status(self )
Obtain the current job status.
get progress(self )
Obtain the job progress info.
get ret code(self )
Obtain the return code from the job object.
get result(self )
Obtain the Result object containing the results returned by the job.
15
Class Server Package prlsdkapi
get error(self )
Provide additional job error information.
get op code(self )
Return the job operation code.
is request was sent(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.12.2 Properties
Name Description
Inherited from objectclass
1.13 Class Server
object
prlsdkapi. Handle
prlsdkapi.Server
The main class providing methods for accessing Parallels Service. Most of the operations inthe Parallels Python API begin with obtaining an instance of this class. The class is used toestablish a connection with the Parallels Service. Its other methods can be used to performvarious tasks related to the Parallels Service itself, higher level virtual machine tasks, suchas obtaining the virtual machine list or creating a virtual machine, and many others.
16
Class Server Package prlsdkapi
1.13.1 Methods
init (self, handle=0)
x. init (...) initializes x; see x. class . doc for signature
Allows to synchronously receive questions from Parallels Service.
set non interactive session(self, bNonInteractive, nFlags=0)
Set the session in noninteractive or interactive mode.
is non interactive session(self )
get srv config(self )
Obtain the ServerConfig object containing the host configurationinformation.
get common prefs(self )
Obtain the DispConfig object containing the specified Parallels Servicepreferences info.
17
Class Server Package prlsdkapi
common prefs begin edit(self )
Mark the beginning of the Parallels Service preferences modification operation.This method must be called before making any changes to the ParallelsService common preferences (see DispConfig). When you are done makingthe changes, call Server.common prefs commit to commit the changes.
common prefs commit(self, hDispCfg)
Commit the Parallels Server preferences changes.
get user profile(self )
Obtain the UserConfig object containing profile data of the currently loggedin user.
get user info list(self )
Obtain a list of UserInfo objects containing information about all knownusers.
get user info(self, sUserId)
Obtain the UserInfo object containing information about the specified user.
get virtual network list(self, nFlags=0)
Obtain the VirtualNet object containing information about all existingvirtual networks.
add virtual network(self, hVirtNet, nFlags=0)
Add a new virtual network to the Parallels Service configuration.
update virtual network(self, hVirtNet, nFlags=0)
Update parameters of an existing virtual network.
delete virtual network(self, hVirtNet, nFlags=0)
Remove an existing virtual network from the Parallels Service configuration.
configure generic pci(self, hDevList, nFlags=0)
Configure the PCI device assignment.
18
Class Server Package prlsdkapi
get statistics(self )
Obtain the Statistics object containing the host resource usage statistics.
user profile begin edit(self )
user profile commit(self, hUserProfile)
Saves (commits) user profile changes to the Parallels Service.
is connected(self )
Determine if the connection to the specified Parallels Service is active.
get server info(self )
Obtain the ServerInfo object containing the host computer information.
Backup an existing virtual machine to a backup server.
restore vm backup(self, sVmUuid, sBackupUuid, sTargetHost, nTargetPort,sTargetSessionId, sTargetVmHomePath=’’, sTargetVmName=’’,restore flags=0, reserved flags=0, force operation=True)
Restore a virtual machine from a backup server.
get backup tree(self, sVmUuid, sTargetHost, nTargetPort, sTargetSessionId,backup flags=2048, reserved flags=0, force operation=True)
Get backups tree from backup server.
remove vm backup(self, sVmUuid, sBackupUuid, sTargetHost, nTargetPort,sTargetSessionId, remove flags, reserved flags, force operation)
Remove backup of the virtual machine from the backup server.
subscribe to host statistics(self )
Subscribe to receive host statistics. This is an asynchronous method.
Return Value
A Job object.
unsubscribe from host statistics(self )
Cancel the host statistics subscription. Cancel the host statistics subscriptionthat was started using the subscribe from host statistics method. This isan asynchronous method.
Return Value
A Job object.
20
Class Server Package prlsdkapi
shutdown(self, bForceShutdown=False)
Shut down the Parallels Service.
fs get disk list(self )
Returns a list of root directories on the host computer.
fs get dir entries(self, path)
Retrieve information about a file system entry on the host.
fs create dir(self, path)
Create a directory in the specified location on the host.
fs remove entry(self, path)
Remove a file system entry from the host computer.
fs can create file(self, path)
Determine if the current user has rights to create a file on the host.
fs rename entry(self, oldPath, newPath)
Rename a file system entry on the host.
update license(self, sKey, sUser, sCompany)
Installs Parallels license on the specified Parallels Service.
get license info(self )
Obtain the License object containing the Parallels license information.
send answer(self, hAnswer)
Send an answer to the Parallels Service in response to a question.
start search vms(self, hStringsList=0)
Searche for unregistered virtual machines at the specified location(s).
net service start(self )
Start the Parallels network service.
21
Class Server Package prlsdkapi
net service stop(self )
Stop the Parallels network service.
net service restart(self )
Restarts the Parallels network service.
net service restore defaults(self )
Restores the default settings of the Parallels network service.
get net service status(self )
Obtain the NetService object containing the Parallels network service statusinformation.
get problem report(self )
Obtain a problem report in the event of a virtual machine operation failure.
attach to lost task(self, sTaskId)
Obtain a handle to a running task after the connection to the Parallels Servicewas lost.
Automatically generate a unique name for a new directory.
subscribe to perf stats(self, sFilter)
Subscribe to receive perfomance statistics.
unsubscribe from perf stats(self )
Cancels the performance statistics subscription.
get perf stats(self, sFilter)
Inherited from prlsdkapi. Handle
del (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
22
Class FsInfo Package prlsdkapi
1.13.2 Properties
Name Description
Inherited from objectclass
1.14 Class FsInfo
object
prlsdkapi. Handle
prlsdkapi.FsInfo
Contains information about a file system entry and its immediate child elements (files anddirectories) on the host computer.
1.14.1 Methods
get type(self )
Overrides: prlsdkapi. Handle.get type
get fs type(self )
get child entries count(self )
get child entry(self, nIndex )
get parent entry(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.14.2 Properties
23
Class FsEntry Package prlsdkapi
Name Description
Inherited from objectclass
1.15 Class FsEntry
object
prlsdkapi. Handle
prlsdkapi.FsEntry
Contains information about a file system entry (disk, directory, file) on the host computer.
1.15.1 Methods
get absolute path(self )
get relative name(self )
get last modified date(self )
get size(self )
get permissions(self )
get type(self )
Overrides: prlsdkapi. Handle.get type
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.15.2 Properties
24
Class ServerConfig Package prlsdkapi
Name Description
Inherited from objectclass
1.16 Class ServerConfig
object
prlsdkapi. Handle
prlsdkapi.ServerConfig
Provides methods for obtaining the host computer configuration information.
1.16.1 Methods
get host ram size(self )
Determine the amount of memory (RAM) available on the host.
get cpu model(self )
Determine the model of CPU of the host machine.
get cpu count(self )
Determine the number of CPUs in the host machine.
get cpu speed(self )
Determine the host machine CPU speed.
get cpu mode(self )
Determine the CPU mode (32 bit or 64 bit) of the host machine.
get cpu hvt(self )
Determine the hardware virtualization type of the host CPU.
get host os type(self )
Return the host operating system type.
25
Class ServerConfig Package prlsdkapi
get host os major(self )
Return the major version number of the host operating system.
get host os minor(self )
Return the minor version number of the host operating system.
get host os sub minor(self )
Return the sub-minor version number of the host operating system.
get host os str presentation(self )
Return the full host operating system information as a single string.
is sound default enabled(self )
Determine whether a sound device on the host is enabled or disabled.
is usb supported(self )
Determine if USB is supported on the host.
is vtd supported(self )
Determine whether VT-d is supported on the host.
get hostname(self )
Return the hostname of the specified host or guest.
get default gateway(self )
Obtain the global default gateway address of the specified host or guest.
get dns servers(self )
Obtain the list of IP addresses of DNS servers for the host or guest.
get search domains(self )
Obtain the list of search domains for the specified host or guest.
get floppy disks count(self )
Determine the number of floppy disk drives on the host.
26
Class ServerConfig Package prlsdkapi
get floppy disk(self, nIndex )
Obtain the HostDevice object containing information about a floppy diskdrive on the host.
get optical disks count(self )
Determine the number of optical disk drives on the host.
get optical disk(self, nIndex )
Obtain the HostDevice object containing information about an optical diskdrive on the host.
get serial ports count(self )
Determine the number of serial ports available on the host.
get serial port(self, nIndex )
Obtain the HostDevice object containing information about a serial port onthe host.
get parallel ports count(self )
Determine the number of parallel ports on the host.
get parallel port(self, nIndex )
Obtain the HostDevice object containing information about a parallel port onthe host.
get sound output devs count(self )
Determine the number of sound devices available on the host.
get sound output dev(self, nIndex )
Obtain the HostDevice object containing information about a sound device onthe host.
get sound mixer devs count(self )
Determine the number of sound mixer devices available on the host.
get sound mixer dev(self, nIndex )
Obtain the HostDevice object containing information about a sound mixerdevice on the host.
27
Class ServerConfig Package prlsdkapi
get printers count(self )
Determine the number of printers installed on the host.
get printer(self, nIndex )
Obtain the HostDevice object containing information about a printerinstalled on the host.
get generic pci devices count(self )
Determine the number of PCI devices installed on the host.
get generic pci device(self, nIndex )
Obtain the HostDevice object containing information about a PCI deviceinstalled on the host.
get generic scsi devices count(self )
Determine the number of generic SCSI devices installed on the host.
get generic scsi device(self, nIndex )
Obtain the HostDevice object containing information about a generic SCSIdevice.
get usb devs count(self )
Determine the number of USB devices on the host.
get usb dev(self, nIndex )
Obtain the HostDevice object containing information about a USB device onthe host.
get hard disks count(self )
Determine the number of hard disk drives on the host.
get hard disk(self, nIndex )
Obtain the HostHardDisk object containing information about a hard disksdrive on the host.
get net adapters count(self )
Determine the number of network adapters available on the server.
28
Class HostDevice Package prlsdkapi
get net adapter(self, nIndex )
Obtain the HostNet object containing information about a network adapter inthe host or guest.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.16.2 Properties
Name Description
Inherited from objectclass
1.17 Class HostDevice
object
prlsdkapi. Handle
prlsdkapi.HostDevice
Known Subclasses: prlsdkapi.HostHardDisk, prlsdkapi.HostNet, prlsdkapi.HostPciDevice
A base class providing methods for obtaining information about physical devices on the hostcomputer. The descendants of this class provide additional methods specific to a particulardevice type.
1.17.1 Methods
get name(self )
Obtain the device name.
get id(self )
Obtain the device ID.
29
Class HostHardDisk Package prlsdkapi
get type(self )
Obtain the device type.
Overrides: prlsdkapi. Handle.get type
is connected to vm(self )
Determine whether the device is connected to a virtual machine.
get device state(self )
Determine whether a virtual machine can directly use a PCI device throughIOMMU technology.
set device state(self, nDeviceState)
Set whether a virtual machine can directly use a PCI device through IOMMUtechnology.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.17.2 Properties
Name Description
Inherited from objectclass
1.18 Class HostHardDisk
object
prlsdkapi. Handle
prlsdkapi.HostDevice
prlsdkapi.HostHardDisk
Provides methods for obtaining information about a physical hard disk on the host computer.
30
Class HostHardDisk Package prlsdkapi
1.18.1 Methods
get dev name(self )
Return the hard disk device name.
get dev id(self )
Return the hard disk device id.
get dev size(self )
Return the size of the hard disk device.
get disk index(self )
Return the index of a hard disk device.
get parts count(self )
Determine the number of partitions available on a hard drive.
get part(self, nIndex )
Obtain the HdPartition object identifying the specified hard disk partition.
Inherited from prlsdkapi.HostDevice(Section 1.17)
get device state(), get id(), get name(), get type(), is connected to vm(), set device state()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.18.2 Properties
Name Description
Inherited from objectclass
31
Class HdPartition Package prlsdkapi
1.19 Class HdPartition
object
prlsdkapi. Handle
prlsdkapi.HdPartition
Provides methods for obtaining information about a physical hard disk partition on the hostcomputer.
1.19.1 Methods
get name(self )
Return the hard disk partition name.
get sys name(self )
Return the hard disk partition system name.
get size(self )
Return the hard disk partition size.
get index(self )
Return the index of the hard disk partition.
get type(self )
Return a numerical code identifying the type of the partition.
Overrides: prlsdkapi. Handle.get type
is in use(self )
Determines whether the partition is in use ( contains valid file system, beingused for swap, etc.).
is logical(self )
Determine whether the specified partition is a logical partition.
is active(self )
Determine whether the disk partition is active or inactive.
32
Class HostNet Package prlsdkapi
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.19.2 Properties
Name Description
Inherited from objectclass
1.20 Class HostNet
object
prlsdkapi. Handle
prlsdkapi.HostDevice
prlsdkapi.HostNet
Provides methods for obtaining information about a physical network adapter on the hostcomputer.
1.20.1 Methods
get net adapter type(self )
Return the network adapter type.
get sys index(self )
Return the network adapter system index.
is enabled(self )
Determine whether the adapter is enabled or disabled.
33
Class HostNet Package prlsdkapi
is configure with dhcp(self )
Determine whether the adapter network settings are configured throughDHCP.
get default gateway(self )
Obtain the default gateway address for the specified network adapter.
get mac address(self )
Return the MAC address of the specified network adapter.
get vlan tag(self )
Return the VLAN tag of the network adapter.
get net addresses(self )
Obtain the list of network addresses (IP address/Subnet mask pairs) assignedto the network adapter.
get dns servers(self )
Obtain the list of addresses of DNS servers assigned to the specified networkadapter.
get search domains(self )
Obtain a list of search domains assigned to the specified network adapter.
Inherited from prlsdkapi.HostDevice(Section 1.17)
get device state(), get id(), get name(), get type(), is connected to vm(), set device state()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.20.2 Properties
Name Description
Inherited from objectcontinued on next page
34
Class HostPciDevice Package prlsdkapi
Name Description
class
1.21 Class HostPciDevice
object
prlsdkapi. Handle
prlsdkapi.HostDevice
prlsdkapi.HostPciDevice
Provides methods for obtaining information about a PCI device on the host computer.
1.21.1 Methods
get device class(self )
Inherited from prlsdkapi.HostDevice(Section 1.17)
get device state(), get id(), get name(), get type(), is connected to vm(), set device state()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.21.2 Properties
Name Description
Inherited from objectclass
35
Class UserConfig Package prlsdkapi
1.22 Class UserConfig
object
prlsdkapi. Handle
prlsdkapi.UserConfig
Provides methods for obtaining information about the currently logged in user and for settingthe user preferences.
1.22.1 Methods
get vm dir uuid(self )
Return name and path of the default virtual machine folder for the ParallelsService.
set vm dir uuid(self, sNewVmDirUuid)
Set the default virtual machine directory name and path for the ParallelsService.
get default vm folder(self )
Return name and path of the default virtual machine directory for the user.
set default vm folder(self, sNewDefaultVmFolder)
Set the default virtual machine folder for the user.
can use mng console(self )
Determine if the user is allowed to use the Parallels Service ManagementConsole.
can change srv sets(self )
Determine if the current user can modify Parallels Service preferences.
is local administrator(self )
Determine if the user is a local administrator on the host where ParallelsService is running.
Inherited from prlsdkapi. Handle
36
Class UserInfo Package prlsdkapi
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.22.2 Properties
Name Description
Inherited from objectclass
1.23 Class UserInfo
object
prlsdkapi. Handle
prlsdkapi.UserInfo
Provides methods for obtaining information about the specified Parallels Service user.
1.23.1 Methods
get name(self )
Return the user name.
get uuid(self )
Returns the user Universally Unique Identifier (UUID).
get session count(self )
Return the user active session count.
get default vm folder(self )
Return name and path of the default virtual machine directory for the user.
37
Class DispConfig Package prlsdkapi
can change srv sets(self )
Determine whether the specified user is allowed to modify Parallels Servicepreferences.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.23.2 Properties
Name Description
Inherited from objectclass
1.24 Class DispConfig
object
prlsdkapi. Handle
prlsdkapi.DispConfig
Provides methods for managing Parallels Service preferences.
1.24.1 Methods
get default vm dir(self )
Obtain name and path of the directory in which new virtual machines arecreated by default.
Return Value
A string containing name and path of the default virtual machinedirectory.
38
Class DispConfig Package prlsdkapi
get reserved mem limit(self )
Determine the amount of physical memory reserved for Parallels Serviceoperation.
Return Value
Integer. The memory size in megabytes.
set reserved mem limit(self, nMemSize)
Set the amount of memory that will be allocated for Parallels Serviceoperation.
Parameters
nMemSize: Integer. The memory size in megabytes.
get min vm mem(self )
Determine the minimum required memory size that must be allocated to anindividual virtual machine.
Return Value
Integer. The memory size in megabytes.
set min vm mem(self, nMemSize)
Set the minimum required memory size that must be allocated to anindividual virtual machine.
Parameters
nMemSize: Integer. The memory size in megabytes.
get max vm mem(self )
Determine the maximum memory size that can be allocated to an individualvirtual machine.
Return Value
Integer. The memory size in megabytes.
set max vm mem(self, nMemSize)
Set the maximum memory size that can be allocated to an individual virtualmachine.
Parameters
nMemSize: Integer. The memory size in megabytes.
39
Class DispConfig Package prlsdkapi
get recommend max vm mem(self )
Determine the recommended memory size for an individual virtual machine.
Return Value
Integer. The memory size in megabytes.
set recommend max vm mem(self, nMemSize)
Set recommended memory size for an individual virtual machine.
Parameters
nMemSize: Integer. The memory size in megabytes.
get max reserv mem limit(self )
Return the maximum amount of memory that can be reserved for ParallelsService operation.
set max reserv mem limit(self, nMemSize)
Set the upper limit of the memory size that can be reserved for ParallelsService operation.
Parameters
nMemSize: Integer. The memory size in megabytes.
get min reserv mem limit(self )
Return the minimum amount of physical memory that must be reserved forParallels Service operation.
Return Value
Integer. The memory size in megabytes.
set min reserv mem limit(self, nMemSize)
Set the lower limit of the memory size that must be reserved for ParallelsService operation.
Parameters
nMemSize: Integer. The memory size in megabytes.
40
Class DispConfig Package prlsdkapi
is adjust mem auto(self )
Determine whether memory allocation for Parallels Service is performedautomatically or manually.
Set the Parallels Service memory allocation mode (automatic or manual).
Parameters
bAdjustMemAuto: Boolean. Set to True for automatic mode. Set toFalse for manual mode.
is send statistic report(self )
set send statistic report(self, bSendStatisticReport)
get default vnchost name(self )
Return the default VNC host name for the Parallels Service.
Return Value
A string containing the VNC host name.
set default vnchost name(self, sNewHostName)
Set the base VNC host name.
Parameters
sNewHostName: String. The VNC host name to set.
get vncbase port(self )
Obtain the currently set base VNC port number.
Return Value
Integer. The port number.
set vncbase port(self, nPort)
Set the base VNC port number.
Parameters
nPort: Integer. Port number.
41
Class DispConfig Package prlsdkapi
can change default settings(self )
Determine if new users have the right to modify Parallels Service preferences.
Return Value
Boolean. True indicates that new users can modify preferences.False indicates otherwise.
set can change default settings(self, bDefaultChangeSettings)
Grant or deny a permission to new users to modify Parallels Servicepreferences.
get min security level(self )
Determine the lowest allowable security level that can be used to connect tothe Parallels Service.
Return Value
One of the following constants: PSL LOW SECURITY – PlainTCP/IP (no encryption). PSL NORMAL SECURITY – importantdata is sent and received using SSL. PSL HIGH SECURITY – alldata is sent and received using SSL.
set min security level(self, nMinSecurityLevel)
Set the lowest allowable security level that can be used to connect to theParallels Service.
Parameters
nMinSecurityLevel: Security level to set. Can be one of thefollowing constants: PSL LOW SECURITY –Plain TCP/IP (no encryption).PSL NORMAL SECURITY – important datais sent and received using SSL.PSL HIGH SECURITY – all data is sent andreceived using SSL.
get default backup server(self )
set default backup server(self, sBackupServer)
get backup user login(self )
set backup user login(self, sUserLogin)
42
Class VirtualNet Package prlsdkapi
set backup user password(self, sUserPassword)
is backup user password enabled(self )
set backup user password enabled(self, bUserPasswordEnabled)
get default backup directory(self )
set default backup directory(self, sBackupDirectory)
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.24.2 Properties
Name Description
Inherited from objectclass
1.25 Class VirtualNet
object
prlsdkapi. Handle
prlsdkapi.VirtualNet
Provides methods for managing Parallels virtual networks.
1.25.1 Methods
init (self, handle=0)
x. init (...) initializes x; see x. class . doc for signature
Return the description of the specified virtual network.
set description(self, sDescription)
Sets the virtual network description.
get network type(self )
Return the virtual network type.
set network type(self, nNetworkType)
Set the virtual network type.
get bound card mac(self )
Return the bound card MAC address of the specified virtual network.
set bound card mac(self, sBoundCardMac)
Sets the specified virtual network bound card MAC address.
get adapter name(self )
Return the name of the network adapter in the specified virtual network.
set adapter name(self, sAdapterName)
Sets the specified virtual network adapter name.
get adapter index(self )
Return a numeric index assigned to the network adapter in the specifiedvirtual network.
44
Class VirtualNet Package prlsdkapi
set adapter index(self, nAdapterIndex )
Sets the specified adapter index.
get host ipaddress(self )
Return the host IP address of the specified virtual network.
set host ipaddress(self, sHostIPAddress)
Set the virtual network host IP address.
get dhcp ipaddress(self )
Return the DHCP IP address of the specified virtual network.
set dhcp ipaddress(self, sDhcpIPAddress)
Set the virtual network DHCP IP address.
get ipnet mask(self )
Return the IP net mask of the specified virtual network.
set ipnet mask(self, sIPNetMask)
Set the virtual network IP net mask.
get vlan tag(self )
Return the VLAN tag of the specified virtual network.
set vlan tag(self, nVlanTag)
Set the VLAN tag for the virtual network.
get ipscope start(self )
Returns the DHCP starting IP address of the specified virtual network.
set ipscope start(self, sIPScopeStart)
Set the virtual network DHCP starting IP address.
get ipscope end(self )
Return the DHCP ending IP address of the specified virtual network.
45
Class VirtualNet Package prlsdkapi
set ipscope end(self, sIPScopeEnd)
Set the virtual network DHCP ending IP address
is enabled(self )
Determine whether the virtual network is enabled or disabled.
set enabled(self, bEnabled)
Enable or disable the virtual network.
is adapter enabled(self )
Determine whether the virtual network adapter is enabled or disabled.
set adapter enabled(self, bEnabled)
Enable or disable a virtual network adapter.
is dhcpserver enabled(self )
Determine whether the virtual network DHCP server is enabled or disabled.
set dhcpserver enabled(self, bEnabled)
Enable or disable the virtual network DHCP server.
is natserver enabled(self )
Determine whether the specified virtual network NAT server is enabled ordisabled.
set natserver enabled(self, bEnabled)
Enable or disable the virtual network NAT server.
get port forward list(self, nPortFwdType)
Return the port forward entries list.
set port forward list(self, nPortFwdType, hPortFwdList)
Set the port forward entries list.
get bound adapter info(self, hSrvConfig)
Obtain info about a physical adapter, which is bound to the virtual networkobject.
46
Class PortForward Package prlsdkapi
Inherited from prlsdkapi. Handle
del (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.25.2 Properties
Name Description
Inherited from objectclass
1.26 Class PortForward
object
prlsdkapi. Handle
prlsdkapi.PortForward
Provides access to the Port Forwarding functionality. Using this functionality, you canredirect all incoming data from a specific TCP port on the host computer to a specified portin a specified virtual machine.
1.26.1 Methods
init (self, handle=0)
x. init (...) initializes x; see x. class . doc for signature
Physically create a virtual device image on the host.
resize image(self, nNewSize, nFlags)
Resize the virtual device image.
get index(self )
Return the index identifying the virtual device.
set index(self, nIndex )
Set theindex identifying the virtual device.
remove(self )
Remove the virtual device object from the parent virtual machine list.
get type(self )
Return the virtual device type.
Overrides: prlsdkapi. Handle.get type
is connected(self )
Determine if the virtual device is connected.
set connected(self, bConnected)
Connect the virtual device.
is enabled(self )
Determine if the device is enabled.
set enabled(self, bEnabled)
Enable the specified virtual device.
is remote(self )
Determine if the virtual device is a remote device.
49
Class VmDevice Package prlsdkapi
set remote(self, bRemote)
Change the ’remote’ flag for the specified device.
get emulated type(self )
Return the virtual device emulation type.
set emulated type(self, nEmulatedType)
Sets the virtual device emulation type.
get image path(self )
Return virtual device image path.
set image path(self, sNewImagePath)
Set the virtual device image path.
get sys name(self )
Return the virtual device system name.
set sys name(self, sNewSysName)
Set the virtual device system name.
get friendly name(self )
Return the virtual device user-friendly name.
set friendly name(self, sNewFriendlyName)
Set the virtual device user-friendly name.
get description(self )
Return the description of a virtual device.
set description(self, sNewDescription)
Set the device description.
get iface type(self )
Return the virtual device interface type (IDE or SCSI).
50
Class VmDevice Package prlsdkapi
set iface type(self, nIfaceType)
Set the virtual device interface type (IDE or SCSI).
get stack index(self )
Return the virtual device stack index (position at the IDE/SCSI controllerbus).
set stack index(self, nStackIndex )
Set the virtual device stack index (position at the IDE or SCSI controller bus).
set default stack index(self )
Generates a stack index for the device (the device interface, IDE or SCSI,must be set in advance).
get output file(self )
Return the virtual device output file.
set output file(self, sNewOutputFile)
Set the virtual device output file.
is passthrough(self )
Determine if the passthrough mode is enabled for the mass storage device.
set passthrough(self, bPassthrough)
Enable the passthrough mode for the mass storage device (optical or harddisk).
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.27.2 Properties
51
Class VmHardDisk Package prlsdkapi
Name Description
Inherited from objectclass
1.28 Class VmHardDisk
object
prlsdkapi. Handle
prlsdkapi.VmDevice
prlsdkapi.VmHardDisk
Provides methods for managing virtual hard disks in a virtual machine.
1.28.1 Methods
get disk type(self )
Return the hard disk type.
set disk type(self, nDiskType)
Set the type of the virtual hard disk.
is splitted(self )
Determine if the virtual hard disk is split into multiple files.
set splitted(self, bSplitted)
Sety whether the hard disk should be split into multiple files.
get disk size(self )
Return the hard disk size.
set disk size(self, nDiskSize)
Set the size of the virtual hard disk.
52
Class VmHardDisk Package prlsdkapi
get size on disk(self )
Return the size of the occupied space on the hard disk.
add partition(self )
Assign a boot camp partition to the virtual hard disk.
get partitions count(self )
Determine the number of partitions on the virtual hard disk.
get partition(self, nIndex )
Obtain the VmHdPartition object containing a hard disk partition info.
Inherited from prlsdkapi.VmDevice(Section 1.27)
connect(), create(), create image(), disconnect(), get description(), get emulated type(),get friendly name(), get iface type(), get image path(), get index(), get output file(),get stack index(), get sys name(), get type(), is connected(), is enabled(), is passthrough(),is remote(), remove(), resize image(), set connected(), set default stack index(),set description(), set emulated type(), set enabled(), set friendly name(), set iface type(),set image path(), set index(), set output file(), set passthrough(), set remote(),set stack index(), set sys name()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.28.2 Properties
Name Description
Inherited from objectclass
53
Class VmHdPartition Package prlsdkapi
1.29 Class VmHdPartition
object
prlsdkapi. Handle
prlsdkapi.VmHdPartition
Provides methods for managing partitions of a virtual hard disk in a virtual machine.
1.29.1 Methods
remove(self )
Remove the specified partition object from the virtual hard disk list.
get sys name(self )
Return the hard disk partition system name.
set sys name(self, sSysName)
Set system name for the disk partition.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.29.2 Properties
Name Description
Inherited from objectclass
54
Class VmNet Package prlsdkapi
1.30 Class VmNet
object
prlsdkapi. Handle
prlsdkapi.VmDevice
prlsdkapi.VmNet
Provides methods for managing network adapters in a virtual machine.
1.30.1 Methods
get bound adapter index(self )
Return the index of the adapter to which this virtual adapter is bound.
set bound adapter index(self, nIndex )
Set the index of the adapter to which this virtual adapter should be bound.
get bound adapter name(self )
Return the name of the adapter to which this virtual adapter is bound.
set bound adapter name(self, sNewBoundAdapterName)
Set the name of the network adapter to which this virtual adapter will bind.
get mac address(self )
Return the MAC address of the virtual network adapter.
set mac address(self, sNewMacAddress)
Set MAC address to the network adapter.
generate mac addr(self )
Generate a unique MAC address for the virtual network adapter.
is auto apply(self )
Determine if the network adapter is configured to automatically apply networksettings inside guest.
55
Class VmNet Package prlsdkapi
set auto apply(self, bAutoApply)
Set whether the network adapter should be automatically configured.
get net addresses(self )
Obtain the list of IP address/subnet mask pairs which are assigned to thevirtual network adapter.
set net addresses(self, hNetAddressesList)
Set IP addresses/subnet masks to the network adapter.
get dns servers(self )
Obtain the list of DNS servers which are assigned to the virtual networkadapter.
set dns servers(self, hDnsServersList)
Assign DNS servers to the network adapter.
get search domains(self )
Obtain the lists of search domains assigned to the virtual network adapter.
set search domains(self, hSearchDomainsList)
Assign search domains to the network adapter.
is configure with dhcp(self )
Determine if the network adapter is configured through DHCP on the guestOS side.
set configure with dhcp(self, bConfigureWithDhcp)
Set whether the network adapter should be configured through DHCP ormanually.
get default gateway(self )
Obtain the default gateway assigned to the virtual network adapter.
set default gateway(self, sNewDefaultGateway)
Set the default gateway address for the network adapter.
56
Class VmUsb Package prlsdkapi
get virtual network id(self )
Obtain the virtual network ID assigned to the virtual network adapter.
set virtual network id(self, sNewVirtualNetworkId)
Set the virtual network ID for the network adapter.
Inherited from prlsdkapi.VmDevice(Section 1.27)
connect(), create(), create image(), disconnect(), get description(), get emulated type(),get friendly name(), get iface type(), get image path(), get index(), get output file(),get stack index(), get sys name(), get type(), is connected(), is enabled(), is passthrough(),is remote(), remove(), resize image(), set connected(), set default stack index(),set description(), set emulated type(), set enabled(), set friendly name(), set iface type(),set image path(), set index(), set output file(), set passthrough(), set remote(),set stack index(), set sys name()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.30.2 Properties
Name Description
Inherited from objectclass
1.31 Class VmUsb
object
prlsdkapi. Handle
prlsdkapi.VmDevice
prlsdkapi.VmUsb
Provides methods for managing USB devices in a virtual machine.
57
Class VmSound Package prlsdkapi
1.31.1 Methods
get autoconnect option(self )
Obtain the USB controller autoconnect device option.
set autoconnect option(self, nAutoconnectOption)
Set the USB controller autoconnect device option.
Inherited from prlsdkapi.VmDevice(Section 1.27)
connect(), create(), create image(), disconnect(), get description(), get emulated type(),get friendly name(), get iface type(), get image path(), get index(), get output file(),get stack index(), get sys name(), get type(), is connected(), is enabled(), is passthrough(),is remote(), remove(), resize image(), set connected(), set default stack index(),set description(), set emulated type(), set enabled(), set friendly name(), set iface type(),set image path(), set index(), set output file(), set passthrough(), set remote(),set stack index(), set sys name()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.31.2 Properties
Name Description
Inherited from objectclass
1.32 Class VmSound
object
prlsdkapi. Handle
prlsdkapi.VmDevice
prlsdkapi.VmSound
58
Class VmSound Package prlsdkapi
Provides methods for managing sound devices in a virtual machine.
1.32.1 Methods
get output dev(self )
Return the output device string for the sound device.
set output dev(self, sNewOutputDev)
Set the output device string for the sound device.
get mixer dev(self )
Return the mixer device string for the sound device.
set mixer dev(self, sNewMixerDev)
Set the mixer device string for the sound device.
Inherited from prlsdkapi.VmDevice(Section 1.27)
connect(), create(), create image(), disconnect(), get description(), get emulated type(),get friendly name(), get iface type(), get image path(), get index(), get output file(),get stack index(), get sys name(), get type(), is connected(), is enabled(), is passthrough(),is remote(), remove(), resize image(), set connected(), set default stack index(),set description(), set emulated type(), set enabled(), set friendly name(), set iface type(),set image path(), set index(), set output file(), set passthrough(), set remote(),set stack index(), set sys name()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.32.2 Properties
Name Description
Inherited from objectclass
59
Class VmSerial Package prlsdkapi
1.33 Class VmSerial
object
prlsdkapi. Handle
prlsdkapi.VmDevice
prlsdkapi.VmSerial
Provides methods for managing serial ports in a virtual machine.
1.33.1 Methods
get socket mode(self )
Return the socket mode of the virtual serial port.
set socket mode(self, nSocketMode)
Set the socket mode for the virtual serial port.
Inherited from prlsdkapi.VmDevice(Section 1.27)
connect(), create(), create image(), disconnect(), get description(), get emulated type(),get friendly name(), get iface type(), get image path(), get index(), get output file(),get stack index(), get sys name(), get type(), is connected(), is enabled(), is passthrough(),is remote(), remove(), resize image(), set connected(), set default stack index(),set description(), set emulated type(), set enabled(), set friendly name(), set iface type(),set image path(), set index(), set output file(), set passthrough(), set remote(),set stack index(), set sys name()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.33.2 Properties
Name Description
Inherited from objectclass
60
Class VmConfig Package prlsdkapi
1.34 Class VmConfig
object
prlsdkapi. Handle
prlsdkapi.VmConfig
Known Subclasses: prlsdkapi.Vm
Provides methods for managing the configuration of a virtual machine.
1.34.1 Methods
set default config(self, hSrvConfig, guestOsVersion, needCreateDevices)
Set the default configuration for a new virtual machine based on the guest OStype.
get config validity(self )
Return a constant indicating the virtual machine configuration validity.
add default device(self, hSrvConfig, deviceType)
Automates the task of setting devices in a virtual machine.
is default device needed(self, guestOsVersion, deviceType)
Determine whether a default virtual device is needed for running the OS of thespecified type.
get default mem size(self, guestOsVersion, hostRam)
Return the default RAM size for to the specified OS type and version.
get default hdd size(self, guestOsVersion)
Return the default hard disk size for to the specified OS type and version.
get default video ram size(self, guestOsVersion, hSrvConfig,bIs3DSupportEnabled)
Return the default video RAM size for the specified OS type and version.
61
Class VmConfig Package prlsdkapi
create vm dev(self, nDeviceType)
Create a new virtual device handle of the specified type.
get access rights(self )
Obtain the AccessRights object.
get devs count(self )
Determine the total number of devices of all types installed in the virtualmachine.
get all devices(self )
Obtains objects for all virtual devices in a virtual machine.
get devs count by type(self, vmDeviceType)
Obtain the number of virtual devices of the specified type.
get dev by type(self, vmDeviceType, nIndex )
Obtains a virtual device object according to the specified device type andindex.
get floppy disks count(self )
Determine the number of floppy disk drives in a virtual machine.
get floppy disk(self, nIndex )
Obtain the VmDevice object containing information about a floppy disk drivein a vrtiual machine.
get hard disks count(self )
Determines the number of virtual hard disks in a virtual machine.
get hard disk(self, nIndex )
Obtain the VmHardDisk object containing the specified virtual hard diskinformation.
get optical disks count(self )
Determine the number of optical disks in the specified virtual machine.
62
Class VmConfig Package prlsdkapi
get optical disk(self, nIndex )
Obtain the VmDevice object containing information about a virtual opticaldisk.
get parallel ports count(self )
Determine the number of virtual parallel ports in the virtual machine.
get parallel port(self, nIndex )
Obtains the VmDevice object containing information about a virtual parallelport.
get serial ports count(self )
Determine the number of serial ports in a virtual machine.
get serial port(self, nIndex )
Obtain the VmSerial object containing information about a serial port in avirtual machine.
get sound devs count(self )
Determine the number of sound devices in a virtual machine.
get sound dev(self, nIndex )
Obtain the VmSound object containing information about a sound device in avirtual machine.
get usb devices count(self )
Determine the number of USB devices in a virtual machine.
get usb device(self, nIndex )
Obtain the VmUsb object containing information about a USB device in thevirtual machine.
get net adapters count(self )
Determine the number of network adapters in a virtual machine.
get net adapter(self, nIndex )
Obtain the VmNet object containing information about a virtual networkadapter.
63
Class VmConfig Package prlsdkapi
get generic pci devs count(self )
Determines the number of generic PCI devices in a virtual machine.
get generic pci dev(self, nIndex )
Obtain the VmDevice object containing information about a generic PCIdevice.
get generic scsi devs count(self )
Determines the number of generic SCSI devices in a virtual machine.
get generic scsi dev(self, nIndex )
Obtain the VmDevice object containing information about a SCSI device in avirtual machine.
get display devs count(self )
Determine the number of display devices in a virtual machine.
get display dev(self, nIndex )
Obtains the VmDevice containing information about a display device in avirtual machine.
create share(self )
Create a new instance of Share and add it to the virtual machine list of shares.
get shares count(self )
Determine the number of shared folders in a virtual machine.
get share(self, nShareIndex )
Obtain the Share object containing information about a shared folder.
is smart guard enabled(self )
Determine whether the SmartGuard feature is enabled in the virtual machine.
set smart guard enabled(self, bEnabled)
Enable the SmartGuard feature in the virtual machine.
64
Class VmConfig Package prlsdkapi
is smart guard notify before creation(self )
Determine whether the user will be notified on automatic snapshot creation bySmartGaurd.
set smart guard notify before creation(self, bNotifyBeforeCreation)
Enable or disable notification of automatic snapshot creation, a SmartGuardfeature.
get smart guard interval(self )
Determines the interval at which snapshots are taken by SmartGuard.
set smart guard interval(self, nInterval)
Set the time interval at which snapshots are taken by SmartGuard.
get smart guard max snapshots count(self )
Determines the maximum snapshot count, a SmartGuard setting.
set smart guard max snapshots count(self, nMaxSnapshotsCount)
Set the maximum snapshot count, a SmartGuard feature.
is user defined shared folders enabled(self )
Determine whether the user-defined shared folders are enabled or not.
set user defined shared folders enabled(self, bEnabled)
Enables or disables user-defined shared folders.
is shared profile enabled(self )
Determine whether the Shared Profile feature is enabled in the virtualmachine.
set shared profile enabled(self, bEnabled)
Enable or disable the Shared Profile feature in the virtual machine.
is use desktop(self )
Determine whether the ’use desktop in share profile’ feature is enabled or not.
65
Class VmConfig Package prlsdkapi
set use desktop(self, bEnabled)
Enable or disable the ’undo-desktop’ feature in the shared profile.
is use documents(self )
Determine whether ’use documents in shared profile’ feature is enabled or not.
set use documents(self, bEnabled)
Enable or disable the ’use documents in shared profile’ feature.
is use pictures(self )
Determine whether the ’used pictures in shared profile’ feature is enabled ornot.
set use pictures(self, bEnabled)
Enables or disables the ’use pictures in shared profile’ feature.
is use music(self )
Determine whether the ’use music in shared profile’ feature is enabled or not.
set use music(self, bEnabled)
Enables or disables the ’use music in shared profile’ feature.
is auto capture release mouse(self )
Determine whether the automatic capture and release of the mouse pointer isenabled.
set auto capture release mouse(self, bEnabled)
Enable or disables the automatic capture and release of the mouse pointer in avirtual machine.
is share clipboard(self )
Determine whether the clipboard sharing feature is enabled in the virtualmachine.
set share clipboard(self, bEnabled)
Enable or disable the clipboard sharing feature.
66
Class VmConfig Package prlsdkapi
is offline management enabled(self )
Determine whether the offline management feature is enabled for the virtualmachine.
set offline management enabled(self, bEnabled)
Enables or disables the offline management feature for the virtual machine.
is tools auto update enabled(self )
Enables or disables the Parallels Tools AutoUpdate feature for the virtualmachine.
set tools auto update enabled(self, bEnabled)
Enable or disable the Parallels Tools AutoUpdate feature for the virtualmachine.
is time synchronization enabled(self )
Determine whether the time synchronization feature is enabled in the virtualmachine.
set time synchronization enabled(self, bEnabled)
Enable or disable the time synchronization feature in a virtual machine.
is time sync smart mode enabled(self )
Determine whether the smart time synchronization is enabled in a virtualmachine.
set time sync smart mode enabled(self, bEnabled)
Enable or disable the smart time-synchronization mode in the virtual machine.
get time sync interval(self )
Obtain the time synchronization interval between the host and the guest OS.
set time sync interval(self, nTimeSyncInterval)
Set the time interval at which time in the virtual machine will be synchronizedwith the host OS.
67
Class VmConfig Package prlsdkapi
is allow select boot device(self )
Determine whether the ’select boot device’ option is shown on virtual machinestartup.
set allow select boot device(self, bAllowed)
Switch on/off the ’select boot device’ dialog on virtual machine startup.
create scr res(self )
Create a new instance of ScreenRes and add it to the virtual machineresolution list.
get scr res count(self )
Determine the total number of screen resolutions available in a virtualmachine.
get scr res(self, nScrResIndex )
Obtain the ScreenRes object identifying the specified virtual machine screenresolution.
create boot dev(self )
Create a new instance of BootDevice and add it to the virtual machine bootdevice list.
get boot dev count(self )
Determine the number of devices in the virtual machine boot device prioritylist.
get boot dev(self, nBootDevIndex )
Obtain the BootDevice object containing information about a specified bootdevice.
get name(self )
Return the virtual machine name.
set name(self, sNewVmName)
Set the virtual machine name.
68
Class VmConfig Package prlsdkapi
get hostname(self )
Obtain the hostname of the specified virtual machine.
set hostname(self, sNewVmHostname)
Set the virtual machine hostname.
get default gateway(self )
Return the default gateway of the specified virtual machine.
set default gateway(self, sNewVmDefaultGateway)
Set the virtual machine default gateway.
get uuid(self )
Return the UUID (universally unique ID) of the virtual machine.
set uuid(self, sNewVmUuid)
Set the virtual machine UUID (universally unique ID).
get os type(self )
Return the type of the operating system that the specified virtual machine isrunning.
get os version(self )
Return the version of the operating system that the specified virtual machineis running.
set os version(self, nVmOsVersion)
Set the virtual machine guest OS version.
get ram size(self )
Return the virtual machine memory (RAM) size, in megabytes.
set ram size(self, nVmRamSize)
Sets the virtual machine memory (RAM) size.
69
Class VmConfig Package prlsdkapi
get video ram size(self )
Return the video memory size of the virtual machine.
set video ram size(self, nVmVideoRamSize)
Set the virtual machine video memory size.
get cpu count(self )
Determine the number of CPUs in the virtual machine.
set cpu count(self, nVmCpuCount)
Set the number of CPUs for the virtual machine (the CPUs should be presentin the machine).
get cpu mode(self )
Determine the specified virtual machine CPU mode (32 bit or 64 bit).
set cpu mode(self, nVmCpuMode)
Set CPU mode (32 bit or 64 bit) for the virtual machine.
get cpu accel level(self )
Determine the virtual machine CPU acceleration level.
set cpu accel level(self, nVmCpuAccelLevel)
Set CPU acceleration level for the virtual machine.
is cpu vtx enabled(self )
Determine whether the x86 virtualization (such as Vt-x) is available in thevirtual machine CPU.
set cpu units(self, nVmCpuUnits)
Set the number of CPU units that will be allocated to a virtual machine.
get cpu units(self )
Determine the number of CPU units allocated to a virtual machine.
set cpu limit(self, nVmCpuLimit)
Set the CPU usage limit (in percent) for a virtual machine.
70
Class VmConfig Package prlsdkapi
get cpu limit(self )
Determine the CPU usage limit of a virtual machine, in percent.
get io priority(self )
Determines the specified virtual machine I/O priority.
set io priority(self, nVmIoPriority)
Set the virtual machine I/O priority.
get server uuid(self )
Returns the UUID of the machine hosting the specified virtual machine.
get server host(self )
Return the hostname of the machine hosting the specified virtual machine.
get home path(self )
Return the virtual machine home directory name and path.
get icon(self )
Return the name of the icon file used by the specified virtual machine.
set icon(self, sNewVmIcon)
Set the virtual machine icon.
get description(self )
Return the virtual machine description.
set description(self, sNewVmDescription)
Set the virtual machine description.
is template(self )
Determine whether the virtual machine is a real machine or a template.
set template sign(self, bVmIsTemplate)
Modify a regular virtual machine to become a template, and vise versa.
71
Class VmConfig Package prlsdkapi
get custom property(self )
Return the virtual machine custom property information.
set custom property(self, sNewVmCustomProperty)
Set the virtual machine custom property information.
get auto start(self )
Determine if the specified virtual machine is set to start automatically onParallels Service start.
set auto start(self, nVmAutoStart)
Set the automatic startup option for the virtual machine.
get auto start delay(self )
Returns the time delay used during the virtual machine automatic startup.
set auto start delay(self, nVmAutoStartDelay)
Set the time delay that will be used during the virtual machine automaticstartup.
get start login mode(self )
Return the automatic startup login mode for the virtual machine.
set start login mode(self, nVmStartLoginMode)
Set the automatic startup login mode for the specified virtual machine.
get start user login(self )
Return the user name used during the virtual machine automatic startup.
set start user creds(self, sStartUserLogin, sPassword)
Sset the automatic startup user login and password for the virtual machine.
get auto stop(self )
Determine the mode of the automatic shutdown for the specified virtualmachine.
72
Class VmConfig Package prlsdkapi
set auto stop(self, nVmAutoStop)
Set the automatic shutdown mode for the virtual machine.
get window mode(self )
Return the current window mode the virtual machine is in.
set window mode(self, nVmWindowMode)
Sets the virtual machine window mode.
get last modified date(self )
Return the date and time when the specified virtual machine was last modified.
get last modifier name(self )
Return the name of the user who last modified the specified virtual machine.
is guest sharing enabled(self )
Determine if guest sharing is enabled (the guest OS disk drives are visible inthe host OS).
set guest sharing enabled(self, bVmGuestSharingEnabled)
Enables the guest sharing feature.
is guest sharing auto mount(self )
Determine if host shared folders are mounted automatically in the virtualmachine.
set guest sharing auto mount(self, bVmGuestSharingAutoMount)
Set the guest OS sharing auto-mount option.
is guest sharing enable spotlight(self )
Determine if the virtual disks will be added to Spotlight search subsystem(Mac OS X feature).
set guest sharing enable spotlight(self, bVmGuestSharingEnableSpotlight)
Set whether the virtual disks are added to Spotlight search subsystem.
73
Class VmConfig Package prlsdkapi
is host sharing enabled(self )
Determine if host sharing is enabled (host shared folders are visible in theguest OS).
set host sharing enabled(self, bVmHostSharingEnabled)
Enable host sharing for the virtual machine.
is share all host disks(self )
Determine whether all host disks will be present in the guest OS as shares.
set share all host disks(self, bShareAllHostDisks)
Enable sharing of all host disks for the virtual machine.
is share user home dir(self )
Determine whether the host user home directory will be available in the guestOS as a share.
set share user home dir(self, bShareUserHomeDir)
Enable or disable sharing of the host user home directory in the specifiedvirtual machine.
is map shared folders on letters(self )
Determine whether host disks shared with the guest Windows OS will bemapped to drive letters.
set map shared folders on letters(self, bMapSharedFoldersOnLetters)
Enable mapping of shared host disks to drive letters for the virtual machine.
is show task bar(self )
Determine if Windows task bar is displayed in Coherence mode.
set show task bar(self, bVmShowTaskBar)
Show or hide the Windows task bar when the virtual machine is running inCoherence mode.
is relocate task bar(self )
Determine if the task bar relocation feature is enabled in Coherence mode.
74
Class VmConfig Package prlsdkapi
set relocate task bar(self, bVmRelocateTaskBar)
Enable or disable the Windows task bar relocation feature.
is exclude dock(self )
Determine the guest OS window behavior in coherence mode.
set exclude dock(self, bVmExcludeDock)
Set the exclude dock option.
is multi display(self )
Determine if the specified virtual machine uses a multi-display mode.
set multi display(self, bVmMultiDisplay)
Set the virtual machine multi-display option.
get vncmode(self )
Return the VNC mode of the virtual machine.
set vncmode(self, nVmRemoteDisplayMode)
Set the virtual machine VNC mode.
get vncpassword(self )
Return the VNC password for the virtual machine.
set vncpassword(self, sNewVmRemoteDisplayPassword)
Set the virtual machine VNC password.
get vnchost name(self )
Return the VNC hostname of the virtual machine.
set vnchost name(self, sNewVmRemoteDisplayHostName)
Set the virtual machine VNC host name.
get vncport(self )
Return the VNC port number for the virtual machine
75
Class VmConfig Package prlsdkapi
set vncport(self, nVmRemoteDisplayPort)
Set the virtual machine VNC port number.
is scr res enabled(self )
Determine if additional screen resolution support is enabled in the virtualmachine.
set scr res enabled(self, bVmScrResEnabled)
Enable or disable the additional screen resolution support in the virtualmachine.
is disk cache write back(self )
Determine if disk cache write-back is enabled in the virtual machine.
set disk cache write back(self, bVmDiskCacheWriteBack)
Set the virtual machine disk cache write-back option.
is os res in full scr mode(self )
Determines wether the virtual machine OS resolution is in full screen mode.
set os res in full scr mode(self, bVmOsResInFullScrMode)
Turn on/off the virtual machine OS resolution in full screen mode option.
is close app on shutdown(self )
Determine whether the Parallels console app is automatically closed on thevirtual machine shutdown.
set close app on shutdown(self, bVmCloseAppOnShutdown)
Set whether the Parallels console app will be closed on the virtual machineshutdown.
get system flags(self )
Return the virtual machine system flags.
set system flags(self, sNewVmSystemFlags)
Set the virtual machine system flags.
76
Class VmConfig Package prlsdkapi
is disable apic(self )
Determine whether the APIC is enabled during the virtual machine runtime.
set disable apicsign(self, bDisableAPIC )
Set whether the virtual machine should be using APIC during runtime.
get undo disks mode(self )
Determine the current undo-disks mode for the virtual machine.
set undo disks mode(self, nUndoDisksMode)
Set the undo-disks mode for the virtual machine.
get app in dock mode(self )
Determine the current dock mode for the virtual machine.
set app in dock mode(self, nVmAppInDockMode)
Set the dock mode for applications.
get foreground priority(self )
Return foreground processes priority for the specified virtual machine.
set foreground priority(self, nVmForegroundPriority)
Set the virtual machine foreground processes priority.
get background priority(self )
Determine the specified virtual machine background process priority type.
set background priority(self, nVmBackgroundPriority)
Set the virtual machine background processes priority.
is use default answers(self )
Determine whether the use default answers mechanism is active in the virtualmachine.
set use default answers(self, bUseDefaultAnswers)
Enable the use default answers mechanism in a virtual machine.
77
Class VmConfig Package prlsdkapi
get dock icon type(self )
Return the virtual machine dock icon type.
set dock icon type(self, nVmDockIconType)
Sets the virtual machine dock icon type.
get search domains(self )
Obtain the list of search domains that will be assigned to the guest OS.
set search domains(self, hSearchDomainsList)
Set the global search domain list that will be assigned to the guest OS.
get offline services(self )
Obtain the list of services available in the virtual machine offline management.
set offline services(self, hOfflineServicesList)
Set offline services that will be available in the virtual machine offlinemanagement.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.34.2 Properties
Name Description
Inherited from objectclass
78
Class Vm Package prlsdkapi
1.35 Class Vm
object
prlsdkapi. Handle
prlsdkapi.VmConfig
prlsdkapi.Vm
The Vm class provides methods for managing virtual machines. When you want to get theinformation about, modify, or create a virtual machine, you have to obtain an instance ofthis class. The instance is obtained using methods of other classes. The most commonlyused methods are Server.create vm and the Server.get vm list.
1.35.1 Methods
start(self )
Start the virtual machine.
start ex(self, nStartMode=2048, nReserved=0)
Start the virtual machine using the specified mode.
restart(self )
Restart the virtual machine.
stop(self, bGraceful=False)
Stop the virtual machine.
pause(self, bAcpi=False)
Pause the virtual machine.
reset(self )
Reset the virtual machine.
suspend(self )
Suspend the virtual machine.
79
Class Vm Package prlsdkapi
get suspended screen(self )
Obtain the virtual machine screen state before it was suspending.
resume(self )
Resume a suspended virtual machine.
drop suspended state(self )
Resets a suspended virtual machine.
create snapshot(self, sName, sDescription=’’)
Create a snapshot of a virtual machine.
switch to snapshot(self, sSnapshotUuid)
Revert the specified virtual machine to the specified snapshot.
Create a floppy disk image for unattended Windows installation.
initiate dev state notifications(self )
Initiate the device states notification service.
validate config(self, nSection=1)
Validate the specified section of a virtual machine configuration.
update security(self, hAccessRights)
Updates the security access level for the virtual machine.
install tools(self )
Install Parallels Tools in the virtual machine.
get tools state(self )
Determine whether Parallels Tools is installed in the virtual machine.
run compressor(self )
Initiates the Compressor process.
cancel compressor(self )
Cancels the running Compressor operation.
install utility(self, strId)
Install a specified utility in a virtual machine.
tools send shutdown(self, kind=0)
Initiates graceful shutdown of the virtual machine.
tools get shutdown capabilities(self )
Obtain the available capabilities of a graceful virtual machine shutdown usingParallels Tools.
tis get identifiers(self )
Retrieve a list of identifiers from the Tools Information Service database.
83
Class Vm Package prlsdkapi
tis get record(self, sUid)
Obtain the TisRecord object containing a record from the Tools Servicedatabase.
subscribe to perf stats(self, sFilter)
unsubscribe from perf stats(self )
Cancels the Parallels Service performance statistics subscription .
get perf stats(self, sFilter)
auth with guest security db(self, sUserName, sUserPassword, nFlags=0)
Authenticate the user through the guest OS security database.
Inherited from prlsdkapi.VmConfig(Section 1.34)
add default device(), create boot dev(), create scr res(), create share(), create vm dev(),get access rights(), get all devices(), get app in dock mode(), get auto start(), get auto start delay(),get auto stop(), get background priority(), get boot dev(), get boot dev count(),get config validity(), get cpu accel level(), get cpu count(), get cpu limit(), get cpu mode(),get cpu units(), get custom property(), get default gateway(), get default hdd size(),get default mem size(), get default video ram size(), get description(), get dev by type(),get devs count(), get devs count by type(), get display dev(), get display devs count(),get dock icon type(), get floppy disk(), get floppy disks count(), get foreground priority(),get generic pci dev(), get generic pci devs count(), get generic scsi dev(), get generic scsi devs count(),get hard disk(), get hard disks count(), get home path(), get hostname(), get icon(),get io priority(), get last modified date(), get last modifier name(), get name(), get net adapter(),get net adapters count(), get offline services(), get optical disk(), get optical disks count(),get os type(), get os version(), get parallel port(), get parallel ports count(), get ram size(),get scr res(), get scr res count(), get search domains(), get serial port(), get serial ports count(),get server host(), get server uuid(), get share(), get shares count(), get smart guard interval(),get smart guard max snapshots count(), get sound dev(), get sound devs count(),get start login mode(), get start user login(), get system flags(), get time sync interval(),get undo disks mode(), get usb device(), get usb devices count(), get uuid(), get video ram size(),get vnchost name(), get vncmode(), get vncpassword(), get vncport(), get window mode(),is allow select boot device(), is auto capture release mouse(), is close app on shutdown(),is cpu vtx enabled(), is default device needed(), is disable apic(), is disk cache write back(),is exclude dock(), is guest sharing auto mount(), is guest sharing enable spotlight(),is guest sharing enabled(), is host sharing enabled(), is map shared folders on letters(),is multi display(), is offline management enabled(), is os res in full scr mode(), is relocate task bar(),is scr res enabled(), is share all host disks(), is share clipboard(), is share user home dir(),is shared profile enabled(), is show task bar(), is smart guard enabled(), is smart guard notify before
84
Class Vm Package prlsdkapi
is template(), is time sync smart mode enabled(), is time synchronization enabled(),is tools auto update enabled(), is use default answers(), is use desktop(), is use documents(),is use music(), is use pictures(), is user defined shared folders enabled(), set allow select boot device(),set app in dock mode(), set auto capture release mouse(), set auto start(), set auto start delay(),set auto stop(), set background priority(), set close app on shutdown(), set cpu accel level(),set cpu count(), set cpu limit(), set cpu mode(), set cpu units(), set custom property(),set default config(), set default gateway(), set description(), set disable apicsign(),set disk cache write back(), set dock icon type(), set exclude dock(), set foreground priority(),set guest sharing auto mount(), set guest sharing enable spotlight(), set guest sharing enabled(),set host sharing enabled(), set hostname(), set icon(), set io priority(), set map shared folders on letters(),set multi display(), set name(), set offline management enabled(), set offline services(),set os res in full scr mode(), set os version(), set ram size(), set relocate task bar(),set scr res enabled(), set search domains(), set share all host disks(), set share clipboard(),set share user home dir(), set shared profile enabled(), set show task bar(), set smart guard enabled(),set smart guard interval(), set smart guard max snapshots count(), set smart guard notify before creation(),set start login mode(), set start user creds(), set system flags(), set template sign(),set time sync interval(), set time sync smart mode enabled(), set time synchronization enabled(),set tools auto update enabled(), set undo disks mode(), set use default answers(),set use desktop(), set use documents(), set use music(), set use pictures(), set user defined shared foldersset uuid(), set video ram size(), set vnchost name(), set vncmode(), set vncpassword(),set vncport(), set window mode()
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.35.2 Properties
Name Description
Inherited from objectclass
85
Class VmGuest Package prlsdkapi
1.36 Class VmGuest
object
prlsdkapi. Handle
prlsdkapi.VmGuest
The VmGuest class is used to run programs and execute administrative tasks in a virtualmachine.
1.36.1 Methods
logout(self, nReserved=0)
Closes a session (or unbinds from a pre-existing session) in a virtual machine.
run program(self, sAppName, hArgsList, hEnvsList, nFlags=16384,nStdin=0, nStdout=0, nStderr=0)
Execute a program in a virtual machine.
get network settings(self, nReserved=0)
Obtain network settings of the guest operating system running in a virtualmachine.
set user passwd(self, sUserName, sUserPasswd, nReserved=0)
Change the password of a guest operating system user.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.36.2 Properties
Name Description
Inherited from objectclass
86
Class Share Package prlsdkapi
1.37 Class Share
object
prlsdkapi. Handle
prlsdkapi.Share
Provides methods for managing host shares. Using this class, you can make a host OSdirectory visible and accessible in a virtual machine.
1.37.1 Methods
remove(self )
get name(self )
set name(self, sNewShareName)
get path(self )
set path(self, sNewSharePath)
get description(self )
set description(self, sNewShareDescription)
is enabled(self )
set enabled(self, bEnabled)
is read only(self )
set read only(self, bReadOnly)
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),
87
Class ScreenRes Package prlsdkapi
repr (), setattr (), str ()
1.37.2 Properties
Name Description
Inherited from objectclass
1.38 Class ScreenRes
object
prlsdkapi. Handle
prlsdkapi.ScreenRes
The class provides methods for modify the list of screen resolutions available in a virtualmachine. By default, only the most common resolutions are supported in a virtual machine.Using methods of this class, you can add additional resolutions and modify the existing onesif needed.
1.38.1 Methods
remove(self )
is enabled(self )
set enabled(self, bEnabled)
get width(self )
set width(self, nWidth)
get height(self )
set height(self, nHeight)
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
88
Class BootDevice Package prlsdkapi
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.38.2 Properties
Name Description
Inherited from objectclass
1.39 Class BootDevice
object
prlsdkapi. Handle
prlsdkapi.BootDevice
Provides methods for managing boot device in a virtual machine. An object contains infor-mation about an individual boot device.
1.39.1 Methods
remove(self )
Remove the boot device from the boot priority list.
get type(self )
Return the boot device type. Device type is a property that, together withdevice index, is used to uniquely identify a device in the virtual machine bootpriority list.
Return Value
The device type - one of the constants with the PDE prefix, such as:PDE FLOPPY DISK, PDE OPTICAL DISK, PDE HARD DISK.
Overrides: prlsdkapi. Handle.get type
89
Class BootDevice Package prlsdkapi
set type(self, nDevType)
Set the boot device type. Use this function when adding a device to the bootdevice priority list. Device type is a property that, together with device index,is used to uniquely identify a device in a virtual machine
Parameters
nDevType: The device type to set. Can be one of the constants withthe PDE prefix, such as: PDE FLOPPY DISK,PDE OPTICAL DISK, PDE HARD DISK.
get index(self )
Obtain the boot device index.
Return Value
Integer. The boot device index.
set index(self, nDevIndex )
Set the boot device index. Device index is a property that, together withdevice type, is used to uniquely identify a device in the virtual machine bootpriority list. The index must be the same index the device has in the mainvirtual machine configuration or it will not be recognized during boot.
Parameters
nDevIndex: Integer. The device index to set.
get sequence index(self )
Obtain the sequence index of the boot device in the boot priority list.
Return Value
Integer. The boot device sequence index.
set sequence index(self, nSequenceIndex )
Assign a sequence index to a boot device in the boot priority list.
Parameters
nSequenceIndex: Integer. The sequence index to set (begins with0).
is in use(self )
Determine whether the boot device is enabled or disabled.
Return Value
Boolean. True indicates that the device is enabled. False indicatesotherwise.
90
Class VmInfo Package prlsdkapi
set in use(self, bInUse)
Enable or disable the boot device in the boot priority list.
Parameters
bInUse: Boolean. Set to True to enable the device. Set to False todisable it.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.39.2 Properties
Name Description
Inherited from objectclass
1.40 Class VmInfo
object
prlsdkapi. Handle
prlsdkapi.VmInfo
Contains the virtual machine state, access rights, and some other information.
1.40.1 Methods
get state(self )
Return the virtual machine state information.
get access rights(self )
Obtains the AccessRights object containing information about the virtualmachine access rights.
91
Class FoundVmInfo Package prlsdkapi
is invalid(self )
Determine if the specified virtual machine is invalid.
is vm waiting for answer(self )
Determine if the specified virtual machine is waiting for an answer to aquestion that it asked.
is vnc server started(self )
Determine whether a VNC server is running for the specified virtual machine.
get addition state(self )
Return the virtual machine addition state information.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.40.2 Properties
Name Description
Inherited from objectclass
1.41 Class FoundVmInfo
object
prlsdkapi. Handle
prlsdkapi.FoundVmInfo
Contains summary information about a virtual machine that was found as a result of avirtual machine search operation.
92
Class FoundVmInfo Package prlsdkapi
1.41.1 Methods
get name(self )
Obtains the virtual machine name.
Return Value
A string containing the virtual machine name.
is old config(self )
Determines whether the vitrual machine configuration is an older version.This method allows to determine whether the virtual machine was createdwith an older or the current version of the Parallels virtualization product thatyou are using.
Return Value
Boolean. True indicates that the virtual machine was created withan older version of the product. False indicates that the virtualmachine was created with the version that you are running.
get osversion(self )
Obtains the guest OS version information.
Return Value
A string containing the guest OS version.
get config path(self )
Obtains the name and path of the directory containing the virtual machinefiles.
Return Value
A string containing the name and path of the virtual machinedirectory.
is template(self )
Determines if the virtual machine is a template. A virtual machine can be aregular virtual machine that you can run or it can be a template used tocreate new virtual machines.
Return Value
Boolean. True indicates that the virtual machine is a template.False indicates that it is a regular virtual machine.
Inherited from prlsdkapi. Handle
93
Class AccessRights Package prlsdkapi
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.41.2 Properties
Name Description
Inherited from objectclass
1.42 Class AccessRights
object
prlsdkapi. Handle
prlsdkapi.AccessRights
Contains info about access rights that the users other than the owner have in respect to thevirtual machine.
1.42.1 Methods
is allowed(self, nPermission)
Determine if the current user is authorized to perform a specified task on avirtual machine.
Parameters
nPermission: The task type. Can be one of constants with thePAR prefix, such as: PAR VM START ACCESS,PAR VM STOP ACCESS,PAR VM PAUSE ACCESS,PAR VM RESET ACCESS,PAR VM SUSPEND ACCESS,PAR VM RESUME ACCESS,PAR VM DELETE ACCESS, and others.
Return Value
A Boolean value indicating whether the user is authorized toperform the task. True - authorized; False - not authorized.
94
Class AccessRights Package prlsdkapi
get access for others(self )
Obtain the virtual machine access rights information.
Return Value
One of the following access rights constants:PAO VM NOT SHARED - only the owner of the virtual machinehas access to it. PAO VM SHARED ON VIEW - other users canview but not run the virtual machine.PAO VM SHARED ON VIEW AND RUN - other useres can viewand run the vitual machine.PAO VM SHARED ON FULL ACCESS - all users have full accessto a virtual machine.
set access for others(self, nAccessForOthers)
Set access rights on a virtual machine.
Parameters
nAccessForOthers: The access rights level to set. Can be one of thefollowing constants: PAO VM NOT SHARED- only the owner of the virtual machine hasaccess to it. PAO VM SHARED ON VIEW -other users can view the virtual machine.PAO VM SHARED ON VIEW AND RUN -other users can view and run the virtualmachine.PAO VM SHARED ON FULL ACCESS - allusers have full access to the virtual machine.
get owner name(self )
Determine the virtual machine owner name.
Return Value
A string containing the owner name.
is current session owner(self )
Determine if the current user is the owner of the virtual machine.
Return Value
A Boolean value. True - the current user is the owner. False - theuser is not the owner.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
95
Class VmToolsInfo Package prlsdkapi
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.42.2 Properties
Name Description
Inherited from objectclass
1.43 Class VmToolsInfo
object
prlsdkapi. Handle
prlsdkapi.VmToolsInfo
Provides methods for determining whether the Parallels Tools package is installed in a virtualmachine and for obtaining its status and version information.
1.43.1 Methods
get state(self )
get version(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.43.2 Properties
Name Description
Inherited from objectclass
96
Class Statistics Package prlsdkapi
1.44 Class Statistics
object
prlsdkapi. Handle
prlsdkapi.Statistics
Provides methods for obtaining performance statistics from the host computer or an indi-vidual virtual machine.
1.44.1 Methods
get total ram size(self )
get usage ram size(self )
get free ram size(self )
get total swap size(self )
get usage swap size(self )
get free swap size(self )
get os uptime(self )
get disp uptime(self )
get cpus stats count(self )
get cpu stat(self, nIndex )
get ifaces stats count(self )
get iface stat(self, nIndex )
get users stats count(self )
get user stat(self, nIndex )
97
Class StatCpu Package prlsdkapi
get disks stats count(self )
get disk stat(self, nIndex )
get procs stats count(self )
get proc stat(self, nIndex )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.44.2 Properties
Name Description
Inherited from objectclass
1.45 Class StatCpu
object
prlsdkapi. Handle
prlsdkapi.StatCpu
Provides methods for obtaining CPU statistics from the host or a virtual machine.
1.45.1 Methods
get cpu usage(self )
get total time(self )
get user time(self )
98
Class StatNetIface Package prlsdkapi
get system time(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.45.2 Properties
Name Description
Inherited from objectclass
1.46 Class StatNetIface
object
prlsdkapi. Handle
prlsdkapi.StatNetIface
Provides methods for obtaining network interface statistics from the host or a virtual ma-chine.
1.46.1 Methods
get system name(self )
get in data size(self )
get out data size(self )
get in pkgs count(self )
get out pkgs count(self )
Inherited from prlsdkapi. Handle
99
Class StatUser Package prlsdkapi
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.46.2 Properties
Name Description
Inherited from objectclass
1.47 Class StatUser
object
prlsdkapi. Handle
prlsdkapi.StatUser
Provides methods for obtaining user session statistics.
1.47.1 Methods
get user name(self )
get service name(self )
get host name(self )
get session time(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
100
Class StatDisk Package prlsdkapi
1.47.2 Properties
Name Description
Inherited from objectclass
1.48 Class StatDisk
object
prlsdkapi. Handle
prlsdkapi.StatDisk
Provides methods for obtaining disk statistics from the host or a virtual machine.
1.48.1 Methods
get system name(self )
get usage disk space(self )
get free disk space(self )
get parts stats count(self )
get part stat(self, nIndex )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.48.2 Properties
Name Description
Inherited from objectclass
101
Class StatProcess Package prlsdkapi
1.49 Class StatDiskPart
object
prlsdkapi. Handle
prlsdkapi.StatDiskPart
Provides methods for obtaining disk partition statistics from the host or a virtual machine.
1.49.1 Methods
get system name(self )
get usage disk space(self )
get free disk space(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.49.2 Properties
Name Description
Inherited from objectclass
1.50 Class StatProcess
object
prlsdkapi. Handle
prlsdkapi.StatProcess
Provides methods for obtaining system processes statistics.
102
Class StatProcess Package prlsdkapi
1.50.1 Methods
get command name(self )
get id(self )
get owner user name(self )
get total mem usage(self )
get real mem usage(self )
get virt mem usage(self )
get start time(self )
get total time(self )
get user time(self )
get system time(self )
get state(self )
get cpu usage(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.50.2 Properties
Name Description
Inherited from objectclass
103
Class License Package prlsdkapi
1.51 Class License
object
prlsdkapi. Handle
prlsdkapi.License
1.51.1 Methods
is valid(self )
Determines whether the license if valid or not.
Return Value
Boolean. True indicates that the license if valid. False indicatesotherwise.
get status(self )
Determines the license status.
Return Value
A integer containing the license status code.
get license key(self )
Obtains the liecense key.
Return Value
A sting containing the license key.
get user name(self )
Obtains the name of the user on the license.
Return Value
A string containing the name of the user.
get company name(self )
Obtains the name of the company on the license.
Return Value
A string containing the company name.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
104
Class ServerInfo Package prlsdkapi
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.51.2 Properties
Name Description
Inherited from objectclass
1.52 Class ServerInfo
object
prlsdkapi. Handle
prlsdkapi.ServerInfo
Provides methods for obtaining the Parallels Service information.
1.52.1 Methods
get host name(self )
Return the name of the machine hosting the specified Parallels Service.
get os version(self )
Returns the version of the host operating system.
get product version(self )
Return the Parallels product version number.
get cmd port(self )
Return the port number at which the Parallels Service is listening for requests.
get server uuid(self )
Return the host machine UUID (universally unique ID).
Inherited from prlsdkapi. Handle
105
Class NetService Package prlsdkapi
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.52.2 Properties
Name Description
Inherited from objectclass
1.53 Class NetService
object
prlsdkapi. Handle
prlsdkapi.NetService
Provides methods for obtaining the Parallels Service network status information.
1.53.1 Methods
get status(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.53.2 Properties
Name Description
Inherited from objectclass
106
Class LoginResponse Package prlsdkapi
1.54 Class LoginResponse
object
prlsdkapi. Handle
prlsdkapi.LoginResponse
Contains information returned as a result of a successful Parallels Service login operation.
1.54.1 Methods
get session uuid(self )
Returns the session UUID string (used to restore a session).
get running task count(self )
Return the total number of running tasks.
get running task by index(self, nIndex )
Obtain the RunningTask object containing information about a running task.
get server uuid(self )
Return the host machine UUID.
get host os version(self )
Return the host OS version.
get product version(self )
Return the Parallels product version number.
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.54.2 Properties
107
Class RunningTask Package prlsdkapi
Name Description
Inherited from objectclass
1.55 Class RunningTask
object
prlsdkapi. Handle
prlsdkapi.RunningTask
The RunningTask class is used to recover from a lost Parallels Service connection. It allowsto attach to an existing task that was started in the previous session and is still runninginside the Parallels Service.
1.55.1 Methods
get task uuid(self )
get task type(self )
get task parameters as string(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
1.55.2 Properties
Name Description
Inherited from objectclass
108
Class TisRecord Package prlsdkapi
1.56 Class TisRecord
object
prlsdkapi. Handle
prlsdkapi.TisRecord
Provides methods for retrieving information from the Tools Information Service database.
1.56.1 Methods
get uid(self )
get name(self )
get text(self )
get time(self )
get state(self )
Inherited from prlsdkapi. Handle
del (), init (), add ref(), free(), get handle type(), get type()
Inherited from object
delattr (), getattribute (), hash (), new (), reduce (), reduce ex (),repr (), setattr (), str ()
async capture scaled screen region to buffer(), async capture scaled screen region to file(),async capture screen region to file(), connect to vm(), disconnect from vm(), get dyn res tool status(),is sliding mouse enabled(), lock for read(), need cursor data(), set screen surface(),sync capture scaled screen region to file(), sync capture screen region to file(), un-lock()
110
Module prlsdkapi.prlsdk
2 Module prlsdkapi.prlsdk
2.1 Modules
• consts (Section 3, p. 172)• errors (Section 4, p. 198)
2.2 Functions
DeinitializeSDK(...)
DeinitializeSDK
GetSDKLibraryPath(...)
GetSDKLibraryPath
InitializeSDK(...)
InitializeSDK
IsSDKInitialized(...)
IsSDKInitialized
PrlAcl GetAccessForOthers(...)
Obtain the virtual machine access rights information.
PrlAcl GetOwnerName(...)
Determine the virtual machine owner name.
PrlAcl IsAllowed(...)
Determine if the current user is authorized to perform a specified task on avirtual machine.
PrlAcl IsCurrentSessionOwner(...)
Determine if the current user is the owner of the virtual machine.
PrlAcl SetAccessForOthers(...)
Set access rights on a virtual machine.
111
Functions Module prlsdkapi.prlsdk
PrlApi CreateHandlesList(...)
Create a new handle of type PRL HANDLES LIST.
PrlApi CreateOpTypeList(...)
PrlApi CreateOpTypeList
PrlApi CreateStringsList(...)
PrlApi Deinit(...)
PrlApi GetAppMode(...)
PrlApi GetCrashDumpsPath(...)
PrlApi GetCrashDumpsPath
PrlApi GetDefaultOsVersion(...)
PrlApi GetDefaultOsVersion
PrlApi GetMessageType(...)
PrlApi GetRecommendMinVmMem(...)
PrlApi GetRemoteCommandCode(...)
PrlApi GetRemoteCommandIndex(...)
PrlApi GetRemoteCommandTarget(...)
PrlApi GetResultDescription(...)
PrlApi GetSupportedOsesTypes(...)
PrlApi GetSupportedOsesTypes
PrlApi GetSupportedOsesVersions(...)
PrlApi GetSupportedOsesVersions
PrlApi GetVersion(...)
112
Functions Module prlsdkapi.prlsdk
PrlApi Init(...)
PrlApi InitCrashHandler(...)
PrlApi InitCrashHandler
PrlApi InitEx(...)
PrlApi MsgCanBeIgnored(...)
PrlApi SendRemoteCommand(...)
PrlApi UnregisterRemoteDevice(...)
PrlBootDev GetIndex(...)
Obtain the boot device index.
PrlBootDev GetSequenceIndex(...)
Obtain the sequence index of the boot device in the boot priority list.
PrlBootDev GetType(...)
Return the boot device type.
PrlBootDev IsInUse(...)
Determine whether the boot device is enabled or disabled.
PrlBootDev Remove(...)
Remove the boot device from the boot priority list.
PrlBootDev SetInUse(...)
Enable or disable the boot device in the boot priority list.
PrlBootDev SetIndex(...)
Set the boot device index.
PrlBootDev SetSequenceIndex(...)
Assign a sequence index to a boot device in the boot priority list.
prlsdkapi.Event (class), 9–10prlsdkapi.Event. getitem (method), 10prlsdkapi.Event. iter (method), 10prlsdkapi.Event. len (method), 10prlsdkapi.Event.can be ignored (method),
10prlsdkapi.Event.create answer event (method),
10prlsdkapi.Event.get err code (method),
9prlsdkapi.Event.get err string (method),
10prlsdkapi.Event.get issuer id (method),
10prlsdkapi.Event.get issuer type (method),
10prlsdkapi.Event.get job (method), 9prlsdkapi.Event.get param (method), 9prlsdkapi.Event.get param by name (method),
9
271
INDEX INDEX
prlsdkapi.Event.get params count (method),9
prlsdkapi.Event.get server (method), 9prlsdkapi.Event.get vm (method), 9prlsdkapi.Event.is answer required (method),
10prlsdkapi.Event.next (method), 10
prlsdkapi.EventParam (class), 10–12prlsdkapi.EventParam.get name (method),
prlsdkapi.Job.cancel (method), 12prlsdkapi.Job.get error (method), 12prlsdkapi.Job.get op code (method), 13prlsdkapi.Job.get progress (method), 12prlsdkapi.Job.get result (method), 12prlsdkapi.Job.get ret code (method), 12prlsdkapi.Job.get status (method), 12prlsdkapi.Job.is request was sent (method),
13prlsdkapi.Job.wait (method), 12
prlsdkapi.License (class), 100–102prlsdkapi.License.get company name (method),
101prlsdkapi.License.get license key (method),
101prlsdkapi.License.get status (method), 101prlsdkapi.License.get user name (method),
101prlsdkapi.License.is valid (method), 101
prlsdkapi.LoginResponse (class), 103–105prlsdkapi.LoginResponse.get host os version
(method), 104prlsdkapi.LoginResponse.get product version
(method), 104prlsdkapi.LoginResponse.get running task by index