value = (String) params.get("host.reserved.mem.mb");
_dom0MinMem = NumbersUtil.parseInt(value, 0) * 1024 * 1024;
LibvirtConnection.initialize(_hypervisorURI);
Connect conn = null;
try {
conn = LibvirtConnection.getConnection();
} catch (LibvirtException e) {
throw new CloudRuntimeException(e.getMessage());
}
/* Does node support HVM guest? If not, exit */
if (!IsHVMEnabled(conn)) {
throw new ConfigurationException(
"NO HVM support on this machine, please make sure: "
+ "1. VT/SVM is supported by your CPU, or is enabled in BIOS. "
+ "2. kvm modules are loaded (kvm, kvm_amd|kvm_intel)");
}
_hypervisorPath = getHypervisorPath(conn);
try {
_hvVersion = conn.getVersion();
_hvVersion = (_hvVersion % 1000000) / 1000;
} catch (LibvirtException e) {
}