mirror of https://github.com/apache/cloudstack.git
bug 11675: enable RHEL 6 for XCP 1.1
This commit is contained in:
parent
9bf4ac9041
commit
b1de219cd9
|
|
@ -30,7 +30,8 @@ import com.cloud.utils.exception.CloudRuntimeException;
|
|||
*/
|
||||
public class CitrixHelper {
|
||||
private static final Logger s_logger = Logger.getLogger(CitrixHelper.class);
|
||||
private static final HashMap<String, String> _xcpGuestOsMap = new HashMap<String, String>(70);
|
||||
private static final HashMap<String, String> _xcp100GuestOsMap = new HashMap<String, String>(70);
|
||||
private static final HashMap<String, String> _xcp110GuestOsMap = new HashMap<String, String>(70);
|
||||
private static final HashMap<String, String> _xenServerGuestOsMap = new HashMap<String, String>(70);
|
||||
private static final HashMap<String, String> _xenServer56FP1GuestOsMap = new HashMap<String, String>(70);
|
||||
private static final HashMap<String, String> _xenServer56FP2GuestOsMap = new HashMap<String, String>(70);
|
||||
|
|
@ -38,83 +39,161 @@ public class CitrixHelper {
|
|||
|
||||
|
||||
static {
|
||||
_xcpGuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)");
|
||||
_xcpGuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)");
|
||||
_xcpGuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit) (experimental)");
|
||||
_xcpGuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit) (experimental)");
|
||||
;
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 x64");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 x64");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "Other install media");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 x64");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)");
|
||||
_xcpGuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)");
|
||||
_xcpGuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)");
|
||||
_xcpGuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)");
|
||||
_xcpGuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)");
|
||||
_xcpGuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)");
|
||||
_xcpGuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)");
|
||||
_xcpGuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)");
|
||||
_xcpGuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)");
|
||||
_xcpGuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)");
|
||||
_xcpGuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)");
|
||||
_xcpGuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)");
|
||||
_xcpGuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)");
|
||||
_xcpGuestOsMap.put("Other Linux (32-bit)", "Other install media");
|
||||
_xcpGuestOsMap.put("Other Linux (64-bit)", "Other install media");
|
||||
_xcpGuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcpGuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit) (experimental)");
|
||||
_xcp100GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit) (experimental)");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 x64");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 x64");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "Other install media");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 x64");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)");
|
||||
_xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)");
|
||||
_xcp100GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)");
|
||||
_xcp100GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)");
|
||||
_xcp100GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)");
|
||||
_xcp100GuestOsMap.put("Other Linux (32-bit)", "Other install media");
|
||||
_xcp100GuestOsMap.put("Other Linux (64-bit)", "Other install media");
|
||||
_xcp100GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp100GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)");
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
_xcp110GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 x64");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 x64");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "Other install media");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 x64");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)");
|
||||
_xcp110GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)");
|
||||
_xcp110GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)");
|
||||
_xcp110GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)");
|
||||
_xcp110GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)");
|
||||
_xcp110GuestOsMap.put("Other Linux (32-bit)", "Other install media");
|
||||
_xcp110GuestOsMap.put("Other Linux (64-bit)", "Other install media");
|
||||
_xcp110GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xcp110GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)");
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
_xenServerGuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)");
|
||||
_xenServerGuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)");
|
||||
|
|
@ -334,8 +413,8 @@ public class CitrixHelper {
|
|||
}
|
||||
|
||||
|
||||
public static String getXcpGuestOsType(String stdType) {
|
||||
String guestOS = _xcpGuestOsMap.get(stdType);
|
||||
public static String getXcp100GuestOsType(String stdType) {
|
||||
String guestOS = _xcp100GuestOsMap.get(stdType);
|
||||
if (guestOS == null) {
|
||||
s_logger.debug("Can't find the guest os: " + stdType + " mapping into XCP's guestOS type, start it as HVM guest");
|
||||
guestOS = "Other install media";
|
||||
|
|
@ -343,6 +422,16 @@ public class CitrixHelper {
|
|||
return guestOS;
|
||||
}
|
||||
|
||||
|
||||
public static String getXcp110GuestOsType(String stdType) {
|
||||
String guestOS = _xcp100GuestOsMap.get(stdType);
|
||||
if (guestOS == null) {
|
||||
s_logger.debug("Can't find the guest os: " + stdType + " mapping into XCP's guestOS type, start it as HVM guest");
|
||||
guestOS = "Other install media";
|
||||
}
|
||||
return guestOS;
|
||||
}
|
||||
|
||||
public static String getXenServerGuestOsType(String stdType, boolean bootFromCD) {
|
||||
String guestOS = _xenServerGuestOsMap.get(stdType);
|
||||
if (guestOS == null) {
|
||||
|
|
|
|||
|
|
@ -34,13 +34,28 @@ import com.xensource.xenapi.Types.XenAPIException;
|
|||
|
||||
@Local(value=ServerResource.class)
|
||||
public class XcpServerResource extends CitrixResourceBase {
|
||||
public XcpServerResource() {
|
||||
static int _version=-1;
|
||||
public final static int XCP_1_0_0 = 0;
|
||||
public final static int XCP_1_1_0 = 1;
|
||||
|
||||
public XcpServerResource(int version) {
|
||||
super();
|
||||
_version = version;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getGuestOsType(String stdType, boolean bootFromCD) {
|
||||
return CitrixHelper.getXcpGuestOsType(stdType);
|
||||
assert _version < 2 && _version > -1 : "Unknown version for XCP " + _version;
|
||||
if (_version == XCP_1_0_0){
|
||||
return CitrixHelper.getXcp100GuestOsType(stdType);
|
||||
}
|
||||
else if (_version == XCP_1_1_0) {
|
||||
return CitrixHelper.getXcp110GuestOsType(stdType);
|
||||
}
|
||||
else {
|
||||
throw new IllegalStateException("Unknown version for XCP " + _version);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -387,8 +387,11 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
String prodBrand = record.softwareVersion.get("product_brand").trim();
|
||||
String prodVersion = record.softwareVersion.get("product_version").trim();
|
||||
|
||||
if(prodBrand.equals("XCP") && (prodVersion.equals("1.0.0") || prodVersion.equals("1.1.0")))
|
||||
return new XcpServerResource();
|
||||
if(prodBrand.equals("XCP") && prodVersion.equals("1.0.0"))
|
||||
return new XcpServerResource(XcpServerResource.XCP_1_0_0);
|
||||
|
||||
if(prodBrand.equals("XCP") && prodVersion.equals("1.1.0"))
|
||||
return new XcpServerResource(XcpServerResource.XCP_1_1_0);
|
||||
|
||||
if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.0"))
|
||||
return new XenServer56Resource();
|
||||
|
|
|
|||
Loading…
Reference in New Issue