LXC-based virtualization.
|
|
|
_EnsureDirectoryExistence(self)
Ensures all the directories needed for LXC use exist. |
source code
|
|
|
_SaveInstanceStash(self,
instance_name,
data)
Save data to the instance stash file in serialized format. |
source code
|
|
|
|
|
|
|
|
|
|
tuple of strings
|
|
(string, string, int, int, HvInstanceState, int)
|
|
|
_CreateConfigFile(self,
instance,
sda_dev_path)
Create an lxc.conf file for an instance. |
source code
|
|
|
_SpawnLXC(self,
instance,
log_file,
conf_file)
Execute lxc-start and wait until container health is confirmed. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
objects.MigrationStatus
|
|
Inherited from hv_base.BaseHypervisor :
AcceptInstance ,
FinalizeMigrationDst ,
FinalizeMigrationSource ,
HotAddDevice ,
HotDelDevice ,
HotModDevice ,
HotplugSupported ,
MigrationInfo ,
VerifyHotplugSupport
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
_InstanceDir(cls,
instance_name)
Return the root directory for an instance. |
source code
|
|
|
_InstanceConfFilePath(cls,
instance_name)
Return the configuration file for an instance. |
source code
|
|
|
|
|
_InstanceConsoleLogFilePath(cls,
instance_name)
Return the console log file path for an instance. |
source code
|
|
|
|
|
|
|
_GetCgroupMountPoint(cls)
Return the directory that should be the base of cgroup fs. |
source code
|
|
|
|
|
|
string
|
|
string
|
|
|
|
|
|
boolean
|
|
|
_GetCgroupCpuList(cls,
instance_name)
Return the list of CPU ids for an instance. |
source code
|
|
|
_GetCgroupCpuUsage(cls,
instance_name)
Return the CPU usage of an instance. |
source code
|
|
|
_GetCgroupMemoryLimit(cls,
instance_name)
Return the memory limit for an instance |
source code
|
|
|
_IsInstanceAlive(cls,
instance_name)
Return True if instance is alive. |
source code
|
|
|
|
|
_GetCgroupEnabledKernelSubsystems(cls)
Return cgroup subsystems list that are enabled in current kernel. |
source code
|
|
|
_EnsureCgroupMounts(cls,
hvparams=None)
Ensures all cgroup subsystems required to run LXC container are
mounted. |
source code
|
|
|
|
|
|
|
_VerifyDiskRequirements(cls,
block_devices)
Insures that the disks provided work with the current implementation. |
source code
|
|
|
GetInstanceConsole(cls,
instance,
primary_node,
node_group,
hvparams,
beparams)
Return a command for connecting to the console of an instance. |
source code
|
|
LXCVersion
|
|
list(str)
|
|
|
|
Inherited from hv_base.BaseHypervisor :
CheckParameterSyntax ,
GetAncillaryFiles ,
LinuxPowercycle ,
ValidateParameters
|
|
_ROOT_DIR = pathutils.RUN_DIR+ "/lxc"
|
|
_LOG_DIR = pathutils.LOG_DIR+ "/lxc"
|
|
_INSTANCE_DIR = _ROOT_DIR+ "/instance"
|
|
_CGROUP_ROOT_DIR = _ROOT_DIR+ "/cgroup"
|
|
_PROC_CGROUPS_FILE = "/proc/cgroups"
|
|
_PROC_SELF_CGROUP_FILE = "/proc/self/cgroup"
|
|
_LXC_MIN_VERSION_REQUIRED = LXCVersion("1.0.0")
|
|
_LXC_COMMANDS_REQUIRED = ["lxc-console", "lxc-ls", "lxc-start"...
|
|
_DIR_MODE = 0755
|
|
_STASH_KEY_ALLOCATED_LOOP_DEV = "allocated_loopdev"
|
|
_MEMORY_PARAMETER = "memory.limit_in_bytes"
|
|
_MEMORY_SWAP_PARAMETER = "memory.memsw.limit_in_bytes"
|
|
PARAMETERS = {constants.HV_CPU_MASK: hv_base.OPT_CPU_MASK_CHEC...
a dict of parameter name: check type; the check type is a five-tuple
containing:
|
|
_REBOOT_TIMEOUT = 120
|
|
_REQUIRED_CGROUP_SUBSYSTEMS = ["cpuset", "memory", "devices", ...
|
Inherited from hv_base.BaseHypervisor :
ANCILLARY_FILES ,
ANCILLARY_FILES_OPT ,
CAN_MIGRATE
|