The Vm class provides methods for managing virtual machines. When you
want to get the information about, modify, or create a virtual machine,
you have to obtain an instance of this class. The instance is obtained
using methods of other classes. The most commonly used methods are Server.create_vm and the Server.get_vm_list.
|
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. |
|
|
|
stop_ex(self,
nStopMode,
nFlags) |
|
|
|
pause(self,
bAcpi=False)
Pause the virtual machine. |
|
|
|
reset(self)
Reset the virtual machine. |
|
|
|
suspend(self)
Suspend the virtual machine. |
|
|
|
|
|
reset_uptime(self,
nFlags=0) |
|
|
|
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. |
|
|
|
switch_to_snapshot_ex(self,
sSnapshotUuid,
nFlags) |
|
|
|
delete_snapshot(self,
sSnapshotUuid,
bChild=False)
Delete the specified virtual machine snapshot. |
|
|
|
get_snapshots_tree(self)
Obtain snapshot information for the specified virtual machine. |
|
|
|
get_snapshots_tree_ex(self,
nFlags) |
|
|
|
lock(self,
nReserved)
Exclusively locks the virtual machine for current session. |
|
|
|
unlock(self,
nReserved)
Unlocks a previously locked virtual machine. |
|
|
|
update_snapshot_data(self,
sSnapshotUuid,
sNewName,
sNewDescription='
' )
Modify the virtual machine snapshot name and description. |
|
|
|
clone(self,
new_vm_name,
new_vm_root_path,
bCreateTemplate=False)
Clone an existing virtual machine. |
|
|
|
clone_ex(self,
new_vm_name,
new_vm_root_path,
nFlags)
Clone an existing virtual machine (extended version). |
|
|
|
generate_vm_dev_filename(self,
sFilenamePrefix='
' ,
sFilenameSuffix='
' ,
sIndexDelimiter='
' )
Generate a unique name for a virtual device. |
|
|
|
delete(self,
hDevicesList=0)
Delete the specified virtual machine from the host. |
|
|
|
get_problem_report(self)
Obtain a problem report on abnormal virtual machine termination. |
|
|
|
get_packed_problem_report(self,
nFlags) |
|
|
|
get_state(self)
Obtain the VmInfo object containing the specified virtual
machine information. |
|
|
|
refresh_config(self)
Refresh the virtual machine configuration information. |
|
|
|
login_in_guest(self,
sUserName,
sUserPassword,
nFlags=0)
Create a new console session or binds to an existing GUI session in a
virtual machine. |
|
|
|
start_vnc_server(self,
nReserved=0)
Start a VNC server for the specified virtual machine. |
|
|
|
stop_vnc_server(self,
nReserved=0)
Stops the VNC server in a virtual machine |
|
|
|
set_config(self,
hVmCfg)
This is a reserved method. |
|
|
|
get_config(self)
Obtain a handle of type VmConfig |
|
|
|
get_statistics(self)
Obtain the Statistics object containing the virtual machine
resource usage statistics. |
|
|
|
get_statistics_ex(self,
nFlags) |
|
|
|
subscribe_to_guest_statistics(self)
Subscribe to receive the virtual machine performance statistics. |
|
|
|
unsubscribe_from_guest_statistics(self)
Cancels the performance statistics subscription. |
|
|
|
reg(self,
sVmParentPath,
bNonInteractiveMode=False)
Create a new virtual machine and register it with the Parallels
Service. |
|
|
|
reg_ex(self,
sVmParentPath,
nFlags) |
|
|
|
unreg(self)
Unregisters the virtual machine from the Parallels Service. |
|
|
|
restore(self)
Restores the registered virtual machine. |
|
|
|
begin_edit(self)
Mark the beginning of the virtual machine configuration changes
operation. |
|
|
|
commit(self)
Commit the virtual machine configuration changes. |
|
|
|
|
|
get_questions(self)
Synchronously receive questions from the Parallels Service. |
|
|
|
create_event(self)
Creates an event bound to the virtual machine. |
|
|
|
create_unattended_disk(self,
nGuestDistroType,
sUsername,
sCompanyName,
sSerialKey) |
|
|
|
create_unattended_floppy(self,
nGuestDistroType,
sUsername,
sCompanyName,
sSerialKey)
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)
Starts the Parallels Tools installation in the virtual machine. |
|
|
|
get_tools_state(self)
Determine whether Parallels Tools is installed in the virtual
machine. |
|
|
|
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 using Parallels Tools. |
|
|
|
tis_get_identifiers(self)
Retrieve a list of identifiers from the Tools Information Service
database. |
|
|
|
tis_get_record(self,
sUid)
Obtain the TisRecord object containing a record from the Tools
Service database. |
|
|
|
uiemu_send_input(self,
hInput,
reserved) |
|
|
|
uiemu_send_text(self,
text,
textLength,
flags) |
|
|
|
uiemu_send_scroll(self,
scrollUnits,
scrollX,
scrollY,
flags) |
|
|
|
uiemu_query_element_at_pos(self,
posX,
posY,
queryId,
queryFlags) |
|
|
|
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. |
|
|
|
compact(self,
uMask,
nFlags=0)
Start the process of a virtual hard disk optimization. |
|
|
|
cancel_compact(self)
Finishes process of optimization of virtual hard disk. |
|
|
|
convert_disks(self,
uMask,
nFlags) |
|
|
|
cancel_convert_disks(self,
nFlags) |
|
|
|
authorise(self,
sPassword,
nFlags) |
|
|
|
change_password(self,
sOldPassword,
sNewPassword,
nFlags) |
|
|
|
encrypt(self,
sPassword,
sCipherPluginUuid,
nFlags) |
|
|
|
decrypt(self,
sPassword,
nFlags) |
|
|
|
|
|
|
|
set_protection(self,
sProtectionPassword,
nFlags) |
|
|
|
remove_protection(self,
sProtectionPassword,
nFlags) |
|
|
|
|
|
move(self,
sNewHomePath,
nFlags) |
|
|
|
|
|
|
|
terminal_connect(self,
nFlags) |
|
|
|
terminal_disconnect(self) |
|
|
|
tools_set_task_bar_visibility(self,
uVisibility) |
|
|
|
tools_set_power_scheme_sleep_ability(self,
uAbility) |
|
|
Inherited from VmConfig :
add_default_device ,
add_default_device_ex ,
create_boot_dev ,
create_scr_res ,
create_share ,
create_vm_dev ,
get3dacceleration_mode ,
get_access_rights ,
get_action_on_stop_mode ,
get_action_on_window_close ,
get_all_devices ,
get_app_in_dock_mode ,
get_auto_compress_interval ,
get_auto_start ,
get_auto_start_delay ,
get_auto_stop ,
get_background_priority ,
get_boot_dev ,
get_boot_dev_count ,
get_coherence_button_visibility ,
get_config_validity ,
get_confirmations_list ,
get_cpu_accel_level ,
get_cpu_count ,
get_cpu_mode ,
get_custom_property ,
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_dns_servers ,
get_dock_icon_type ,
get_expiration_date ,
get_expiration_note ,
get_expiration_offline_time_to_live ,
get_expiration_time_check_interval ,
get_expiration_trusted_time_server ,
get_external_boot_device ,
get_floppy_disk ,
get_floppy_disks_count ,
get_foreground_priority ,
get_free_disk_space_ratio ,
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_host_mem_quota_max ,
get_host_mem_quota_priority ,
get_hostname ,
get_icon ,
get_last_modified_date ,
get_last_modifier_name ,
get_linked_vm_uuid ,
get_location ,
get_max_balloon_size ,
get_name ,
get_net_adapter ,
get_net_adapters_count ,
get_optical_disk ,
get_optical_disks_count ,
get_optimize_modifiers_mode ,
get_os_type ,
get_os_version ,
get_parallel_port ,
get_parallel_ports_count ,
get_password_protected_operations_list ,
get_ram_size ,
get_resource_quota ,
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_unattended_install_edition ,
get_unattended_install_locale ,
get_undo_disks_mode ,
get_uptime ,
get_uptime_start_date ,
get_usb_device ,
get_usb_devices_count ,
get_uuid ,
get_video_ram_size ,
get_vm_info ,
get_vnchost_name ,
get_vncmode ,
get_vncpassword ,
get_vncport ,
get_window_mode ,
is_adaptive_hypervisor_enabled ,
is_allow_select_boot_device ,
is_archived ,
is_auto_apply_ip_only ,
is_auto_capture_release_mouse ,
is_auto_compress_enabled ,
is_battery_status_enabled ,
is_close_app_on_shutdown ,
is_config_invalid ,
is_cpu_hotplug_enabled ,
is_cpu_vtx_enabled ,
is_default_device_needed ,
is_disable_apic ,
is_disk_cache_write_back ,
is_efi_enabled ,
is_encrypted ,
is_exclude_dock ,
is_expiration_date_enabled ,
is_gesture_swipe_from_edges_enabled ,
is_guest_sharing_auto_mount ,
is_guest_sharing_enable_spotlight ,
is_guest_sharing_enabled ,
is_hide_minimized_windows_enabled ,
is_high_resolution_enabled ,
is_host_mem_auto_quota ,
is_host_sharing_enabled ,
is_isolated_vm_enabled ,
is_lock_guest_on_suspend_enabled ,
is_longer_battery_life_enabled ,
is_map_shared_folders_on_letters ,
is_multi_display ,
is_nested_virtualization_enabled ,
is_os_res_in_full_scr_mode ,
is_pause_when_idle ,
is_pmuvirtualization_enabled ,
is_protected ,
is_ram_hotplug_enabled ,
is_relocate_task_bar ,
is_scr_res_enabled ,
is_share_all_host_disks ,
is_share_clipboard ,
is_share_user_home_dir ,
is_shared_apps_guest_to_host ,
is_shared_apps_host_to_guest ,
is_shared_bluetooth_enabled ,
is_shared_camera_enabled ,
is_shared_cloud_enabled ,
is_shared_profile_enabled ,
is_show_dev_tools_enabled ,
is_show_task_bar ,
is_show_windows_app_in_dock ,
is_smart_guard_enabled ,
is_smart_guard_notify_before_creation ,
is_smart_mount_dvds_enabled ,
is_smart_mount_enabled ,
is_smart_mount_network_shares_enabled ,
is_smart_mount_removable_drives_enabled ,
is_smart_mouse_enabled ,
is_start_in_detached_window_enabled ,
is_sticky_mouse_enabled ,
is_support_usb30enabled ,
is_switch_off_aero_enabled ,
is_switch_off_windows_logo_enabled ,
is_switch_to_fullscreen_on_demand_enabled ,
is_sync_default_printer ,
is_sync_ssh_ids_enabled ,
is_sync_timezone_disabled ,
is_sync_vm_hostname_enabled ,
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_downloads ,
is_use_host_printers ,
is_use_movies ,
is_use_music ,
is_use_pictures ,
is_user_defined_shared_folders_enabled ,
is_vertical_synchronization_enabled ,
is_virtual_links_enabled ,
is_win_systray_in_mac_menu_enabled ,
set3dacceleration_mode ,
set_action_on_stop_mode ,
set_action_on_window_close ,
set_adaptive_hypervisor_enabled ,
set_allow_select_boot_device ,
set_app_in_dock_mode ,
set_auto_apply_ip_only ,
set_auto_capture_release_mouse ,
set_auto_compress_enabled ,
set_auto_compress_interval ,
set_auto_start ,
set_auto_start_delay ,
set_auto_stop ,
set_background_priority ,
set_battery_status_enabled ,
set_close_app_on_shutdown ,
set_coherence_button_visibility ,
set_confirmations_list ,
set_cpu_accel_level ,
set_cpu_count ,
set_cpu_hotplug_enabled ,
set_cpu_mode ,
set_custom_property ,
set_default_config ,
set_description ,
set_disable_apicsign ,
set_disk_cache_write_back ,
set_dns_servers ,
set_dock_icon_type ,
set_efi_enabled ,
set_exclude_dock ,
set_expiration_date ,
set_expiration_date_enabled ,
set_expiration_note ,
set_expiration_offline_time_to_live ,
set_expiration_time_check_interval ,
set_expiration_trusted_time_server ,
set_external_boot_device ,
set_foreground_priority ,
set_free_disk_space_ratio ,
set_gesture_swipe_from_edges_enabled ,
set_guest_sharing_auto_mount ,
set_guest_sharing_enable_spotlight ,
set_guest_sharing_enabled ,
set_hide_minimized_windows_enabled ,
set_high_resolution_enabled ,
set_host_mem_auto_quota ,
set_host_mem_quota_max ,
set_host_mem_quota_priority ,
set_host_sharing_enabled ,
set_hostname ,
set_icon ,
set_isolated_vm_enabled ,
set_lock_guest_on_suspend_enabled ,
set_longer_battery_life_enabled ,
set_map_shared_folders_on_letters ,
set_max_balloon_size ,
set_multi_display ,
set_name ,
set_nested_virtualization_enabled ,
set_optimize_modifiers_mode ,
set_os_res_in_full_scr_mode ,
set_os_version ,
set_password_protected_operations_list ,
set_pause_when_idle ,
set_pmuvirtualization_enabled ,
set_ram_hotplug_enabled ,
set_ram_size ,
set_relocate_task_bar ,
set_resource_quota ,
set_scr_res_enabled ,
set_search_domains ,
set_share_all_host_disks ,
set_share_clipboard ,
set_share_user_home_dir ,
set_shared_apps_guest_to_host ,
set_shared_apps_host_to_guest ,
set_shared_bluetooth_enabled ,
set_shared_camera_enabled ,
set_shared_cloud_enabled ,
set_shared_profile_enabled ,
set_show_dev_tools_enabled ,
set_show_task_bar ,
set_show_windows_app_in_dock ,
set_smart_guard_enabled ,
set_smart_guard_interval ,
set_smart_guard_max_snapshots_count ,
set_smart_guard_notify_before_creation ,
set_smart_mount_dvds_enabled ,
set_smart_mount_enabled ,
set_smart_mount_network_shares_enabled ,
set_smart_mount_removable_drives_enabled ,
set_smart_mouse_enabled ,
set_start_in_detached_window_enabled ,
set_start_login_mode ,
set_start_user_creds ,
set_sticky_mouse_enabled ,
set_support_usb30enabled ,
set_switch_off_aero_enabled ,
set_switch_off_windows_logo_enabled ,
set_switch_to_fullscreen_on_demand_enabled ,
set_sync_default_printer ,
set_sync_ssh_ids_enabled ,
set_sync_timezone_disabled ,
set_sync_vm_hostname_enabled ,
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_unattended_install_edition ,
set_unattended_install_locale ,
set_undo_disks_mode ,
set_use_default_answers ,
set_use_desktop ,
set_use_documents ,
set_use_downloads ,
set_use_host_printers ,
set_use_movies ,
set_use_music ,
set_use_pictures ,
set_user_defined_shared_folders_enabled ,
set_uuid ,
set_vertical_synchronization_enabled ,
set_video_ram_size ,
set_virtual_links_enabled ,
set_vnchost_name ,
set_vncmode ,
set_vncpassword ,
set_vncport ,
set_win_systray_in_mac_menu_enabled ,
set_window_mode
Inherited from _Handle :
__del__ ,
__init__ ,
add_ref ,
free ,
from_string ,
get_handle_type ,
get_package_id ,
get_type
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|