The nova.virt.powervm.driver Module

class PowerVMDriver(virtapi)

Bases: nova.virt.driver.ComputeDriver

PowerVM Implementation of Compute Driver.

confirm_migration(migration, instance, network_info)

Confirms a resize, destroying the source VM.

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

Destroy (shutdown and delete) the specified instance.

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

Completes a resize, turning on the migrated instance

Parameters:
  • network_infoget_instance_nw_info()
  • image_meta – image object returned by nova.image.glance that defines the image from which this instance was created
finish_revert_migration(instance, network_info, block_device_info=None)

Finish reverting a resize, powering back on the instance.

get_available_resource(nodename)

Retrieve resource info.

get_host_ip_addr()

Retrieves the IP address of the hypervisor host.

get_host_stats(refresh=False)

Return currently known host stats.

get_info(instance)

Get the current status of an instance.

get_num_instances()
host_power_action(host, action)

Reboots, shuts down or powers up the host.

host_state
init_host(host)

Initialize anything that is necessary for the driver to function, including catching up with currently running VM’s on the given host.

instance_exists(instance_name)
legacy_nwinfo()

Indicate if the driver requires the legacy network_info format.

list_instances()
macs_for_instance(instance)
manage_image_cache(context, all_instances)

Manage the driver’s local image cache.

Some drivers chose to cache images for instances on disk. This method is an opportunity to do management of that cache which isn’t directly related to other calls into the driver. The prime example is to clean the cache and remove images which are no longer of interest.

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.

Returns:disk_info dictionary that is passed as the disk_info parameter to finish_migration on the destination nova-compute host
pause(instance)

Pause the specified instance.

plug_vifs(instance, network_info)
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 the specified instance.

Parameters:
  • instance – Instance object as returned by DB layer.
  • network_infoget_instance_nw_info()
  • reboot_type – Either a HARD or SOFT reboot
  • block_device_info – Info pertaining to attached volumes
  • bad_volumes_callback – Function to handle any bad volumes encountered
resume(instance, network_info, block_device_info=None)

resume the specified instance.

snapshot(context, instance, image_id, update_task_state)

Snapshots the specified instance.

Parameters:
  • context – security context
  • instance – Instance object as returned by DB layer.
  • image_id – Reference to a pre-created image that will hold the snapshot.
  • update_task_state – Function reference that allows for updates to the instance task state.
spawn(context, instance, image_meta, injected_files, admin_password, network_info=None, block_device_info=None)

Create a new instance/VM/domain on powerVM.

suspend(instance)

suspend the specified instance.

unpause(instance)

Unpause paused VM instance.

Previous topic

The nova.virt.powervm.constants Module

Next topic

The nova.virt.powervm.exception Module

This Page