Add Solaris support for Ovm

Conflicts:

	setup/db/templates.sql
This commit is contained in:
frank 2011-10-25 18:09:15 -07:00
parent cfebd04df0
commit cb3c2699b7
4 changed files with 12 additions and 1 deletions

View File

@ -6,6 +6,7 @@ public class OvmHelper {
private static final HashMap<String, String> _ovmMap = new HashMap<String, String>();
public static final String ORACLE_LINUX = "Oracle Linux";
public static final String ORACLE_SOLARIS = "Oracle Solaris";
public static final String WINDOWS = "Windows";
static {
@ -34,6 +35,12 @@ public class OvmHelper {
_ovmMap.put("Windows Vista (32-bit)", WINDOWS);
_ovmMap.put("Windows XP SP2 (32-bit)", WINDOWS);
_ovmMap.put("Windows XP SP3 (32-bit)", WINDOWS);
_ovmMap.put("Sun Solaris 10(32-bit)", ORACLE_SOLARIS);
_ovmMap.put("Sun Solaris 10(64-bit)", ORACLE_SOLARIS);
_ovmMap.put("Sun Solaris 9(Experimental)", ORACLE_SOLARIS);
_ovmMap.put("Sun Solaris 8(Experimental)", ORACLE_SOLARIS);
_ovmMap.put("Sun Solaris 11 (32-bit)", ORACLE_SOLARIS);
_ovmMap.put("Sun Solaris 11 (64-bit)", ORACLE_SOLARIS);
}
public static String getOvmGuestType(String stdType) {

View File

@ -499,7 +499,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
String osType = OvmHelper.getOvmGuestType(spec.getOs());
if (OvmHelper.ORACLE_LINUX.equals(osType)) {
vm.type = OvmVm.PV;
} else if (OvmHelper.WINDOWS.equals(osType)) {
} else if (OvmHelper.WINDOWS.equals(osType) || OvmHelper.ORACLE_SOLARIS.equals(osType)) {
vm.type = OvmVm.HVM;
} else {
throw new CloudRuntimeException(spec.getOs() + " is not supported" + ",Oracle VM only supports Oracle Linux and Windows");

View File

@ -11,6 +11,8 @@ INSERT IGNORE INTO guest_os(id, category_id, display_name) VALUES (200, 1, 'Othe
INSERT IGNORE INTO guest_os(id, category_id, display_name) VALUES (201, 1, 'Other CentOS (64-bit)');
INSERT IGNORE INTO guest_os(id, category_id, display_name) VALUES (202, 5, 'Other SUSE Linux(32-bit)');
INSERT IGNORE INTO guest_os(id, category_id, display_name) VALUES (203, 5, 'Other SUSE Linux(64-bit)');
INSERT IGNORE INTO guest_os(id, category_id, display_name) VALUES (141, 9, 'Sun Solaris 11 (64-bit)');
INSERT IGNORE INTO guest_os(id, category_id, display_name) VALUES (142, 9, 'Sun Solaris 11 (32-bit)');
INSERT IGNORE INTO guest_os_hypervisor(hypervisor_type, guest_os_name, guest_os_id) VALUES ("VmWare", 'CentOS (32-bit)', 200);
INSERT IGNORE INTO guest_os_hypervisor(hypervisor_type, guest_os_name, guest_os_id) VALUES ("VmWare", 'CentOS (64-bit)', 201);

View File

@ -186,6 +186,8 @@ INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (154, 5, '
INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (155, 5, 'SUSE Linux Enterprise Server 11 SP1 (32-bit)');
INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (156, 10, 'Ubuntu 10.10 (32-bit)');
INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (157, 10, 'Ubuntu 10.10 (64-bit)');
INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (158, 9, 'Sun Solaris 11 (64-bit)');
INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (159, 9, 'Sun Solaris 11 (32-bit)');
INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (200, 1, 'Other CentOS (32-bit)');
INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (201, 1, 'Other CentOS (64-bit)');