The nova.virt.vmwareapi.driver Module

A connection to the VMware vCenter platform.

class VMwareAPISession(host_ip=None, host_port=443, username=None, password=None, retry_count=10, scheme='https', cacert=None, insecure=False)

Bases: oslo_vmware.api.VMwareAPISession

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

class VMwareVCDriver(virtapi, scheme='https')

Bases: nova.virt.driver.ComputeDriver

The VC host connection object.

LEGACY_NODENAME = <_sre.SRE_Pattern object at 0x7f56282dec00>
attach_interface(instance, image_meta, vif)

Attach an interface to the instance.

attach_volume(context, connection_info, instance, mountpoint, disk_bus=None, device_type=None, encryption=None)

Attach volume storage to VM instance.

capabilities = {'has_imagecache': True, 'supports_migrate_to_same_host': True, 'supports_recreate': False}
cleanup(context, instance, network_info, block_device_info=None, destroy_disks=True, migrate_data=None, destroy_vifs=True)

Cleanup after instance being destroyed by Hypervisor.

cleanup_host(host)
confirm_migration(migration, instance, network_info)

Confirms a resize, destroying the source VM.

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

Destroy VM instance.

detach_interface(instance, vif)

Detach an interface from the instance.

detach_volume(connection_info, instance, mountpoint, encryption=None)

Detach volume storage to VM instance.

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

Completes a resize, turning on the migrated instance.

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

Finish reverting a resize, powering back on the instance.

get_available_nodes(refresh=False)

Returns nodenames of all nodes managed by the compute service.

This driver supports only one compute node.

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_diagnostics(instance)

Return data about VM diagnostics.

get_host_ip_addr()

Returns the IP address of the vCenter host.

get_host_uptime()

Host uptime operation not supported by VC driver.

get_info(instance)

Return info about the VM instance.

get_instance_diagnostics(instance)

Return data about VM diagnostics.

get_instance_disk_info(instance, block_device_info=None)
get_mks_console(context, instance)
get_vnc_console(context, instance)

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

get_volume_connector(instance)

Return volume connector information.

host_maintenance_mode(host, mode)

Host operations not supported by VC driver.

This needs to override the ESX driver implementation.

host_power_action(action)

Host operations not supported by VC driver.

This needs to override the ESX driver implementation.

init_host(host)
inject_network_info(instance, nw_info)

inject network info for specified instance.

instance_exists(instance)

Efficient override of base instance_exists method.

list_instance_uuids()

List VM instance UUIDs.

list_instances()

List VM instances from the single compute node.

manage_image_cache(context, all_instances)

Manage the local cache of images.

migrate_disk_and_power_off(context, instance, dest, flavor, network_info, block_device_info=None, timeout=0, retry_interval=0)

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

need_legacy_block_device_info
pause(instance)

Pause VM instance.

poll_rebooting_instances(timeout, instances)

Poll for rebooting instances.

power_off(instance, timeout=0, retry_interval=0)

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(context, instance, network_info, block_device_info=None)

Resume the suspended VM instance.

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

resume guest state when a host is booted.

set_host_enabled(enabled)

Host operations not supported by VC driver.

This needs to override the ESX driver implementation.

snapshot(context, instance, image_id, 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(context, instance)

Suspend the specified instance.

unpause(instance)

Unpause paused VM instance.

unrescue(instance, network_info)

Unrescue the specified instance.

Previous topic

The nova.virt.vmwareapi.constants Module

Next topic

The nova.virt.vmwareapi.ds_util Module

Project Source

This Page