diff --git a/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java b/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java index c9af2b83dbc..addd864467e 100755 --- a/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java +++ b/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java @@ -6,6 +6,7 @@ public class OvmHelper { private static final HashMap _ovmMap = new HashMap(); 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) { diff --git a/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java b/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java index d2a05646efc..30a138f7665 100755 --- a/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java +++ b/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java @@ -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"); diff --git a/setup/db/db/schema-2212to2213.sql b/setup/db/db/schema-2212to2213.sql index 7ef673412b6..d26cb658f00 100644 --- a/setup/db/db/schema-2212to2213.sql +++ b/setup/db/db/schema-2212to2213.sql @@ -12,6 +12,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); diff --git a/setup/db/templates.sql b/setup/db/templates.sql index 57ddf827b98..688b6f3b1c5 100755 --- a/setup/db/templates.sql +++ b/setup/db/templates.sql @@ -169,6 +169,8 @@ INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (137, 4, ' INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (138, 7, 'None'); INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (139, 7, 'Other PV (32-bit)'); INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (140, 7, 'Other PV (64-bit)'); +INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (141, 9, 'Sun Solaris 11 (64-bit)'); +INSERT INTO `cloud`.`guest_os` (id, category_id, display_name) VALUES (142, 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)');