Revision f00b46bc lib/hypervisor.py
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