Statistics
| Branch: | Tag: | Revision:

root / lib / hypervisor @ 744ff486

Name Size
  hv_kvm
__init__.py 2.6 kB
hv_base.py 23 kB
hv_chroot.py 11.5 kB
hv_fake.py 11.4 kB
hv_lxc.py 16.4 kB
hv_xen.py 44.6 kB

Latest revisions

# Date Author Comment
744ff486 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) hotplug: Use QMP in VerifyHotplugSupport

This used to check whether a specific hotplug action is supported.
Since everything is about to be done via qmp commands delegate these
checks to QmpConnection class.

Signed-off-by: Dimitris Aragiorgis <>...

d36a401b 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) monitor: Close socket fd if already connected

We close the socket fd only if we have an active connection.
We hide this logic in the public close() method, and all
the actions are moved to a private method.

Signed-off-by: Dimitris Aragiorgis <>...

18c03e18 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) kvm: New _with_qmp decorator

The decorator takes the hypervisor and the instance object as passed
to all hotplug related commands and ensures a valid QmpConnection()
object is found in hypervisor's qmp attribute.

This decorator is responsible for all actions related to the...

af4b620c 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) qmp: Add Disk hotplugging related methods

HotAddDisk() uses blockdev-add and device_add after getting the
drive fd and passing it with the AddFd() helper method. Please note
that in case of userspace access mode this step will be omitted.

HotDelDisk() uses device_del. Please note that drive_del is...

cc6a7f5f 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) qmp: Add NIC hotplugging related methods

HotAddNic() uses netdev_add and device_add after passing the tapfd
to the running process with the GetFd() helper method.

HotDelNic() uses device_del and netdev_del qmp commands.

Signed-off-by: Dimitris Aragiorgis <>...

565fa7f1 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) qmp: Helper methods for parsing query-pci output

Introduce GetPCIDevices() that gets the devices of the first PCI bus
of a running instance, HasPCIDevice() that will be used to verify
if a specific device is correctly hotplugged or not, and
GetFreePCISlot() that will be used during hot-add to find the first...

ff81c659 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) qmp: Add helper methods to verify hotplug support

Introduce CheckDiskHotAddSupport() and CheckNicHotAddSupport()
helper methods that will be used to verify hotplug support.
Both check for fdsend python module and if the required qmp
commands are supported....

81bd73d1 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) qmp: Add GetFd() wrapper around getfd command

getfd qmp command will be used to pass an fd using SCM_RIGHTS
and name it properly so that NIC hot-add can take place.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Hrvoje Ribicic <>

105a40f2 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) qmp: Refactor of add-fd and remove-fd commands

Instead of sending the qmp command along with the SCM_RIGHTS control
message we send just a blank (idea taken from qemu iotests). Then we
invoke the corresponding command (add-fd, remove-fd) with the
regular way (qmp.Execute). Since the qmp connection does not close...

977b383d 12/11/2014 12:54 pm Dimitris Aragiorgis

(2.13) utils: Introduce GetFreeSlot() function

Since this is a generic function that implements bitarray logic move
it from kvm to utils so that it can be easily used across all modules.

Make it raise errors.GenericError if it cannot find a free slot in...

View revisions

Also available in: Atom