Revision f00b46bc
b/configure.ac | ||
---|---|---|
17 | 17 |
# --with-export-dir=... |
18 | 18 |
AC_ARG_WITH([export-dir], |
19 | 19 |
[AS_HELP_STRING([--with-export-dir=DIR], |
20 |
[directory to use by default for instance image exports (default is /srv/ganeti/export)] |
|
20 |
[directory to use by default for instance image] |
|
21 |
[ exports (default is /srv/ganeti/export)] |
|
21 | 22 |
)], |
22 | 23 |
[export_dir="$withval"], |
23 | 24 |
[export_dir="/srv/ganeti/export"]) |
... | ... | |
27 | 28 |
# do a bit of black sed magic to for quoting of the strings in the list |
28 | 29 |
AC_ARG_WITH([os-search-path], |
29 | 30 |
[AS_HELP_STRING([--with-os-search-path=LIST], |
30 |
[comma separated list of directories to search for OS images (default is /srv/ganeti/os)] |
|
31 |
[comma separated list of directories to] |
|
32 |
[ search for OS images (default is /srv/ganeti/os)] |
|
31 | 33 |
)], |
32 | 34 |
[os_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`], |
33 | 35 |
[os_search_path="'/srv/ganeti/os'"]) |
34 | 36 |
AC_SUBST(OS_SEARCH_PATH, $os_search_path) |
35 | 37 |
|
38 |
# --with-xen-kernel=... |
|
39 |
AC_ARG_WITH([xen-kernel], |
|
40 |
[AS_HELP_STRING([--with-xen-kernel=PATH], |
|
41 |
[DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-2.6-xenU)] |
|
42 |
)], |
|
43 |
[xen_kernel="$withval"], |
|
44 |
[xen_kernel="/boot/vmlinuz-2.6-xenU"]) |
|
45 |
AC_SUBST(XEN_KERNEL, $xen_kernel) |
|
46 |
|
|
47 |
# --with-xen-initrd=... |
|
48 |
AC_ARG_WITH([xen-initrd], |
|
49 |
[AS_HELP_STRING([--with-xen-initrd=PATH], |
|
50 |
[DomU initrd image for Xen hypervisor (default is /boot/initrd-2.6-xenU)] |
|
51 |
)], |
|
52 |
[xen_initrd="$withval"], |
|
53 |
[xen_initrd="/boot/initrd-2.6-xenU"]) |
|
54 |
AC_SUBST(XEN_INITRD, $xen_initrd) |
|
55 |
|
|
36 | 56 |
# Check common programs |
37 | 57 |
AC_PROG_INSTALL |
38 | 58 |
AC_PROG_LN_S |
b/lib/Makefile.am | ||
---|---|---|
1 |
SSH_INITD_SCRIPT = @SSH_INITD_SCRIPT@ |
|
2 |
|
|
3 | 1 |
CLEANFILES = $(nodist_pkgpython_PYTHON) *.py[oc] |
4 | 2 |
|
5 | 3 |
nodist_pkgpython_PYTHON = _autoconf.py |
... | ... | |
19 | 17 |
echo "SSH_INITD_SCRIPT = '$(SSH_INITD_SCRIPT)'"; \ |
20 | 18 |
echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \ |
21 | 19 |
echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \ |
20 |
echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \ |
|
21 |
echo "XEN_INITRD = '$(XEN_INITRD)'"; \ |
|
22 | 22 |
} > $@ |
23 | 23 |
|
24 | 24 |
pre-check: all |
b/lib/constants.py | ||
---|---|---|
55 | 55 |
|
56 | 56 |
EXPORT_CONF_FILE = "config.ini" |
57 | 57 |
|
58 |
XEN_KERNEL = _autoconf.XEN_KERNEL |
|
59 |
XEN_INITRD = _autoconf.XEN_INITRD |
|
60 |
|
|
58 | 61 |
# hooks-related constants |
59 | 62 |
HOOKS_BASE_DIR = _autoconf.SYSCONFDIR + "/ganeti/hooks" |
60 | 63 |
HOOKS_PHASE_PRE = "pre" |
b/lib/hypervisor.py | ||
---|---|---|
30 | 30 |
from ganeti import utils |
31 | 31 |
from ganeti import logger |
32 | 32 |
from ganeti import ssconf |
33 |
from ganeti import constants |
|
33 | 34 |
from ganeti.errors import HypervisorError |
34 | 35 |
|
35 | 36 |
_HT_XEN30 = "xen-3.0" |
... | ... | |
132 | 133 |
""" |
133 | 134 |
config = StringIO() |
134 | 135 |
config.write("# this is autogenerated by Ganeti, please do not edit\n#\n") |
135 |
config.write("kernel = '/boot/vmlinuz-2.6-xenU'\n")
|
|
136 |
if os.path.exists("/boot/initrd-2.6-xenU"):
|
|
137 |
config.write("ramdisk = '/boot/initrd-2.6-xenU'\n")
|
|
136 |
config.write("kernel = '%s'\n" % constants.XEN_KERNEL)
|
|
137 |
if os.path.exists(constants.XEN_INITRD):
|
|
138 |
config.write("ramdisk = '%s'\n" % constants.XEN_INITRD)
|
|
138 | 139 |
config.write("memory = %d\n" % instance.memory) |
139 | 140 |
config.write("vcpus = %d\n" % instance.vcpus) |
140 | 141 |
config.write("name = '%s'\n" % instance.name) |
Also available in: Unified diff