# --with-export-dir=...
AC_ARG_WITH([export-dir],
[AS_HELP_STRING([--with-export-dir=DIR],
- [directory to use by default for instance image exports (default is /srv/ganeti/export)]
+ [directory to use by default for instance image]
+ [ exports (default is /srv/ganeti/export)]
)],
[export_dir="$withval"],
[export_dir="/srv/ganeti/export"])
# do a bit of black sed magic to for quoting of the strings in the list
AC_ARG_WITH([os-search-path],
[AS_HELP_STRING([--with-os-search-path=LIST],
- [comma separated list of directories to search for OS images (default is /srv/ganeti/os)]
+ [comma separated list of directories to]
+ [ search for OS images (default is /srv/ganeti/os)]
)],
[os_search_path=`echo -n "$withval" | sed -e "s/\([[^,]]*\)/'\1'/g"`],
[os_search_path="'/srv/ganeti/os'"])
AC_SUBST(OS_SEARCH_PATH, $os_search_path)
+# --with-xen-kernel=...
+AC_ARG_WITH([xen-kernel],
+ [AS_HELP_STRING([--with-xen-kernel=PATH],
+ [DomU kernel image for Xen hypervisor (default is /boot/vmlinuz-2.6-xenU)]
+ )],
+ [xen_kernel="$withval"],
+ [xen_kernel="/boot/vmlinuz-2.6-xenU"])
+AC_SUBST(XEN_KERNEL, $xen_kernel)
+
+# --with-xen-initrd=...
+AC_ARG_WITH([xen-initrd],
+ [AS_HELP_STRING([--with-xen-initrd=PATH],
+ [DomU initrd image for Xen hypervisor (default is /boot/initrd-2.6-xenU)]
+ )],
+ [xen_initrd="$withval"],
+ [xen_initrd="/boot/initrd-2.6-xenU"])
+AC_SUBST(XEN_INITRD, $xen_initrd)
+
# Check common programs
AC_PROG_INSTALL
AC_PROG_LN_S
-SSH_INITD_SCRIPT = @SSH_INITD_SCRIPT@
-
CLEANFILES = $(nodist_pkgpython_PYTHON) *.py[oc]
nodist_pkgpython_PYTHON = _autoconf.py
echo "SSH_INITD_SCRIPT = '$(SSH_INITD_SCRIPT)'"; \
echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
+ echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
+ echo "XEN_INITRD = '$(XEN_INITRD)'"; \
} > $@
pre-check: all
from ganeti import utils
from ganeti import logger
from ganeti import ssconf
+from ganeti import constants
from ganeti.errors import HypervisorError
_HT_XEN30 = "xen-3.0"
"""
config = StringIO()
config.write("# this is autogenerated by Ganeti, please do not edit\n#\n")
- config.write("kernel = '/boot/vmlinuz-2.6-xenU'\n")
- if os.path.exists("/boot/initrd-2.6-xenU"):
- config.write("ramdisk = '/boot/initrd-2.6-xenU'\n")
+ config.write("kernel = '%s'\n" % constants.XEN_KERNEL)
+ if os.path.exists(constants.XEN_INITRD):
+ config.write("ramdisk = '%s'\n" % constants.XEN_INITRD)
config.write("memory = %d\n" % instance.memory)
config.write("vcpus = %d\n" % instance.vcpus)
config.write("name = '%s'\n" % instance.name)