Package prlsdkapi :: Class Vm
[hide private]
[frames] | no frames]

Class Vm

object --+        
         |        
   _Handle --+    
             |    
      VmConfig --+
                 |
                Vm

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.

Instance Methods [hide private]
 
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.
 
change_sid(self, nFlags)
 
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).
 
clone_with_uuid(self, new_vm_name, new_vm_uuid, new_vm_root_path, nFlags)
 
migrate(self, hTargetServer, target_home_path='', migration_flags=0, reserved_flags=0, force_operation=True)
Migrate an existing virtual machine to another host.
 
migrate_ex(self, target_host, target_port, target_session_id, target_home_path='', migration_flags=0, reserved_flags=0, force_operation=True)
Migrate an existing virtual machine to another host (extended version).
 
migrate_with_rename(self, hTargetServer, target_name, target_home_path, migration_flags, reserved_flags, force_operation)
 
migrate_with_rename_ex(self, target_host, target_port, target_session_id, target_name, target_home_path, migration_flags, reserved_flags, force_operation)
 
migrate_cancel(self)
Cancel the virtual machine migration operation.
 
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.
 
refresh_config_ex(self, nFlags)
 
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_user_passwd(self, sUserName, sUserPasswd, nFlags=0)
Change the password of a guest operating system user.
 
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 Virtuozzo Service.
 
reg_ex(self, sVmParentPath, nFlags)
 
unreg(self)
Unregisters the virtual machine from the Virtuozzo 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.
 
commit_ex(self, nFlags)
 
reg_event_handler(self, callback_func, userData)
 
unreg_event_handler(self, callback_func, userData)
Unregister an event handler.
 
get_questions(self)
Synchronously receive questions from the Virtuozzo Service.
 
create_event(self)
Creates an event bound to the virtual machine.
 
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)
Install Virtuozzo Tools in the virtual machine.
 
get_tools_state(self)
Determine whether Virtuozzo Tools is installed in the virtual machine.
 
subscribe_to_perf_stats(self, sFilter)
 
unsubscribe_from_perf_stats(self)
Cancels the Virtuozzo 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)
 
mount(self, sMntPath, nFlags)
 
umount(self, nFlags)
 
move(self, sNewHomePath, nFlags)
 
connect(self, nFlags)
 
disconnect(self)
 
capture_screen(self, nWidth, nHeight, nFlags)
 
commit_encryption(self, nFlags, hPolicyList, hReserved)
 
reinstall(self, sOsTemplate, nFlags)

Inherited from VmConfig: add_default_device, add_default_device_ex, apply_config_sample, create_boot_dev, create_share, create_vm_dev, get3dacceleration_mode, get_access_rights, get_action_on_guest_crash, get_action_on_stop_mode, get_action_on_window_close, get_all_devices, get_app_template_list, 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_capabilities_mask, get_config_validity, get_confirmations_list, get_cpu_accel_level, get_cpu_count, get_cpu_limit, get_cpu_mask, get_cpu_mode, get_cpu_units, get_ct_id, 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_external_boot_device, get_features_mask, 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_high_availability_priority, get_home_path, get_hostname, get_icon, get_io_limit, get_io_priority, get_iops_limit, get_last_modified_date, get_last_modifier_name, get_linked_vm_uuid, get_location, get_mem_guarantee_size, get_name, get_net_adapter, get_net_adapters_count, get_netfilter_mode, get_network_rate_list, get_node_mask, get_offline_services, get_optical_disk, get_optical_disks_count, get_optimize_modifiers_mode, get_options_on_guest_crash, get_os_template, get_os_type, get_os_version, get_parallel_port, get_parallel_ports_count, get_ram_size, get_resource, 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_uptime, get_uptime_start_date, get_usb_device, get_usb_devices_count, get_uuid, get_video_ram_size, get_vm_info, get_vm_type, get_vnchost_name, get_vncmode, get_vncpassword, get_vncport, get_vncweb_socket_port, get_window_mode, is_adaptive_hypervisor_enabled, is_allow_select_boot_device, is_auto_apply_ip_only, 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_disable_speaker, is_disk_cache_write_back, is_efi_enabled, is_guest_sharing_auto_mount, is_guest_sharing_enable_spotlight, is_guest_sharing_enabled, is_high_availability_enabled, is_high_resolution_enabled, is_host_sharing_enabled, is_isolated_vm_enabled, is_lock_guest_on_suspend_enabled, is_lock_in_full_screen_mode, is_longer_battery_life_enabled, is_map_shared_folders_on_letters, is_nested_virtualization_enabled, is_offline_management_enabled, is_os_res_in_full_scr_mode, is_pmuvirtualization_enabled, is_ram_hotplug_enabled, is_rate_bound, is_scr_res_enabled, is_share_all_host_disks, is_share_clipboard, is_share_user_home_dir, is_shared_profile_enabled, 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_start_in_detached_window_enabled, is_switch_off_windows_logo_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_movies, is_use_music, is_use_pictures, is_user_defined_shared_folders_enabled, is_vertical_synchronization_enabled, is_vncencryption_enabled, set3dacceleration_mode, set_action_on_guest_crash, set_action_on_stop_mode, set_action_on_window_close, set_adaptive_hypervisor_enabled, set_allow_select_boot_device, set_app_template_list, set_auto_apply_ip_only, 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_capabilities_mask, set_close_app_on_shutdown, set_confirmations_list, set_cpu_accel_level, set_cpu_count, set_cpu_hotplug_enabled, set_cpu_limit, set_cpu_mask, set_cpu_mode, set_cpu_units, set_custom_property, set_default_config, set_description, set_disable_apicsign, set_disable_speaker_sign, set_disk_cache_write_back, set_dns_servers, set_efi_enabled, set_external_boot_device, set_features_mask, set_foreground_priority, set_free_disk_space_ratio, set_guest_sharing_auto_mount, set_guest_sharing_enable_spotlight, set_guest_sharing_enabled, set_high_availability_enabled, set_high_availability_priority, set_high_resolution_enabled, set_host_sharing_enabled, set_hostname, set_icon, set_io_limit, set_io_priority, set_iops_limit, set_isolated_vm_enabled, set_lock_guest_on_suspend_enabled, set_lock_in_full_screen_mode, set_longer_battery_life_enabled, set_map_shared_folders_on_letters, set_mem_guarantee_size, set_name, set_nested_virtualization_enabled, set_netfilter_mode, set_network_rate_list, set_node_mask, set_offline_management_enabled, set_offline_services, set_optimize_modifiers_mode, set_options_on_guest_crash, set_os_res_in_full_scr_mode, set_os_template, set_os_version, set_pmuvirtualization_enabled, set_ram_hotplug_enabled, set_ram_size, set_rate_bound, set_resource, 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_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_start_in_detached_window_enabled, set_start_login_mode, set_start_user_creds, set_switch_off_windows_logo_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_undo_disks_mode, set_use_default_answers, set_use_desktop, set_use_documents, set_use_downloads, 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_vm_type, set_vnchost_name, set_vncmode, set_vncpassword, set_vncport, 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__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

reg_event_handler(self, callback_func, userData)

 
Overrides: _Handle.reg_event_handler

unreg_event_handler(self, callback_func, userData)

 

Unregister an event handler.

Overrides: _Handle.unreg_event_handler