The nova.virt.vmwareapi.driver Module

A connection to the VMware ESX platform.

Related Flags

vmwareapi_host_ip:
 IP address or Name of VMware ESX/VC server.
vmwareapi_host_username:
 Username for connection to VMware ESX/VC Server.
vmwareapi_host_password:
 Password for connection to VMware ESX/VC Server.
vmwareapi_cluster_name:
 Name of a VMware Cluster ComputeResource.
vmwareapi_task_poll_interval:
 The interval (seconds) used for polling of remote tasks (default: 5.0).
vmwareapi_api_retry_count:
 The API retry count in case of failure such as network failures (socket errors etc.) (default: 10).
vnc_port:VNC starting port (default: 5900)
vnc_port_total:Total number of VNC ports (default: 10000)
vnc_password:VNC password
use_linked_clone:
 Whether to use linked clone (default: True)
exception Failure(details)

Bases: exceptions.Exception

Base Exception class for handling task failures.

class VMwareAPISession(host_ip, host_username, host_password, api_retry_count, scheme='https')

Bases: object

Sets up a session with the ESX host and handles all the calls made to the host.

class VMwareESXDriver(virtapi, read_only=False, scheme='https')

Bases: nova.virt.driver.ComputeDriver

The ESX host connection object.

attach_volume(connection_info, instance, mountpoint)

Attach volume storage to VM instance.

destroy(instance, network_info, block_device_info=None, destroy_disks=True)

Destroy VM instance.

detach_volume(connection_info, instance, mountpoint)

Detach volume storage to VM instance.

get_available_resource(nodename)

Retrieve resource info.

This method is called when nova-compute launches, and as part of a periodic task.

Returns:dictionary describing resources
get_console_output(instance)

Return snapshot of console.

get_console_pool_info(console_type)

Get info about the host on which the VM resides.

get_diagnostics(instance)

Return data about VM diagnostics.

get_host_ip_addr()

Retrieves the IP address of the ESX host.

get_host_stats(refresh=False)

Return the current state of the host. If ‘refresh’ is True, run the update first.

get_info(instance)

Return info about the VM instance.

get_vnc_console(instance)

Return link to instance’s VNC console.

get_volume_connector(instance)

Return volume connector information.

host_maintenance_mode(host, mode)

Start/Stop host maintenance window. On start, it triggers guest VMs evacuation.

host_power_action(host, action)

Reboots, shuts down or powers up the host.

host_state
init_host(host)

Do the initialization that needs to be done.

inject_network_info(instance, network_info)

inject network info for specified instance.

legacy_nwinfo()
list_instances()

List VM instances.

pause(instance)

Pause VM instance.

plug_vifs(instance, network_info)

Plug VIFs into networks.

poll_rebooting_instances(timeout, instances)

Poll for rebooting instances.

power_off(instance)

Power off the specified instance.

power_on(context, instance, network_info, block_device_info=None)

Power on the specified instance.

reboot(context, instance, network_info, reboot_type, block_device_info=None, bad_volumes_callback=None)

Reboot VM instance.

rescue(context, instance, network_info, image_meta, rescue_password)

Rescue the specified instance.

resume(instance, network_info, block_device_info=None)

Resume the suspended VM instance.

set_host_enabled(host, enabled)

Sets the specified host’s ability to accept new instances.

snapshot(context, instance, name, update_task_state)

Create snapshot from a running VM instance.

spawn(context, instance, image_meta, injected_files, admin_password, network_info=None, block_device_info=None)

Create VM instance.

suspend(instance)

Suspend the specified instance.

unpause(instance)

Unpause paused VM instance.

unplug_vifs(instance, network_info)

Unplug VIFs from networks.

unrescue(instance, network_info)

Unrescue the specified instance.

update_host_status()

Update the status info of the host, and return those values to the calling program.

class VMwareVCDriver(virtapi, read_only=False, scheme='https')

Bases: nova.virt.vmwareapi.driver.VMwareESXDriver

The ESX host connection object.

confirm_migration(migration, instance, network_info)

Confirms a resize, destroying the source VM.

finish_migration(context, migration, instance, disk_info, network_info, image_meta, resize_instance=False, block_device_info=None)

Completes a resize, turning on the migrated instance.

finish_revert_migration(instance, network_info, block_device_info=None)

Finish reverting a resize, powering back on the instance.

get_vnc_console(instance)

Return link to instance’s VNC console using vCenter logic.

host_state
live_migration(context, instance_ref, dest, post_method, recover_method, block_migration=False, migrate_data=None)

Live migration of an instance to another host.

migrate_disk_and_power_off(context, instance, dest, instance_type, network_info, block_device_info=None)

Transfers the disk of a running instance in multiple phases, turning off the instance before the end.

Previous topic

The nova.virt.virtapi Module

Next topic

The nova.virt.vmwareapi.error_util Module

This Page