Handles all processes relating to instances (guest vms).
The ComputeManager class is a nova.manager.Manager that handles RPC calls relating to creating instances. It is responsible for building a disk image, launching it via the underlying virtualization driver, responding to calls to check its state, attaching persistent storage, and terminating it.
Bases: nova.manager.SchedulerDependentManager
Manages the running instances from creation to destruction.
Notify hypervisor of change (for hypervisor pools).
Calls network_api to add new fixed_ip to instance then injects the new network info and resets instance networking.
Use hotplug to add an network adapter to an instance.
Attach a volume to an instance.
Update the metadata published to the instance.
Check if it is possible to execute live migration.
This runs checks on the destination host, and then calls back to the source host to check the results.
Parameters: |
|
---|
Returns a mapping of values required in case of block migration and None otherwise.
Check if it is possible to execute live migration.
This checks if the live migration can succeed, based on the results from check_can_live_migrate_destination.
Parameters: |
|
---|
Returns a dict values required for live migration without shared storage.
Destroys the source instance.
Detach an network adapter from an instance.
Detach a volume from an instance.
Completes the migration process.
Sets up the newly transferred disk and turns on the instance at its new host machine.
Finishes the second half of reverting a resize.
Power back on the source instance and revert the resized attributes in the database.
Return backdoor port for eventlet_backdoor.
Send the console output for the given instance.
Retrieves the console host for a project on this host.
Currently this is just set in the flags for each compute host.
Retrieve diagnostics for an instance on this host.
Returns the result of calling “uptime” on the target host.
Start/Stop host maintenance window. On start, it triggers guest VMs evacuation.
Reboots, shuts down or powers up the host.
Initialization for a standalone compute service.
Write a file to the specified path in an instance on this host.
Inject network info, but don’t return the info.
Executing live migration.
Parameters: |
|
---|
Pause an instance on this host.
Post operations for live migration .
Parameters: |
|
---|
Power off an instance on this host.
Power on an instance on this host.
Preparations for live migration at dest host.
Parameters: |
|
---|
:param migrate_data : if not None, it is a dict which holds data required for live migration without shared storage.
After the service is initialized, but before we fully bring the service up by listening on RPC queues, make sure to update our available resources.
Initiates the process of moving a running instance to another host.
Possibly changes the RAM and disk size in the process.
Reboot an instance on this host.
Destroy and re-make this instance.
A ‘rebuild’ effectively purges all existing data from the system and remakes the VM with given ‘metadata’ and ‘personalities’.
Parameters: |
|
---|
Tell the virtualization driver to refresh security rules for an instance.
Passes straight through to the virtualization driver.
Synchronise the call beacuse we may still be in the middle of creating the instance.
This call passes straight through to the virtualization driver.
Tell the virtualization driver to refresh security group members.
Passes straight through to the virtualization driver.
Tell the virtualization driver to refresh security group rules.
Passes straight through to the virtualization driver.
Removes a host from a physical hypervisor pool.
Calls network_api to remove existing fixed_ip from instance by injecting the altered network info and resetting instance networking.
Remove a volume connection using the volume api.
Rescue an instance on this host. :param rescue_password: password to set on rescue instance
Reset networking on the given instance.
Starts the migration of a running instance to another host.
Restore a soft-deleted instance on this host.
Resume the given suspended instance.
Destroys the new instance on the destination machine.
Reverts the model changes, and powers on the old instance on the source machine.
Cleaning up image directory that is created pre_live_migration.
Parameters: |
|
---|
Set the root/admin password for an instance on this host.
This is generally only called by API password resets after an image has been built.
Sets the specified host’s ability to accept new instances.
Snapshot an instance on this host.
Parameters: |
|
---|
Soft delete an instance on this host.
Starting an instance on this host.
Stopping an instance on this host.
Suspend the given instance.
Terminate an instance on this host.
Unpause a paused instance on this host.
Rescue an instance on this host.
See driver.get_available_resource()
Periodic process that keeps that the compute host’s understanding of resource availability and usage in sync with the underlying hypervisor.
Parameters: | context – security context |
---|
Bases: nova.virt.virtapi.VirtAPI
Decorator to revert task_state on failure.
Wraps a method to log the event taken on the instance, and result.
This decorator wraps a method to log the start and result of an event, as part of an action taken on an instance.
Wraps a method to catch exceptions related to instances.
This decorator wraps a method to catch any exceptions having to do with an instance that may get thrown. It then logs an instance fault in the db.