Package ganeti :: Package cmdlib :: Module instance_helpervm
[hide private]
[frames] | no frames]

Module instance_helpervm

source code

Functions for running helper virtual machines to perform tasks on instances.

Functions [hide private]
 
HelperVM(lu, instance, vm_image, startup_timeout, vm_timeout, log_prefix=None, feedback_fn=None)
Runs a given helper VM for a given instance.
source code
 
RunWithHelperVM(lu, instance, vm_image, startup_timeout, vm_timeout, log_prefix=None, feedback_fn=None)
Runs a given helper VM for a given instance.
source code

Imports: contextlib, constants, errors, retry, IsInstanceRunning, DetermineImageSize, StartInstanceDisks, TemporaryDisk, ImageDisks


Function Details [hide private]

HelperVM(lu, instance, vm_image, startup_timeout, vm_timeout, log_prefix=None, feedback_fn=None)

source code 

Runs a given helper VM for a given instance.

Parameters:
  • lu (LogicalUnit) - the lu on whose behalf we execute
  • instance (objects.Instance) - the instance definition
  • vm_image (string) - the name of the helper VM image to dump on a temporary disk
  • startup_timeout (int) - how long to wait for the helper VM to start up
  • vm_timeout (int) - how long to wait for the helper VM to finish its work
  • log_prefix (string) - a prefix for all log messages
  • feedback_fn (function) - Function used to log progress
Decorators:
  • @contextlib.contextmanager

RunWithHelperVM(lu, instance, vm_image, startup_timeout, vm_timeout, log_prefix=None, feedback_fn=None)

source code 

Runs a given helper VM for a given instance.

Parameters:
  • lu (LogicalUnit) - the lu on whose behalf we execute
  • instance (objects.Instance) - the instance definition
  • vm_image (string) - the name of the helper VM image to dump on a temporary disk
  • startup_timeout (int) - how long to wait for the helper VM to start up
  • vm_timeout (int) - how long to wait for the helper VM to finish its work
  • log_prefix (string) - a prefix for all log messages
  • feedback_fn (function) - Function used to log progress