class documentation

KVM hypervisor interface

Class Method CheckParameterSyntax Check the given parameters for validity.
Class Method GetInstanceConsole Return a command for connecting to the console of an instance.
Class Method PowercycleNode KVM powercycle, just a wrapper over Linux powercycle.
Class Method ValidateParameters Check the given parameters for validity.
Static Method VersionsSafeForMigration Predict if migration is safe between those versions
Method __init__ Undocumented
Method AcceptInstance Prepare to accept an instance.
Method BalloonInstanceMemory Balloon an instance memory to a certain value.
Method CleanupInstance Cleanup after a stopped instance
Method FinalizeMigrationDst Finalize the instance migration on the target node.
Method FinalizeMigrationSource Finalize the instance migration on the source node.
Method GetAllInstancesInfo Get properties of all instances.
Method GetInstanceInfo Get instance properties.
Method GetMigrationStatus Get the migration status
Method GetNodeInfo Return information about the node.
Method HotAddDevice Helper method to hot-add a new device
Method HotDelDevice Helper method for hot-del device
Method HotModDevice Helper method for hot-mod device
Method HotplugSupported Checks if hotplug is generally supported.
Method ListInstances Get the list of running instances.
Method MigrateInstance Migrate an instance to a target node.
Method MigrationInfo Get instance information to perform a migration.
Method RebootInstance Reboot an instance.
Method StartInstance Start an instance.
Method StopInstance Stop an instance.
Method Verify Verify the hypervisor.
Method VerifyHotplugSupport Verifies that hotplug is supported.
Constant ANCILLARY_FILES Undocumented
Constant ANCILLARY_FILES_OPT Undocumented
Constant CAN_MIGRATE Undocumented
Constant PARAMETERS Undocumented
Instance Variable qmp Undocumented
Class Method _AssignCpuAffinity Change CPU affinity for running VM according to given CPU mask.
Class Method _CallMonitorCommand Invoke a command on the instance monitor.
Class Method _CheckDown Raises an error unless the given instance is down.
Class Method _ClearUserShutdown Undocumented
Class Method _GetDefaultMachineVersion Return the default hardware revision (e.g. pc-1.1)
Class Method _GetKVMOutput Return the output of a kvm invocation
Class Method _GetKVMVersion Return the installed KVM version.
Class Method _InstanceChrootDir Returns the name of the KVM chroot dir of the instance
Class Method _InstanceKvmdMonitor Returns the instance kvm daemon socket name
Class Method _InstanceKVMRuntime Returns the instance KVM runtime filename
Class Method _InstanceMonitor Returns the instance monitor socket name
Class Method _InstanceNICDir Returns the name of the directory holding the tap device files for a given instance.
Class Method _InstanceNICFile Returns the name of the file containing the tap device for a given NIC
Class Method _InstancePidAlive Returns the instance pidfile, pid, and liveness.
Class Method _InstancePidFile Returns the instance pidfile.
Class Method _InstancePidInfo Check pid file for instance information.
Class Method _InstanceQemuGuestAgentMonitor Returns the instance serial QEMU Guest Agent socket name
Class Method _InstanceQmpMonitor Returns the instance serial QMP socket name
Class Method _InstanceSerial Returns the instance serial socket name
Class Method _InstanceShutdownMonitor Returns the instance QMP output filename
Class Method _InstanceUidFile Returns the instance uidfile.
Class Method _IsUserShutdown Undocumented
Class Method _ParseKVMVersion Parse the KVM version from the --help output.
Class Method _RemoveInstanceRuntimeFiles Removes an instance's rutime sockets/files/dirs.
Class Method _SetProcessAffinity Sets the affinity of a process to the given CPUs.
Class Method _TryReadUidFile Try to read a uid file
Static Method _CdromOption Extends kvm_cmd with the '-drive' option for a cdrom, and optionally the '-boot' option.
Static Method _ConfigureNIC Run the network configuration script for a specified NIC
Static Method _GenerateDiskAioCacheParameters Generate appropriate aio/cache parameters for QEMU
Static Method _GenerateKvmTapName Generate a TAP network interface name for a NIC.
Static Method _SocatUnixConsoleParams Returns the correct parameters for socat
Static Method _StartKvmd Ensure that the Kvm daemon is running.
Method _ClearInstanceMigrationCapabilities Clear all migration capabilities configured for an instance
Method _ConfigureRoutedNICs Configures all NICs in routed mode
Method _ExecuteCpuAffinity Complete CPU pinning.
Method _ExecuteKVMRuntime Execute a KVM cmd, after completing it with some last minute data.
Method _GenerateKVMBlockDevicesOptions Generate KVM options regarding instance's block devices.
Method _GenerateKVMRuntime Generate KVM information to start an instance.
Method _GetBusSlots Helper function to get the slots of PCI and SCSI QEMU buses.
Method _GetNetworkDeviceFeatures Get network device options to properly enable supported features.
Method _GetVcpuThreadIds Get a mapping of vCPU no. to thread IDs for the instance
Method _LoadKVMRuntime Load an instance's KVM runtime
Method _ReadKVMRuntime Read an instance's KVM runtime
Method _RunKVMCmd Run the KVM cmd and check for errors
Method _SaveKVMRuntime Save an instance's KVM runtime
Method _SetInstanceMigrationCapabilities Set all migration capabilities configured for an instance
Method _StopInstance Stop an instance.
Method _VerifyHotplugCommand Checks if a previous hotplug command has succeeded.
Method _WriteKVMRuntime Write an instance's KVM runtime
Constant _AUTO_RO_RE Undocumented
Constant _BOOT_RE Undocumented
Constant _CHROOT_DIR Undocumented
Constant _CHROOT_QUARANTINE_DIR Undocumented
Constant _CONF_DIR Undocumented
Constant _CTRL_DIR Undocumented
Constant _DEFAULT_MACHINE_VERSION_RE Undocumented
Constant _DEFAULT_PCI_RESERVATIONS Undocumented
Constant _DEFAULT_SCSI_RESERVATIONS Undocumented
Constant _DEVICE_DRIVER_SUPPORTED Undocumented
Constant _DIRS Undocumented
Constant _DISABLE_KVM_RE Undocumented
Constant _DISPLAY_RE Undocumented
Constant _ENABLE_KVM_RE Undocumented
Constant _KVMOPT_DEVICELIST Undocumented
Constant _KVMOPT_HELP Undocumented
Constant _KVMOPT_MLIST Undocumented
Constant _KVMOPTS_CMDS Undocumented
Constant _MACHINE_RE Undocumented
Constant _MIGRATION_INFO_MAX_BAD_ANSWERS Undocumented
Constant _MIGRATION_INFO_RETRY_DELAY Undocumented
Constant _NETDEV_RE Undocumented
Constant _NICS_DIR Undocumented
Constant _PIDS_DIR Undocumented
Constant _QMP_RE Undocumented
Constant _ROOT_DIR Undocumented
Constant _UIDS_DIR Undocumented
Constant _UUID_RE Undocumented
Constant _VERSION_RE Undocumented
Constant _VHOST_RE Undocumented
Constant _VIRTIO Undocumented
Constant _VIRTIO_BLK_PCI Undocumented
Constant _VIRTIO_NET_PCI Undocumented
Constant _VIRTIO_NET_QUEUES_RE Undocumented

Inherited from BaseHypervisor:

Class Method GetAncillaryFiles Return a list of ancillary files to be copied to all nodes as ancillary configuration files.
Class Method LinuxPowercycle Linux-specific powercycle method.
Static Method GetLinuxNodeInfo For linux systems, return actual OS information.
Method RestoreInstance Fixup running instance's (config) state.
Method VerifyInstance Verify if running instance (config) is in correct state.
Class Method _IsParamValueUnspecified Check if the parameter value is a kind of value meaning unspecified.
Static Method _FormatVerifyResults Formats the verification results, given a list of errors.
Method _InstanceStartupMemory Get the correct startup memory for an instance
@classmethod
def CheckParameterSyntax(cls, hvparams):

Check the given parameters for validity.

Parameters
hvparams:dict of stringshypervisor parameters
Raises
errors.HypervisorErrorwhen a parameter is not valid
@classmethod
def GetInstanceConsole(cls, instance, primary_node, node_group, hvparams, beparams):

Return a command for connecting to the console of an instance.

@classmethod
def PowercycleNode(cls, hvparams=None):

KVM powercycle, just a wrapper over Linux powercycle.

Parameters
hvparams:dict of stringshypervisor parameters to be used on this node
@classmethod
def ValidateParameters(cls, hvparams):

Check the given parameters for validity.

Parameters
hvparams:dict of stringshypervisor parameters
Raises
errors.HypervisorErrorwhen a parameter is not valid
@staticmethod
def VersionsSafeForMigration(src, target):

Predict if migration is safe between those versions

def __init__(self):

Undocumented

def AcceptInstance(self, instance, info, target):

Prepare to accept an instance.

Parameters
instance:objects.Instanceinstance to be accepted
info:stringcontent of the KVM runtime file on the source node
target:stringtarget host (usually ip), on this node
@_with_qmp
def BalloonInstanceMemory(self, instance, mem):

Balloon an instance memory to a certain value.

Parameters
instance:objects.Instanceinstance to be accepted
mem:intactual memory size to use for instance runtime
def CleanupInstance(self, instance_name):

Cleanup after a stopped instance

def FinalizeMigrationDst(self, instance, info, success):

Finalize the instance migration on the target node.

Stop the incoming mode KVM.

Parameters
instance:objects.Instanceinstance whose migration is being finalized
infoUndocumented
successUndocumented
@_with_qmp
def FinalizeMigrationSource(self, instance, success, _):

Finalize the instance migration on the source node.

Parameters
instance:objects.Instancethe instance that was migrated
success:boolwhether the migration succeeded or not
_Undocumented
def GetAllInstancesInfo(self, hvparams=None):

Get properties of all instances.

Parameters
hvparams:dict of stringshypervisor parameters
Returns
list of tuples (name, id, memory, vcpus, stat, times)
def GetInstanceInfo(self, instance_name, hvparams=None):

Get instance properties.

Parameters
instance_name:stringthe instance name
hvparams:dict of stringshypervisor parameters to be used with this instance
Returns
tuple of strings(name, id, memory, vcpus, stat, times)
@_with_qmp
def GetMigrationStatus(self, instance):

Get the migration status

Parameters
instance:objects.Instancethe instance that is being migrated
Returns
objects.MigrationStatusthe status of the current migration (one of constants.HV_MIGRATION_VALID_STATUSES), plus any additional progress info that can be retrieved from the hypervisor
def GetNodeInfo(self, hvparams=None):

Return information about the node.

Parameters
hvparams:dict of stringshypervisor parameters, not used in this class
Returns

a dict as returned by BaseHypervisor.GetLinuxNodeInfo plus the following keys:

  • hv_version: the hypervisor version in the form (major, minor, revision)
@_with_qmp
def HotAddDevice(self, instance, dev_type, device, extra, seq):

Helper method to hot-add a new device

It generates the device ID and hvinfo, and invokes the device-specific method.

@_with_qmp
def HotDelDevice(self, instance, dev_type, device, _, seq):

Helper method for hot-del device

It gets device info from runtime file, generates the device name and invokes the device-specific method.

def HotModDevice(self, instance, dev_type, device, _, seq):

Helper method for hot-mod device

It gets device info from runtime file, generates the device name and invokes the device-specific method. Currently only NICs support hot-mod

@_with_qmp
def HotplugSupported(self, instance):

Checks if hotplug is generally supported.

Hotplug is *not* supported in case of:

  • qemu versions < 1.7 (where all qmp related commands are supported)
  • for stopped instances
Raises
errors.HypervisorErrorin one of the previous cases
def ListInstances(self, hvparams=None):

Get the list of running instances.

We can do this by listing our live instances directory and checking whether the associated kvm process is still alive.

@_with_qmp
def MigrateInstance(self, cluster_name, instance, target, live_migration):

Migrate an instance to a target node.

The migration will not be attempted if the instance is not currently running.

Parameters
cluster_name:stringname of the cluster
instance:objects.Instancethe instance to be migrated
target:stringip address of the target node
live_migration:booleanperform a live migration
def MigrationInfo(self, instance):

Get instance information to perform a migration.

Parameters
instance:objects.Instanceinstance to be migrated
Returns
stringcontent of the KVM runtime file
def RebootInstance(self, instance):
def StartInstance(self, instance, block_devices, startup_paused):
def StopInstance(self, instance, force=False, retry=False, name=None, timeout=None):
def Verify(self, hvparams=None):

Verify the hypervisor.

Check that the required binaries exist.

Parameters
hvparams:dict of stringshypervisor parameters to be verified against, not used here
Returns
Problem description if something is wrong, None otherwise
@_with_qmp
def VerifyHotplugSupport(self, instance, action, dev_type):

Verifies that hotplug is supported.

Hotplug is not supported if:

  • the instance is not running
  • the device type is not hotplug-able
  • the QMP version does not support the corresponding commands
Raises
errors.HypervisorErrorif one of the above applies
CAN_MIGRATE: bool =

Undocumented

Value
True
qmp =

Undocumented

@classmethod
def _AssignCpuAffinity(cls, cpu_mask, process_id, thread_dict):

Change CPU affinity for running VM according to given CPU mask.

Parameters
cpu_mask:stringCPU mask as given by the user. e.g. "0-2,4:all:1,3"
process_id:intprocess ID of KVM process. Used to pin entire VM to physical CPUs.
thread_dict:dict int:intmap of virtual CPUs to KVM thread IDs
@classmethod
def _CallMonitorCommand(cls, instance_name, command, timeout=None):

Invoke a command on the instance monitor.

@classmethod
def _CheckDown(cls, instance_name):

Raises an error unless the given instance is down.

@classmethod
def _ClearUserShutdown(cls, instance_name):

Undocumented

@classmethod
def _GetDefaultMachineVersion(cls, kvm_path):

Return the default hardware revision (e.g. pc-1.1)

@classmethod
def _GetKVMOutput(cls, kvm_path, option):

Return the output of a kvm invocation

Parameters
kvm_path:stringpath to the kvm executable
option:a key of _KVMOPTS_CMDSkvm option to fetch the output from
Returns
output a supported kvm invocation
Raises
errors.HypervisorErrorwhen the KVM help output cannot be retrieved
@classmethod
def _GetKVMVersion(cls, kvm_path):

Return the installed KVM version.

Returns
(version, v_maj, v_min, v_rev)
Raises
errors.HypervisorErrorwhen the KVM version cannot be retrieved
@classmethod
def _InstanceChrootDir(cls, instance_name):

Returns the name of the KVM chroot dir of the instance

@classmethod
def _InstanceKvmdMonitor(cls, instance_name):

Returns the instance kvm daemon socket name

@classmethod
def _InstanceKVMRuntime(cls, instance_name):

Returns the instance KVM runtime filename

@classmethod
def _InstanceMonitor(cls, instance_name):

Returns the instance monitor socket name

@classmethod
def _InstanceNICDir(cls, instance_name):

Returns the name of the directory holding the tap device files for a given instance.

@classmethod
def _InstanceNICFile(cls, instance_name, seq):

Returns the name of the file containing the tap device for a given NIC

@classmethod
def _InstancePidAlive(cls, instance_name):

Returns the instance pidfile, pid, and liveness.

Parameters
instance_name:stringinstance name
Returns
tuple(pid file name, pid, liveness)
@classmethod
def _InstancePidFile(cls, instance_name):

Returns the instance pidfile.

@classmethod
def _InstancePidInfo(cls, pid):

Check pid file for instance information.

Check that a pid file is associated with an instance, and retrieve information from its command line.

Parameters
pid:string or intprocess id of the instance to check
Returns
tuple(instance_name, memory, vcpus)
Raises
errors.HypervisorErrorwhen an instance cannot be found
@classmethod
def _InstanceQemuGuestAgentMonitor(cls, instance_name):

Returns the instance serial QEMU Guest Agent socket name

@classmethod
def _InstanceQmpMonitor(cls, instance_name):

Returns the instance serial QMP socket name

@classmethod
def _InstanceSerial(cls, instance_name):

Returns the instance serial socket name

@classmethod
def _InstanceShutdownMonitor(cls, instance_name):

Returns the instance QMP output filename

@classmethod
def _InstanceUidFile(cls, instance_name):

Returns the instance uidfile.

@classmethod
def _IsUserShutdown(cls, instance_name):

Undocumented

@classmethod
def _ParseKVMVersion(cls, text):

Parse the KVM version from the --help output.

Parameters
text:stringoutput of kvm --help
Returns
(version, v_maj, v_min, v_rev)
Raises
errors.HypervisorErrorwhen the KVM version cannot be retrieved
@classmethod
def _RemoveInstanceRuntimeFiles(cls, pidfile, instance_name):

Removes an instance's rutime sockets/files/dirs.

@classmethod
def _SetProcessAffinity(cls, process_id, cpus):

Sets the affinity of a process to the given CPUs.

Parameters
process_id:intUndocumented
cpus:list of intThe list of CPUs the process ID may use.
@classmethod
def _TryReadUidFile(cls, uid_file):

Try to read a uid file

@staticmethod
def _CdromOption(kvm_cmd, cdrom_disk_type, cdrom_image, cdrom_boot, needs_boot_flag):

Extends kvm_cmd with the '-drive' option for a cdrom, and optionally the '-boot' option.

Example: -drive file=cdrom.iso,media=cdrom,format=raw,if=ide -boot order=d

Example: -drive file=cdrom.iso,media=cdrom,format=raw,if=ide,boot=on

Example: -drive file=http://hostname.com/cdrom.iso,media=cdrom

Parameters
kvm_cmd:stringKVM command line
cdrom_disk_type:
cdrom_image:
cdrom_boot:
needs_boot_flag:
@staticmethod
def _ConfigureNIC(instance, seq, nic, tap):

Run the network configuration script for a specified NIC

See hv_base.ConfigureNIC.

Parameters
instance:instance objectinstance we're acting on
seq:intnic sequence number
nic:nic objectnic we're acting on
tap:strthe host's tap interface this NIC corresponds to
@staticmethod
def _GenerateDiskAioCacheParameters(disk_aio, disk_cache, dev_type):

Generate appropriate aio/cache parameters for QEMU

Parameters
disk_aio:stringthe instance's AIO parameter
disk_cache:stringthe instance's disk cache parameter
dev_type:stringthe disk type in use
Returns
stringparameter string suitable for QEMU drive parameters
@staticmethod
def _GenerateKvmTapName(nic):

Generate a TAP network interface name for a NIC.

See hv_base.GenerateTapName.

For the case of the empty string, see OpenTap

Parameters
nic:ganeti.objects.NICNIC object for the name should be generated
Returns
stringTAP network interface name, or the empty string if the NIC is not used in instance communication
@staticmethod
def _SocatUnixConsoleParams():

Returns the correct parameters for socat

If we have a new-enough socat we can use raw mode with an escape character.

@staticmethod
def _StartKvmd(hvparams):

Ensure that the Kvm daemon is running.

Parameters
hvparams:dict of stringshypervisor parameters
@_with_qmp
def _ClearInstanceMigrationCapabilities(self, instance):

Clear all migration capabilities configured for an instance

Parameters
instance:objects.Instance objectthe VM this command acts upon
def _ConfigureRoutedNICs(self, instance, info):

Configures all NICs in routed mode

Parameters
instance:objects.Instancethe instance to be configured
info:stringserialized KVM runtime info
def _ExecuteCpuAffinity(self, instance, cpu_mask):

Complete CPU pinning.

Parameters
instance:objects.Instance objectinstance in question
cpu_mask:stringCPU pinning mask as entered by user
@_with_qmp
def _ExecuteKVMRuntime(self, instance, kvm_runtime, kvmhelp, incoming=None):

Execute a KVM cmd, after completing it with some last minute data.

Parameters
instance:objects.Instance objectthe VM this command acts upon
kvm_runtime:tuple of (list of str, list of objects.NIC objects, dict of hypervisor options, list of tuples (objects.Disk, str, str)(kvm command, NICs of the instance, options at startup of the instance, [(disk, link_name, uri)..])
kvmhelp:stringoutput of kvm --help
incoming:tuple of strings(target_host_ip, port) for migration.
def _GenerateKVMBlockDevicesOptions(self, up_hvp, kvm_disks, kvmhelp, devlist):

Generate KVM options regarding instance's block devices.

Parameters
up_hvp:dictthe instance's runtime hypervisor parameters
kvm_disks:list of tupleslist of tuples [(disk, link_name, uri)..]
kvmhelp:stringoutput of kvm --help
devlist:stringoutput of kvm -device ?
Returns
listlist of command line options eventually used by kvm executable
def _GenerateKVMRuntime(self, instance, block_devices, startup_paused, kvmhelp):

Generate KVM information to start an instance.

Parameters
instanceUndocumented
block_devicesUndocumented
startup_pausedUndocumented
kvmhelp:stringoutput of kvm --help
Unknown Field: attention
this function must not have any side-effects; for example, it must not write to the filesystem, or read values from the current system the are expected to differ between nodes, since it is only run once at instance startup; actions/kvm arguments that can vary between systems should be done in _ExecuteKVMRuntime
def _GetBusSlots(self, hvp=None, runtime=None):

Helper function to get the slots of PCI and SCSI QEMU buses.

This will return the status of the first PCI and SCSI buses. By default QEMU boots with one PCI bus (pci.0) and occupies the first 3 PCI slots. If a SCSI disk is found then a SCSI controller is added on the PCI bus and a SCSI bus (scsi.0) is created.

During hotplug we could query QEMU via info qtree HMP command but parsing the result is too complicated. Instead we use the info stored in runtime files. We parse NIC and disk entries and based on their hvinfo we reserve the corresponding slots.

The runtime argument is a tuple as returned by _LoadKVMRuntime(). Obtain disks and NICs from it. In case a runtime file is not available (see _GenerateKVMRuntime()) we return the bus slots that QEMU boots with by default.

def _GetNetworkDeviceFeatures(self, up_hvp, devlist, kvmhelp):

Get network device options to properly enable supported features.

Return a dict of supported and enabled tap features with nic_model along with the extra strings to be appended to the --netdev and --device options. This function is called before opening a new tap device.

Currently the features_dict includes the following attributes:

  • vhost (boolean)
  • vnet_hdr (boolean)
  • mq (boolean, int)
Returns
(dict, str, str) tupleThe supported features, the string to be appended to the --netdev option, the string to be appended to the --device option
@_with_qmp
def _GetVcpuThreadIds(self, instance):

Get a mapping of vCPU no. to thread IDs for the instance

Parameters
instance:objects.Instance objectinstance in question
Returns
dictionary of int:inta dictionary mapping vCPU numbers to thread IDs
def _LoadKVMRuntime(self, instance, serialized_runtime=None):

Load an instance's KVM runtime

def _ReadKVMRuntime(self, instance_name):

Read an instance's KVM runtime

def _RunKVMCmd(self, name, kvm_cmd, tap_fds=None):

Run the KVM cmd and check for errors

Parameters
name:stringinstance name
kvm_cmd:list of stringsruncmd input for kvm
tap_fds:list of intfds of tap devices opened by Ganeti
def _SaveKVMRuntime(self, instance, kvm_runtime):

Save an instance's KVM runtime

@_with_qmp
def _SetInstanceMigrationCapabilities(self, instance):

Set all migration capabilities configured for an instance

Parameters
instance:objects.Instance objectthe VM this command acts upon
@_with_qmp
def _StopInstance(self, instance, force=False, name=None, timeout=None):

Stop an instance.

@_with_qmp
def _VerifyHotplugCommand(self, _instance, kvm_devid, should_exist):

Checks if a previous hotplug command has succeeded.

Depending on the should_exist value, verifies that an entry identified by device ID is present or not.

Raises
errors.HypervisorErrorif result is not the expected one
def _WriteKVMRuntime(self, instance_name, data):

Write an instance's KVM runtime

_AUTO_RO_RE =

Undocumented

Value
re.compile(r'^-blockdev\s([^-]|(?<!^)-)*,auto-read-only=on\|off',
           re.M|re.S)
_BOOT_RE =

Undocumented

Value
re.compile(r'^-drive\s([^-]|(?<!^)-)*,boot=on\|off',
           re.M|re.S)
_CHROOT_DIR =

Undocumented

Value
_ROOT_DIR+'/chroot'
_CHROOT_QUARANTINE_DIR =

Undocumented

Value
_ROOT_DIR+'/chroot-quarantine'
_CONF_DIR =

Undocumented

Value
_ROOT_DIR+'/conf'
_CTRL_DIR =

Undocumented

Value
_ROOT_DIR+'/ctrl'
_DEFAULT_MACHINE_VERSION_RE =

Undocumented

Value
re.compile(r'^(\S+).*\(default\)',
           re.M)
_DEFAULT_PCI_RESERVATIONS: str =

Undocumented

Value
'11111111111100000000000000000000'
_DEFAULT_SCSI_RESERVATIONS: str =

Undocumented

Value
'0000000000000000'
_DEVICE_DRIVER_SUPPORTED =

Undocumented

Value
staticmethod((lambda drv, devlist: re.compile('^name \\"%s\\"' % drv, re.M).sear
ch(devlist)))
_DISABLE_KVM_RE =

Undocumented

Value
re.compile(r'^-disable-kvm\s',
           re.M)
_DISPLAY_RE =

Undocumented

Value
re.compile(r'^-display\s',
           re.M)
_ENABLE_KVM_RE =

Undocumented

Value
re.compile(r'^-enable-kvm\s',
           re.M)
_KVMOPT_DEVICELIST: str =

Undocumented

Value
'devicelist'
_KVMOPT_HELP: str =

Undocumented

Value
'help'
_KVMOPT_MLIST: str =

Undocumented

Value
'mlist'
_KVMOPTS_CMDS =

Undocumented

Value
{_KVMOPT_HELP: (['--help'], False),
 _KVMOPT_MLIST: (['-machine', '?'], False),
 _KVMOPT_DEVICELIST: (['-device', '?'], True)}
_MACHINE_RE =

Undocumented

Value
re.compile(r'^-machine\s',
           re.M)
_MIGRATION_INFO_MAX_BAD_ANSWERS: int =

Undocumented

Value
5
_MIGRATION_INFO_RETRY_DELAY: int =

Undocumented

Value
2
_NETDEV_RE =

Undocumented

Value
re.compile(r'^-netdev\s',
           re.M)
_NICS_DIR =

Undocumented

Value
_ROOT_DIR+'/nic'
_PIDS_DIR =

Undocumented

Value
_ROOT_DIR+'/pid'
_QMP_RE =

Undocumented

Value
re.compile(r'^-qmp\s',
           re.M)
_ROOT_DIR =

Undocumented

Value
pathutils.RUN_DIR+'/kvm-hypervisor'
_UIDS_DIR =

Undocumented

Value
_ROOT_DIR+'/uid'
_UUID_RE =

Undocumented

Value
re.compile(r'^-uuid\s',
           re.M)
_VERSION_RE =

Undocumented

Value
re.compile(r'\b(\d+)\.(\d+)(\.(\d+))?\b')
_VHOST_RE =

Undocumented

Value
re.compile(r'^-netdev\stap.*,vhost=on\|off',
           re.M|re.S)
_VIRTIO: str =

Undocumented

Value
'virtio'
_VIRTIO_BLK_PCI: str =

Undocumented

Value
'virtio-blk-pci'
_VIRTIO_NET_PCI: str =

Undocumented

Value
'virtio-net-pci'
_VIRTIO_NET_QUEUES_RE =

Undocumented

Value
re.compile(r'^-netdev\stap.*,fds=x:y:...:z',
           re.M)