Commit 4b5e40a5 authored by Iustin Pop's avatar Iustin Pop

Barebones LXC hypervisor

This needs lots of work, but it can successfully launch an LXC-based
instance.  See the docstring for the limitations/work to be done.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarBalazs Lecz <leczb@google.com>
parent 5a672c30
......@@ -136,6 +136,7 @@ hypervisor_PYTHON = \
lib/hypervisor/hv_chroot.py \
lib/hypervisor/hv_fake.py \
lib/hypervisor/hv_kvm.py \
lib/hypervisor/hv_lxc.py \
lib/hypervisor/hv_xen.py
rapi_PYTHON = \
......
......@@ -632,7 +632,15 @@ HT_FAKE = "fake"
HT_XEN_HVM = "xen-hvm"
HT_KVM = "kvm"
HT_CHROOT = "chroot"
HYPER_TYPES = frozenset([HT_XEN_PVM, HT_FAKE, HT_XEN_HVM, HT_KVM, HT_CHROOT])
HT_LXC = "lxc"
HYPER_TYPES = frozenset([
HT_XEN_PVM,
HT_FAKE,
HT_XEN_HVM,
HT_KVM,
HT_CHROOT,
HT_LXC,
])
HTS_REQ_PORT = frozenset([HT_XEN_HVM, HT_KVM])
VNC_BASE_PORT = 5900
......@@ -877,6 +885,8 @@ HVC_DEFAULTS = {
HT_CHROOT: {
HV_INIT_SCRIPT: "/ganeti-chroot",
},
HT_LXC: {
},
}
HVC_GLOBALS = frozenset([
......
......@@ -30,6 +30,7 @@ from ganeti.hypervisor import hv_fake
from ganeti.hypervisor import hv_xen
from ganeti.hypervisor import hv_kvm
from ganeti.hypervisor import hv_chroot
from ganeti.hypervisor import hv_lxc
_HYPERVISOR_MAP = {
......@@ -38,6 +39,7 @@ _HYPERVISOR_MAP = {
constants.HT_FAKE: hv_fake.FakeHypervisor,
constants.HT_KVM: hv_kvm.KVMHypervisor,
constants.HT_CHROOT: hv_chroot.ChrootManager,
constants.HT_LXC: hv_lxc.LXCHypervisor,
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment