Driver base-classes:
(Beginning of) the contract that compute drivers must follow, and shared types that support that contract
Bases: object
Base class for compute drivers.
Lots of documentation is currently on fake.py.
Destroy (shutdown and delete) the specified instance.
The given parameter is an instance of nova.compute.service.Instance, and so the instance is being specified as instance.name.
The work will be done asynchronously. This function returns a task that allows the caller to detect when it is complete.
If the instance is not found (for example if networking failed), this function should still succeed. It’s probably a good idea to log a warning in that case.
Setting up filtering rules and waiting for its completion.
To migrate an instance, filtering rules to hypervisors and firewalls are inevitable on destination host. ( Waiting only for filtering rules to hypervisor, since filtering rules to firewall rules can be set faster).
Concretely, the below method must be called. - setup_basic_filtering (for nova-basic, etc.) - prepare_instance_filter(for nova-instance-instance-xxx, etc.)
to_xml may have to be called since it defines PROJNET, PROJMASK. but libvirt migrates those value through migrateToURI(), so , no need to be called.
Don’t use thread for this method since migration should not be started when setting-up filtering rules operations are not completed.
Params instance_ref: | |
---|---|
nova.db.sqlalchemy.models.Instance object |
Completes a resize, turning on the migrated instance
Return data about VM diagnostics
Get the current status of an instance, by name (not ID!)
Returns a dict containing: :state: the running state, one of the power_state codes :max_mem: (int) the maximum memory in KBytes allowed :mem: (int) the memory in KBytes used by the domain :num_cpu: (int) the number of virtual CPUs for the domain :cpu_time: (int) the CPU time used in nanoseconds
Adopt existing VM’s running here
Create a file on the VM instance. The file path and contents should be base64-encoded.
inject network info for specified instance
Return a list of InstanceInfo for all registered VMs
Spawning live_migration operation for distributing high-load.
Params ctxt: | security context |
---|---|
Params instance_ref: | |
nova.db.sqlalchemy.models.Instance object instance object that is migrated. | |
Params dest: | destination host |
Params post_method: | |
post operation method. expected nova.compute.manager.post_live_migration. | |
Params recover_method: | |
recovery method when any exception occurs. expected nova.compute.manager.recover_live_migration. |
Transfers the VHD of a running instance to another host, then shuts off the instance copies over the COW disk
Pause VM instance
Poll for rescued instances
Reboot specified VM
Rescue the specified instance
reset networking for specified instance
resume the specified instance
Reverts a resize, powering back on the instance
Set the root/admin password for an instance on this server.
Create snapshot from a running VM instance.
Launch a VM for the specified instance
suspend the specified instance
Stop filtering instance
Unpause paused VM instance
Unrescue the specified instance
Updates compute manager resource info on ComputeNode table.
This method is called when nova-compute launches, and whenever admin executes “nova-manage service update_resource”.
Parameters: |
|
---|
Bases: object