This guide is a part of the Parallels Virtualization SDK. It contains the Parallels Python API Reference
documentation. Please note that this guide does not provide general information on how to use the
Parallels Virtualization SDK. To learn the SDK basics, please read the Parallels Virtualization SDK Programmer's Guide, which is a companion book to this one.
Organization of This Guide
This guide is organized into the following chapters:
Getting Started. You are reading it now.
Parallels Python API Reference. The main chapter describing the Parallels Python package and
modules. The chapter has the following main sections:
•Package prlsdkapi. Contains the main reference information. Classes and methods are
described here.
•Module prlsdkapi.prlsdk. This section described an internal module. Do not use it in your
programs.
•Module prlsdkapi.prlsdk.consts. Describes the API constants. Most of the constants are
combined into groups which are used as pseudo enumerations. Constants that belong to the
same group have the same prefix in their names. For example, constants with a PDE_ prefix
identify device types: PDE_GENERIC_DEVICE, PDE_HARD_DISK, PDE_GENERIC_NETWORK_ADAPTER, etc. Other constants are named in a similar manner.
Introduction
•Module prlsdkapi.prlsdk.errors. Describes error code constants. The API has a very large
number of error codes, but the majority of them are used internally. The error code constants
are named similarly to other constants (i.e. using prefixes for grouping).
How to Use This Guide
If you are just starting with the Parallels Virtualization SDK, your best source of information is
Parallels Virtualization SDK Programmer's Guide. It explain the Parallels Python API concepts
and provides descriptions and step-by-step instructions on how to use the API to perform the most
common tasks. Once you are familiar with the basics, you can use this guide as a reference where
you can find a particular function syntax or search for a function that provides a functionality that
you need.
Searching for Symbols in This Guide
Please note that when searching this guide for a symbol with an underscore in its name, the search
may not produce the desired results. If you are experiencing this problem, replace an underscore
with a whitespace character when typing a symbol name in the Search box. For example, to
search for the PDE_HARD_DISK symbol, type PDE HARD DISK (empty spaces between parts of
the symbol name).
Virtual Machines vs. Parallels Containers
With Parallels Cloud Server you have a choice of creating and running two types of virtual servers:
Parallels Virtual Machines and Parallels Containers. While the two server types use different
virtualization technologies (Hypervisor and Operating System Virtualization respectively), the
Parallels Python API can be used to manage both server types transparently. This means that the
same set of classes and methods (with some exceptions) is used to perform operations on both
Virtual Machines and Containers.
The following list provides an overview of the specifics and differences when using the API to
manage Virtual Machines or Containers:
• When obtaining the list of the available virtual servers with the Server.get_vm_list
method, the result set will contain the virtual servers of both types. When iterating through the
list and obtaining an individual server configuration data, you can determine the server type
using the VmConfig.get_vm_type method. The method returns the server type:
consts.PVT_VM (Virtual Machine) or consts.PVT_CT (Container). Once you know the server
type, you can perform the desired server management tasks accordingly.
• When creating a virtual server, you have to specify the type of the server you want to create.
This is done by using the Vm.set_vm_type method passing the consts.PVT_VM or the
consts.PVT_CT constant to it as a parameter.
4
Introduction
• The majority of classes and methods operate on both virtual server types. A method and its
input/output parameters don't change. Some classes and methods are Virtual Machine specific
or Container specific. In the Python API Reference documentation such classes and methods
have a Parallels Virtual Machines only or Parallels Containers only note at the beginning of the
description. If a class or a method description doesn't specify the server type, it means that it
can operate on both Virtual Machines and Containers.
• When working with a particular server type, the flow of a given programming task may be
slightly different. There aren't many tasks like that. The most common tasks that have these
differences are documented in this guide and the Parallels Virtualization SDk Programmer's Guide.
Code Samples — Parallels Container
Management
This section provides a collection of simplified sample code that demonstrates how to use the
Parallels Python API to perform the most common Parallels Container management tasks. For
simplicity, no error checking is implemented in the sample code below. When writing your own
program, the error checking should be properly performed. For more complete information and
code samples, please read the Parallels Virtualization SDK Programmer's Guide.
import os
import select
import prlsdkapi
from prlsdkapi import consts
# Initialize the SDK.
def init():
print 'init_server_sdk'
prlsdkapi.init_server_sdk()
# Deinitialize the SDK.
def deinit():
print 'deinit_sdk'
prlsdkapi.deinit_sdk()
# Create a Parallels Container.
def create(srv, name):
print 'create ct'
ct = srv.create_vm()
ct.set_vm_type(consts.PVT_CT)
ct.set_name(name)
ct.set_os_template('centos-6-x86_64')
ct.reg('', True).wait()
return ct
# Register a Container with
# Parallels Cloud Server
def register(srv, path):
print 'register ct'
ct = srv.register_vm(path).wait()
return ct
# Change a Container name.
def setName(ct, name):
print 'set_name'
ct.begin_edit().wait()
ct.set_name(name)
5
Introduction
ct.commit().wait()
# Set CPU limits for a Container.
def setCpuLimit(ct, limit):
print 'set_cpu_limit'
ct.begin_edit().wait()
ct.set_cpu_limit(limit)
ct.commit().wait()
# Set RAM size for a Container.
def setRamSize(ct, size):
print 'set_ram_size'
ct.begin_edit().wait()
ct.set_ram_size(size)
ct.commit().wait()
# Add a hard disk to a Container.
def addHdd(ct, image, size):
print 'add hdd'
ct.begin_edit().wait()
hdd = ct.create_vm_dev(consts.PDE_HARD_DISK)
hdd.set_emulated_type(consts.PDT_USE_IMAGE_FILE)
hdd.set_disk_type(consts.PHD_EXPANDING_HARD_DISK)
hdd.set_disk_size(size)
hdd.set_enabled(True)
hdd.create_image(bRecreateIsAllowed = True,
bNonInteractiveMode = True).wait()
ct.commit().wait()
# Execute a program in a Container.
def execute(ct, cmd, args):
print 'execute command'
io = prlsdkapi.VmIO()
io.connect_to_vm(ct, consts.PDCT_HIGH_QUALITY_WITHOUT_COMPRESSION).wait()
# open guest session
result = ct.login_in_guest('root', '').wait()
guest_session = result.get_param()
# format args and envs
sdkargs = prlsdkapi.StringList()
for arg in args:
sdkargs.add_item(arg)
sdkargs.add_item("")
sdkenvs = prlsdkapi.StringList()
sdkenvs.add_item("")
# execute
ifd, ofd = os.pipe()
flags = consts.PRPM_RUN_PROGRAM_ENTER|consts.PFD_STDOUT
job = guest_session.run_program(cmd, sdkargs, sdkenvs,
nFlags = flags, nStdout = ofd)
# read output
output = ''
while True:
rfds, _, _ = select.select([ifd], [], [], 5)
if not rfds:
break
buf = os.read(ifd, 256)
output += buf
print('output:\n%s--end of output' % output)
# cleanup
os.close(ifd)
job.wait()
guest_session.logout()
io.disconnect_from_vm(ct)
# MAIN PROGRAM
def sample1():
6
Introduction
init()
srv = prlsdkapi.Server()
srv.login_local().wait()
# Create and start a Container.
ct = create(srv, '101')
ct.start().wait()
# Execute the '/bin/cat /proc/cpuinfo' command
# in a Container.
execute(ct, '/bin/cat', ['/proc/cpuinfo'])
ct.stop().wait()
# Set some parameters and add a hard disk
# to a Container.
setCpuLimit(ct, 50)
setRamSize(ct, 2048)
addHdd(ct, '/tmp/my_empty_hdd_image', 1024)
# Clone a Container.
ct2 = ct.clone('121', '').wait().get_param()
print('Clone name = %s' % ct2.get_name())
# Unregister and registers back a Container.
home_path = ct.get_home_path()
ct.unreg()
ct = srv.register_vm(home_path).wait().get_param()
# Delete a Container.
ct.delete()
ct2.delete()
srv.logoff().wait()
deinit()
Code Samples: Virtual Machine Management
This section provides a collection of simplified sample code that demonstrates how to use the
Parallels Python API to perform the most common Parallels Virtual Machine management tasks. For
simplicity, no error checking is done in the sample code below. When writing your own program,
the error checking should be properly implemented. For the complete information and code
samples, please read the Parallels Virtualization SDK Programmer's Guide.
# Create a Virtual Machine
def create(server):
# Get the ServerConfig object.
result = server.get_srv_config().wait()
srv_config = result.get_param()
# Create a Vm object and set the virtual server type
# to Virtual Machine (PVT_VM).
vm = server.create_vm()
vm.set_vm_type(consts.PVT_VM)
# Set a default configuration for the VM.
vm.set_default_config(srv_config, \
consts.PVS_GUEST_VER_WIN_WINDOWS8, True)
# Set the VM name.
vm.set_name("Windows8")
# Modify the default RAM and HDD size.
vm.set_ram_size(256)
dev_hdd = vm.get_hard_disk(0)
7
Introduction
dev_hdd.set_disk_size(3000)
# Register the VM with the Parallels Cloud Server.
vm.reg("", True).wait()
# Change VM name.
def setName(vm, name):
print 'set_name'
vm.begin_edit().wait()
vm.set_name(name)
vm.commit().wait()
# Set boot device priority
def vm_boot_priority(vm):
# Begin the virtual server editing operation.
vm.begin_edit().wait()
# Modify boot device priority using the following order:
# CD > HDD > Network > FDD.
# Remove all other devices from the boot priority list (if any).
count = vm.get_boot_dev_count()
for i in range(count):
boot_dev = vm.get_boot_dev(i)
# Enable the device.
boot_dev.set_in_use(True)
# Set the device sequence index.
dev_type = boot_dev.get_type()
# Commit the changes.
vm.commit().wait()
# Execute a program in a VM.
def execute(vm):
# Log in.
g_login = "Administrator"
g_password = "12345"
# Create a StringList object to hold the
# program input parameters and populate it.
hArgsList = prlsdkapi.StringList()
hArgsList.add_item("cmd.exe")
hArgsList.add_item("/C")
hArgsList.add_item("C:\\123.bat")
# Create an empty StringList object.
# The object is passed to the VmGuest.run_program method and
# is used to specify the list of environment variables and
# their values to add to the program execution environment.
# In this sample, we are not adding any variables.
# If you wish to add a variable, add it in the var_name=var_value format.
hEnvsList = prlsdkapi.StringList()
hEnvsList.add_item("")
8
Introduction
# Establish a user session.
vm_guest = vm.login_in_guest(g_login, g_password).wait().get_param()
# Run the program.
vm_guest.run_program("cmd.exe", hArgsList, hEnvsList).wait()
# Log out.
vm_guest.logout().wait()
The main class pr oviding methods for accessing Parallels Service. Most of the operations in
the Parallels Python API begin with obtaining an instance of this class. The class is used to
establish a connection with the Parallels Service. Its other methods can be used to perform
various tasks related to th e Parallels Service itself, higher level virtual machine tasks, such
as obtaining the virtual machine list or creating a virtual machine, and many others.
20
Class ServerPackage prlsdkapi
1.14.1Methods
init (self, handle=0)
init (...) initiali zes x; see help(type(x)) for signature
Disable administrator confirmation mode for the session.
enable confirmation mode(self, nFlags =0)
Enable administrator confirmation mode for the session.
is confirmation mode enabled(self )
Determine confirmation mode for the session.
get srv config(self )
Obtain the ServerConfig object containing the host configuration
information.
Return Value
A Job ob ject . The ServerConfig object is obtained from the
Result object.
get common prefs(self )
Obtain the DispConfig object containing the specified Parallels Service
preferences info.
Return Value
A Job ob ject .
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 Parallels
Service common preferences through DispConfig. When you are done making
the changes, call Server.common prefs commit to commit the changes.
common prefs commit(self, hDispCfg)
Commit the Parallels Server preferences changes.
Parameters
hDispCfg: A instance of DispConfig contaning the Parallels Service
preferences info.
common prefs commit ex(self, hDispCfg, nFlags)
22
Class ServerPackage prlsdkapi
get user profile(self )
Obtain the UserConfig object containing profile data of the currently logged
in user.
Return Value
A Job ob ject .
get user info list(self )
Obtain a list of UserInfo objects containing information about all known
users.
Return Value
A Job ob ject .
get user info(self, sUserId)
Obtain the UserInfo object containing information about the speci fi e d u ser .
Parameters
sUserId: UUID of the user to obtain the information for.
Return Value
A Job ob ject .
get virtual network list(self, nFlags= 0)
Obtain the VirtualNet object containing information about all existing
virtual networks.
add virtual network(self, hVirtNet, nFlags=0)
Add a new virtual network to the Parallels Service configuration.
Parameters
hVirtNet: An instance of the VirtualNet class containing the
vitual network information.
nFlags:Reserved parameter.
update virtual network(self, hVirtNet, nFlags=0)
Update parameters of an existing virtual network.
23
Class ServerPackage prlsdkapi
delete virtual network(self, hVirtNet, nFlags =0)
Remove an existing virtual network from the Parallels Service configuration.
Parameters
hVirtNet: An instance of VirtualNet identifying the virtual
Known Subclasses: prls d kapi.HostHardDisk, prlsdkapi.HostNet, prlsdkapi.HostPciDevice
A base class providing methods for obtaining information about physical devices on the h o st
computer. The descendants of this class provide additional methods specific to a particular
device type.
1.18.1Methods
get name(self )
Obtain the device name.
get id(self )
Obtain the device ID.
get type(self )
Obtain the device type.
Overrides: prlsdkapi. Handle.get type
40
Class HostHardDiskPackage prlsdkapi
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 through
IOMMU technology.
set device state(self, nDeviceState)
Set whether a virtual machine can directly use a PCI device through IOMMU
technology.
Inherited from prlsdkapi. Handle
del (),init (), add ref(), free(), get handle type(), get package id()
Inherited from object
delattr (),format (),getattribute (),hash (),new (),reduce (),reduce ex (),
Set the Parallels Service memory allocation mode (automat i c or manual).
Parameters
bAdjustMemAuto: Boolean. Set to True for automatic mode. Set to
False for manual mode.
is send statistic report(self )
Determine whether the statistics reports (CEP) mechanism is activated.
Return Value
A Boolean value. True - CEP is activated. False - deactivated.
set send statistic report(self, bSendStatisticReport)
Turn on/off the mechanism of sending stati st i cs r eports (CEP).
Parameters
bSendStatisticReport: Boolean . Set to True to turn the CEP on.
Set to False to turn it off.
52
Class DispConfigPackage prlsdkapi
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.
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 def a ult settings(self, bDefaultChangeSettings)
Grant or deny a permission to new users to modify Parallels Service
preferences.
Parameters
bDefaultChangeSettings: Bool ean . Set to True to grant the
permission. Set to False to deny it.
53
Class DispConfigPackage prlsdkapi
get min security level(self )
Determine the lowest allowable security level that can be used to connect to
the Parallels Service.
Return Value
One of the following constants: PSL LOW SECURITY – Plain
TCP/IP (no encryption). PSL NORMAL SECURITY – impor t ant
data is sent and received using SSL. PSL HIGH SECURITY – all
data 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 the
Parallels Service.
Parameters
nMinSecurityLevel: Security level to set. Can be one of the
following constants: PSL LOW SECURITY –
Plain TCP/IP (no encryption).
PSL NORMAL S ECUR ITY – im portant data
is sent and received using SSL.
PSL HIGH SECURITY – al l data is sent and
received using SSL.
get confirmations list(self )
Obtain a list of operations that require administrator confirmation.
set confirmations list(self, hConfirmList)
Set the list of operations that require administrator con fi r m at i on.
get default backup server(self )
Return the default backup server host name or IP add r ess .
Return Value
A string containing the backup server host name of IP address.
set default backup server(self, sBackupServer )
Set the default backup server host name or IP address.
Parameters
sBackupServer: String. The default backup server host name or IP
address.
54
Class DispConfigPackage prlsdkapi
get backup user l og in( self )
Return the backup user login name.
Return Value
A string containing the name.
set backup user l og in( self, sU ser Login)
Set the backup user login.
Parameters
sUserLogin: String. The backup user log in name to set.
set backup user pa ss word(self, sUserPassword)
Set the backup user password.
Parameters
sUserPassword: String. The backup us er p ass word to set.
is backup user pas sword enabled(self )
Determine if the backup user password is enabled .
Return Value
A Boolean value. True - backup u ser password is enabled. False password is disabled.
set backup user pa ss word enabled(self, bUserPasswordEnabled)
Enable or disable the backup user password.
Parameters
bUserPasswordEnabled: Boolean . Set to True to enable the
password. Set to False to diable it.
get default backup directory(self )
Return the name and path of the default backup directory.
Return Value
A string containing the directory name and path.
set default backup directory(self, sBackupDirectory)
Set name and path of the default backup directory.
get backup timeout(self )
55
Class DispConfigPackage prlsdkapi
set backup timeout(self, nTimeout)
get default encryption plugin id(self )
set default encryption plugin id(self, sDefaultPluginId )
are plugins enabled(self )
enable plugins(self, bEnablePluginsSupport)
get vm cpu limit type(self )
set vm cpu limit type(self, nVmCpuLimitType)
is verbose log enabled(self )
Determine whether the verbose log level is configured for dispatcher and
virtual machines processes.
Return Value
A Boolean value. True - log level i s con figured. False - log level is
not configured.
set verbose log enabled(self, bEnabled)
Enable or disable the verbose log level for dispatcher and virtual machines
processes.
is allow multiple pmc(self )
set allow multiple pmc(self, bEnabled)
is allow direct mobile(self )
set allow direct mobile(self, bEnabled)
is allow mobile clients(self )
get proxy connection status(self )
set proxy connection creds(self, sAccountId, sPassword)
56
Class VirtualNetPackage prlsdkapi
get proxy connection user(self )
is log rotation enabled(self )
set log rotation enabled(self, bEnabled)
get cpu features mask ex(self )
set cpu features mask ex(self, hCpuFeatures)
get usb identity count(self )
get usb identity(self, nUsbIdentI ndex )
set usb ident as sociation(self, sSystemName, sVmUuid, nFlags)
get cpu pool(self )
Inherited from prlsdkapi. Handle
del (),init (), add ref(), free(), get handle type(), get package id(), get type()
Inherited from object
delattr (),format (),getattribute (),hash (),new (),reduce (),reduce ex (),
Provides access to the Port Forwarding functionality.Using this functionality, you can
redirect all incoming data from a specific TCP p or t on the host computer to a specified port
in a specified virtual machine.
1.27.1Methods
init (self, handle=0)
init (...) initiali zes x; see help(type(x)) for signature
x.
Overrides: object.
initextit(inherited docum entation)
create(self )
Create a new instance of the PortForward class.
get incoming port(self )
Return the incoming port.
set incoming port(self, nIncomingPort)
Set the specified incoming port.
62
Class VmDevicePackage prlsdkapi
get redirect ipaddress(self )
Return the redirect IP address of the specified port forward entry.
set redirect ipaddress(self, sRedirectIPAddress)
Set the specified port forward entry redirect IP address.
get redirect port(self )
Return the redirect port.
set redirect port(self, nRedirectPort)
Set the specified redirect port.
Inherited from prlsdkapi. Handle
del (), add ref(), free(), get handle type(), get package id(), get type()
Inherited from object
delattr (),format (),getattribute (),hash (),new (),reduce (),reduce ex (),
Provides methods for managing virtual hard disks in a virtual machine.
1.29.1Methods
get disk type(self )
Return the hard disk type.
67
Class VmHardDiskPackage prls d kapi
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.
get size on disk(self )
Return the size of the occupied space on the hard disk.
set password(self, sPassword )
is encrypted(self )
check password(self, nFlags )
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.
set mount point(self, sMountPoint)
get mount point(self )
68
Class VmHdPartitionPackage prlsdkapi
set auto compress enabled(self, bEnabled)
is auto compress enabled(self )
get storage url(self )
set storage url(self, sURL)
Inherited from prlsdkapi.VmDevice(Section 1.28)
connect(), copy image(), create ( ), create image(), d i sco n n ec t( ) , get description(),
get emulated type(), get friendly name(), get iface type(), get image path(), get index(),
get output file(), get stack index(), get sub type(), get sys name(), get type(), is connected(),
is enabled(), is passthrough(), i s 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 sub type(), set sys name()
Inherited from prlsdkapi. Handle
del (),init (), add ref(), free(), get handle type(), get package id()
Inherited from object
delattr (),format (),getattribute (),hash (),new (),reduce (),reduce ex (),
Provides methods for managing network adapte rs in a virtual machine.
70
Class VmNetPackage prlsdkapi
1.31.1Methods
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.
get mac address canonical(self )
set mac address(self, sNewMacAddress)
Set MAC address to the network ada p t er .
generate mac addr(self )
Generate a unique MAC address for the virtual network adapter.
is auto apply(self )
Determine if the networ k adapter is configured to automatically apply network
settings inside guest.
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 the
virtual network adapter.
71
Class VmNetPackage prlsdkapi
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 vi rt ual network
adapter.
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 th r o u gh D HCP on the guest
OS side.
set configure with dhcp(self, bConfigureWithDhcp)
Set whether the network adapter should be configured through DHCP or
manually.
is configure with dhcp ipv6(self )
set configure with dhcp ipv6(self, bConfigureWithDhcp)
get default gateway(self )
Obtain the default gateway assigned to the virtu al network ad apter.
set default gateway(self, sN e wDefaultG ateway )
Set the default gateway address for the network adapter.
get default gateway ipv6(self )
set default gateway ipv6(self, sNewDefaultGateway)
72
Class VmNetPackage prlsdkapi
get virtual network id(self )
Obtain the virtual network ID assigned to the vi r tual network adapter.
set virtual network id(self, sNewVirtualNetworkId )
Set the virtual network ID for the network adapter.
get adapter type(self )
set adapter type(self, nAdapterType)
is pkt filter prevent mac spoof (self )
set pkt filter prevent mac spoof (self, bPktFilterPreventMacSpoof )
is pkt filter prevent promisc(self )
set pkt filter prevent promisc(self, bPktFilterPreventPromisc)
is pkt filter prevent ip spoof (self )
set pkt filter prevent ip spoof (self, bPktFilterPreventIpSpoof )
is firewall enabled( self )
set firewall enabled( self, bEnabled)
get firewall default policy(self, nDirection)
set firewall defa ult policy(self, nDirection, nPolicy)
get firewall rule list(self, nDirection)
set firewall rule list(self, nDirection, hRuleList)
get host interface name(self )
set host interface name(self, sNewHostInterfaceName)
Inherited from prlsdkapi.VmDevice(Section 1.28)
73
Class VmUsbPackage prlsdkapi
connect(), copy image(), create () , create image(), d i sco n n ec t( ) , get description(),
get emulated type(), get friendly name(), get iface type(), get image path(), get index(),
get output file(), get stack index(), get sub type(), get sys name(), get type(), is connected(),
is enabled(), is passthrough(), i s 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 sub type(), set sys name()
Inherited from prlsdkapi. Handle
del (),init (), add ref(), free(), get handle type(), get package id()
Inherited from object
delattr (),format (),getattribute (),hash (),new (),reduce (),reduce ex (),
Provides methods for managing USB devices in a virtual machine.
1.32.1Methods
get autoconnect option(self )
Obtain the USB controller autoconnect device option.
set autoconnect option(self, nAutoconnectOption)
Set the USB controller autoconnect device option.
74
Class VmSoundPackage prlsdkapi
Inherited from prlsdkapi.VmDevice(Section 1.28)
connect(), copy image(), create ( ), create image(), d i sco n n ec t( ) , get description(),
get emulated type(), get friendly name(), get iface type(), get image path(), get index(),
get output file(), get stack index(), get sub type(), get sys name(), get type(), is connected(),
is enabled(), is passthrough(), i s 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 sub type(), set sys name()
Inherited from prlsdkapi. Handle
del (),init (), add ref(), free(), get handle type(), get package id()
Inherited from object
delattr (),format (),getattribute (),hash (),new (),reduce (),reduce ex (),
Provides methods for managing sound devices in a virtual machine.
1.33.1Methods
get output dev(self )
Return the output device string for the sound device.
75
Class VmSoundPackage prlsdkapi
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.28)
connect(), copy image(), create ( ), create image(), d i sco n n ec t( ) , get description(),
get emulated type(), get friendly name(), get iface type(), get image path(), get index(),
get output file(), get stack index(), get sub type(), get sys name(), get type(), is connected(),
is enabled(), is passthrough(), i s 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 sub type(), set sys name()
Inherited from prlsdkapi. Handle
del (),init (), add ref(), free(), get handle type(), get package id()
Inherited from object
delattr (),format (),getattribute (),hash (),new (),reduce (),reduce ex (),
Provides methods for managing serial ports in a virtual machine.
1.34.1Methods
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.28)
connect(), copy image(), create ( ), create image(), d i sco n n ec t( ) , get description(),
get emulated type(), get friendly name(), get iface type(), get image path(), get index(),
get output file(), get stack index(), get sub type(), get sys name(), get type(), is connected(),
is enabled(), is passthrough(), i s 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 sub type(), set sys name()
Inherited from prlsdkapi. Handle
del (),init (), add ref(), free(), get handle type(), get package id()
Inherited from object
delattr (),format (),getattribute (),hash (),new (),reduce (),reduce ex (),