Revision 00cd937c
b/lib/bootstrap.py | ||
---|---|---|
114 | 114 |
if config.ConfigWriter.IsCluster(): |
115 | 115 |
raise errors.OpPrereqError("Cluster is already initialised") |
116 | 116 |
|
117 |
if hypervisor_type == constants.HT_XEN_HVM31:
|
|
117 |
if hypervisor_type == constants.HT_XEN_HVM: |
|
118 | 118 |
if not os.path.exists(constants.VNC_PASSWORD_FILE): |
119 | 119 |
raise errors.OpPrereqError("Please prepare the cluster VNC" |
120 | 120 |
"password file %s" % |
b/lib/cmdlib.py | ||
---|---|---|
1814 | 1814 |
(fname, to_node)) |
1815 | 1815 |
|
1816 | 1816 |
to_copy = [] |
1817 |
if constants.HT_XEN_HVM31 in self.cfg.GetClusterInfo().enabled_hypervisors:
|
|
1817 |
if constants.HT_XEN_HVM in self.cfg.GetClusterInfo().enabled_hypervisors: |
|
1818 | 1818 |
to_copy.append(constants.VNC_PASSWORD_FILE) |
1819 | 1819 |
for fname in to_copy: |
1820 | 1820 |
result = rpc.call_upload_file([node], fname) |
... | ... | |
3493 | 3493 |
self.op.vnc_bind_address) |
3494 | 3494 |
|
3495 | 3495 |
# Xen HVM device type checks |
3496 |
if self.op.hypervisor == constants.HT_XEN_HVM31:
|
|
3496 |
if self.op.hypervisor == constants.HT_XEN_HVM: |
|
3497 | 3497 |
if self.op.hvm_nic_type not in constants.HT_HVM_VALID_NIC_TYPES: |
3498 | 3498 |
raise errors.OpPrereqError("Invalid NIC type %s specified for Xen HVM" |
3499 | 3499 |
" hypervisor" % self.op.hvm_nic_type) |
... | ... | |
4433 | 4433 |
} |
4434 | 4434 |
|
4435 | 4435 |
htkind = instance.hypervisor |
4436 |
if htkind == constants.HT_XEN_PVM30:
|
|
4436 |
if htkind == constants.HT_XEN_PVM: |
|
4437 | 4437 |
idict["kernel_path"] = instance.kernel_path |
4438 | 4438 |
idict["initrd_path"] = instance.initrd_path |
4439 | 4439 |
|
4440 |
if htkind == constants.HT_XEN_HVM31:
|
|
4440 |
if htkind == constants.HT_XEN_HVM: |
|
4441 | 4441 |
idict["hvm_boot_order"] = instance.hvm_boot_order |
4442 | 4442 |
idict["hvm_acpi"] = instance.hvm_acpi |
4443 | 4443 |
idict["hvm_pae"] = instance.hvm_pae |
... | ... | |
4659 | 4659 |
" node %s" % node) |
4660 | 4660 |
|
4661 | 4661 |
# Xen HVM device type checks |
4662 |
if instance.hypervisor == constants.HT_XEN_HVM31:
|
|
4662 |
if instance.hypervisor == constants.HT_XEN_HVM: |
|
4663 | 4663 |
if self.op.hvm_nic_type is not None: |
4664 | 4664 |
if self.op.hvm_nic_type not in constants.HT_HVM_VALID_NIC_TYPES: |
4665 | 4665 |
raise errors.OpPrereqError("Invalid NIC type %s specified for Xen" |
b/lib/constants.py | ||
---|---|---|
253 | 253 |
INSTANCE_REBOOT_FULL = "full" |
254 | 254 |
|
255 | 255 |
# Hypervisor constants |
256 |
HT_XEN_PVM30 = "xen-3.0"
|
|
256 |
HT_XEN_PVM = "xen-pvm"
|
|
257 | 257 |
HT_FAKE = "fake" |
258 |
HT_XEN_HVM31 = "xen-hvm-3.1"
|
|
258 |
HT_XEN_HVM = "xen-hvm"
|
|
259 | 259 |
HT_KVM = "kvm" |
260 |
HYPER_TYPES = frozenset([HT_XEN_PVM30, HT_FAKE, HT_XEN_HVM31, HT_KVM])
|
|
261 |
HTS_REQ_PORT = frozenset([HT_XEN_HVM31])
|
|
260 |
HYPER_TYPES = frozenset([HT_XEN_PVM, HT_FAKE, HT_XEN_HVM, HT_KVM])
|
|
261 |
HTS_REQ_PORT = frozenset([HT_XEN_HVM]) |
|
262 | 262 |
|
263 | 263 |
HT_HVM_VNC_BASE_PORT = 5900 |
264 | 264 |
HT_HVM_DEFAULT_BOOT_ORDER = 'dc' |
b/lib/hypervisor/__init__.py | ||
---|---|---|
32 | 32 |
|
33 | 33 |
|
34 | 34 |
_HYPERVISOR_MAP = { |
35 |
constants.HT_XEN_PVM30: hv_xen.XenPvmHypervisor,
|
|
36 |
constants.HT_XEN_HVM31: hv_xen.XenHvmHypervisor,
|
|
35 |
constants.HT_XEN_PVM: hv_xen.XenPvmHypervisor, |
|
36 |
constants.HT_XEN_HVM: hv_xen.XenHvmHypervisor, |
|
37 | 37 |
constants.HT_FAKE: hv_fake.FakeHypervisor, |
38 | 38 |
constants.HT_KVM: hv_kvm.KVMHypervisor, |
39 | 39 |
} |
Also available in: Unified diff