Trees | Indices | Help |
|
---|
|
Connection to the QEMU Monitor using the QEMU Monitor Protocol (QMP).
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
QmpMessage |
|
||
|
|||
|
|||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
_FIRST_MESSAGE_KEY = "QMP"
|
|||
_EVENT_KEY = "event"
|
|||
_ERROR_KEY = "error"
|
|||
_RETURN_KEY = "return"
|
|||
ACTUAL_KEY = "actual"
|
|||
_ACTUAL_KEY = "actual"
|
|||
_ERROR_CLASS_KEY = "class"
|
|||
_ERROR_DESC_KEY = "desc"
|
|||
_EXECUTE_KEY = "execute"
|
|||
_ARGUMENTS_KEY = "arguments"
|
|||
_VERSION_KEY = "version"
|
|||
_PACKAGE_KEY = "package"
|
|||
_QEMU_KEY = "qemu"
|
|||
_CAPABILITIES_COMMAND = "qmp_capabilities"
|
|||
_QUERY_COMMANDS = "query-commands"
|
|||
_MESSAGE_END_TOKEN = "\r\n"
|
|||
_QEMU_PCI_SLOTS = 32
|
|||
Inherited from |
|
|||
Inherited from |
|
Instantiates the MonitorSocket object.
|
Connects to the QMP monitor. Connects to the UNIX socket and makes sure that we can actually send and receive data to the kvm instance via QMP.
|
Extract and parse a QMP message from the given buffer. Seeks for a QMP message in the given buf. If found, it parses it and returns it together with the rest of the characters in the buf. If no message is found, returns None and the whole buffer.
|
Receives a message from QMP and decodes the received JSON object.
|
Encodes and sends a message to KVM using QMP.
|
Executes a QMP command and returns the response of the server.
|
Parse the QMP response If error key found in the response message raise HypervisorError. Ignore any async event and thus return the response message related to command. |
Hot-add a NIC First pass the tapfds, then netdev_add and then device_add
|
Hot-del a NIC
|
Hot-add a disk Try opening the device to obtain a fd and pass it with SCM_RIGHTS. This will be omitted in case of userspace access mode (open will fail). Then use blockdev-add and then device_add.
|
Hot-del a Disk Note that drive_del is not supported yet in qmp and thus should be invoked from HMP.
|
Check if a specific device exists or not on a running instance. It will match the PCI slot of the device and the id currently obtained by _GenerateDeviceKVMId().
|
Get the first available PCI slot of a running instance.
|
Check if disk hotplug is possible Hotplug is *not* supported in case:
|
Check if NIC hotplug is possible Hotplug is *not* supported in case:
|
Wrapper around the getfd qmp command Use fdsend to send an fd to a running process via SCM_RIGHTS and then use the getfd qmp command to name it properly so that it can be used later by NIC hotplugging.
|
Wrapper around add-fd qmp command Use fdsend to send fd to a running process via SCM_RIGHTS and then add-fd qmp command to add it to an fdset so that it can be used later by disk hotplugging.
|
Wrapper around remove-fd qmp command Remove the file descriptor previously passed. After qemu has dup'd the fd (e.g. during disk hotplug), it can be safely removed. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 22 11:13:21 2016 | http://epydoc.sourceforge.net |