Statistics
| Branch: | Tag: | Revision:

root / lib / hypervisor @ f8b4ec36

Name Size
__init__.py 2 kB
hv_base.py 18.6 kB
hv_chroot.py 10.3 kB
hv_fake.py 10.3 kB
hv_kvm.py 95.1 kB
hv_lxc.py 15.3 kB
hv_xen.py 35.7 kB

Latest revisions

# Date Author Comment
f8b4ec36 12/03/2013 11:55 am Dimitris Aragiorgis

Pass disk geometry in kvm command

Currently we allow this feature only for ext templates that
allow arbitrary params per disk. If both 'heads' and 'secs'
params are given then 'cyls' is calculated from the disk size.

TODO: export these params in IDISK_PARAMS since the can be...

488115f3 11/28/2013 12:56 pm Dimitris Aragiorgis

Fill NIC/Disk with dummy uuid upon loading runtime

This is needed because hotplug and NIC configuration
related code expects objects with uuids.

This fixes migration issues of instances with old
runtime format. Old devices remain not hot-plug-able
due to inconsistency between valid device uuids of...

6254b733 11/28/2013 10:03 am Dimitris Aragiorgis

Fix _ConfigureNIC() upon migration

In case we try to migrate old instances with kvm_nics entries
without uuid slots ends to passing None values to env dict
in RunCmd() which raises an Exception. To this end export uuid
only if not None.

Signed-off-by: Dimitris Aragiorgis <>

218e4c34 11/28/2013 09:04 am Dimitris Aragiorgis

Enable -device option for old disks upon migration

Change _GenerateDeviceKVMId() to take device index as an
extra argument. In case device has uuid and pci info
we return proper device id. In case idx is given we return
a dummy id (e.g. hotdisk-0). Otherwise we raise an Exception....

cbb42ac7 11/28/2013 08:25 am Dimitris Aragiorgis

Move disk options before nic ones in kvm command

Older versions of Ganeti did ensure that during startup
disk devices will be inserted before nic devices in PCI
configuration space. KVM inserts devices to PCI slots
depending on the order of command line options....

38f561d8 11/22/2013 04:19 pm Dimitris Aragiorgis

Do not pass None values in network scripts

RunCmd does not allow env dict to have non string values.
NIC's IP and name can be None, thus export them only if not.

Signed-off-by: Dimitris Aragiorgis <>

2088b563 11/22/2013 01:04 pm Dimitris Aragiorgis

Some minor fixes related to network scripts

Export NIC's name and uuid in configuration scripts, use HooksDict()
in Xen hypervisor to export network related vars, use GetTags()
instance method instead of directly accessing tags slot, and fix a
bug in net-common script for the routed mode....

2e6f0cdf 11/22/2013 12:51 pm Dimitris Aragiorgis

Make NIC setup more flexible in case of Xen

For every NIC write down a file that contains NIC's
info (MAC, mode, link, network details), that can
be sourced by any vif script. The file location is:
/var/run/ganeti/xen-hypervisor/nic/<domname>/<nicidx>.
...

26ce25ef 11/22/2013 11:57 am Dimitris Aragiorgis

Export nic name and uuid in configuration scripts

Signed-off-by: Dimitris Aragiorgis <>

7cfe1eb6 11/21/2013 04:34 pm Dimitris Aragiorgis

Introduce --hotplug-if-possible option

This will be useful for an external entity using RAPI that
wants to modify devices of instances.

The common use case for that is:
"I want to add a NIC/disk to an instance. If it is running
then try to hotplug the device. If not, then just add it to config."...

View revisions

Also available in: Atom