|
|
dictionary of int:int
|
|
|
|
|
|
tuple of strings
|
|
(string, string, int, int, HvInstanceState, int)
|
|
list
|
|
|
|
|
_WriteKVMRuntime(self,
instance_name,
data)
Write an instance's KVM runtime |
source code
|
|
|
_ReadKVMRuntime(self,
instance_name)
Read an instance's KVM runtime |
source code
|
|
|
_SaveKVMRuntime(self,
instance,
kvm_runtime)
Save an instance's KVM runtime |
source code
|
|
|
_LoadKVMRuntime(self,
instance,
serialized_runtime=None)
Load an instance's KVM runtime |
source code
|
|
|
|
(dict, str, str) tuple
|
|
|
_ExecuteKVMRuntime(self,
instance,
kvm_runtime,
kvmhelp,
incoming=None)
Execute a KVM cmd, after completing it with some last minute data. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|
|
|
|
|
|
|
objects.MigrationStatus
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
|
_InstancePidFile(cls,
instance_name)
Returns the instance pidfile. |
source code
|
|
|
_InstanceUidFile(cls,
instance_name)
Returns the instance uidfile. |
source code
|
|
tuple
|
|
tuple
|
|
|
_CheckDown(cls,
instance_name)
Raises an error unless the given instance is down. |
source code
|
|
|
_InstanceMonitor(cls,
instance_name)
Returns the instance monitor socket name |
source code
|
|
|
_InstanceSerial(cls,
instance_name)
Returns the instance serial socket name |
source code
|
|
|
_InstanceQmpMonitor(cls,
instance_name)
Returns the instance serial QMP socket name |
source code
|
|
|
_InstanceKvmdMonitor(cls,
instance_name)
Returns the instance kvm daemon socket name |
source code
|
|
|
_InstanceShutdownMonitor(cls,
instance_name)
Returns the instance QMP output filename |
source code
|
|
|
_InstanceKVMRuntime(cls,
instance_name)
Returns the instance KVM runtime filename |
source code
|
|
|
_InstanceChrootDir(cls,
instance_name)
Returns the name of the KVM chroot dir of the instance |
source code
|
|
|
_InstanceNICDir(cls,
instance_name)
Returns the name of the directory holding the tap device files for a
given instance. |
source code
|
|
|
_InstanceNICFile(cls,
instance_name,
seq)
Returns the name of the file containing the tap device for a given
NIC |
source code
|
|
|
_InstanceKeymapFile(cls,
instance_name)
Returns the name of the file containing the keymap for a given
instance |
source code
|
|
|
_TryReadUidFile(cls,
uid_file)
Try to read a uid file |
source code
|
|
|
_RemoveInstanceRuntimeFiles(cls,
pidfile,
instance_name)
Removes an instance's rutime sockets/files/dirs. |
source code
|
|
|
|
|
|
|
|
|
|
|
_CallMonitorCommand(cls,
instance_name,
command,
timeout=None)
Invoke a command on the instance monitor. |
source code
|
|
|
|
|
|
|
|
|
|
|
_StopInstance(cls,
instance,
force=False,
name=None,
timeout=None)
Stop an instance. |
source code
|
|
|
GetInstanceConsole(cls,
instance,
primary_node,
node_group,
hvparams,
beparams)
Return a command for connecting to the console of an instance. |
source code
|
|
|
|
|
|
|
|
Inherited from hv_base.BaseHypervisor :
GetAncillaryFiles ,
LinuxPowercycle
|
boolean
|
CAN_MIGRATE = True
whether this hypervisor can do migration (either live or non-live)
|
|
_ROOT_DIR = pathutils.RUN_DIR+ "/kvm-hypervisor"
|
|
_PIDS_DIR = _ROOT_DIR+ "/pid"
|
|
_UIDS_DIR = _ROOT_DIR+ "/uid"
|
|
_CTRL_DIR = _ROOT_DIR+ "/ctrl"
|
|
_CONF_DIR = _ROOT_DIR+ "/conf"
|
|
_NICS_DIR = _ROOT_DIR+ "/nic"
|
|
_KEYMAP_DIR = _ROOT_DIR+ "/keymap"
|
|
_CHROOT_DIR = _ROOT_DIR+ "/chroot"
|
|
_CHROOT_QUARANTINE_DIR = _ROOT_DIR+ "/chroot-quarantine"
|
|
_DIRS = [_ROOT_DIR, _PIDS_DIR, _UIDS_DIR, _CTRL_DIR, _CONF_DIR...
|
|
PARAMETERS = {constants.HV_KVM_PATH: hv_base.REQ_FILE_CHECK, c...
a dict of parameter name: check type; the check type is a five-tuple
containing:
|
|
_VIRTIO = "virtio"
|
|
_VIRTIO_NET_PCI = "virtio-net-pci"
|
|
_VIRTIO_BLK_PCI = "virtio-blk-pci"
|
|
_MIGRATION_STATUS_RE = re.compile(r"Migration\s+status:\s+(\w+...
|
|
_MIGRATION_PROGRESS_RE = re.compile(r"\s*transferred\s+ram:\s+...
|
|
_MIGRATION_INFO_MAX_BAD_ANSWERS = 5
|
|
_MIGRATION_INFO_RETRY_DELAY = 2
|
|
_VERSION_RE = re.compile(r"\b(\d+)\.(\d+)(\.(\d+))?\b")
|
|
_CPU_INFO_RE = re.compile(r"cpu\s+\#(\d+).*thread_id\s*=\s*(\d...
|
|
_CPU_INFO_CMD = "info cpus"
|
|
_CONT_CMD = "cont"
|
|
_DEFAULT_MACHINE_VERSION_RE = re.compile(r"^(\S+).*\(default\)...
|
|
_CHECK_MACHINE_VERSION_RE = staticmethod(lambda x: re.compile(...
|
|
_QMP_RE = re.compile(r"^-qmp\s", re.M)
|
|
_SPICE_RE = re.compile(r"^-spice\s", re.M)
|
|
_VHOST_RE = re.compile(r"^-net\s.*,vhost=on|off", re.M)
|
|
_VIRTIO_NET_QUEUES_RE = re.compile(r"^-net\s.*,fds=x:y:...:z",...
|
|
_ENABLE_KVM_RE = re.compile(r"^-enable-kvm\s", re.M)
|
|
_DISABLE_KVM_RE = re.compile(r"^-disable-kvm\s", re.M)
|
|
_NETDEV_RE = re.compile(r"^-netdev\s", re.M)
|
|
_DISPLAY_RE = re.compile(r"^-display\s", re.M)
|
|
_MACHINE_RE = re.compile(r"^-machine\s", re.M)
|
|
_VIRTIO_NET_RE = re.compile(r"^name \"%s\"" % _VIRTIO_NET_PCI,...
|
|
_VIRTIO_BLK_RE = re.compile(r"^name \"%s\"" % _VIRTIO_BLK_PCI,...
|
|
_BOOT_RE = re.compile(r"^-drive\s([^-]|(?<!^)-)*,boot=on\|off"...
|
|
_UUID_RE = re.compile(r"^-uuid\s", re.M)
|
|
_INFO_VERSION_RE = re.compile(r'^QEMU (\d+)\.(\d+)(\.(\d+))?.*...
|
|
_INFO_VERSION_CMD = "info version"
|
|
_DEFAULT_PCI_RESERVATIONS = "11100000000000000000000000000000"
|
|
_SOUNDHW_WITH_PCI_SLOT = ["ac97", "es1370", "hda"]
|
|
ANCILLARY_FILES = [_KVM_NETWORK_SCRIPT,]
|
|
ANCILLARY_FILES_OPT = [_KVM_NETWORK_SCRIPT,]
|
|
_KVMOPT_HELP = "help"
|
|
_KVMOPT_MLIST = "mlist"
|
|
_KVMOPT_DEVICELIST = "devicelist"
|
|
_KVMOPTS_CMDS = {_KVMOPT_HELP:(["--help"], False), _KVMOPT_MLI...
|