mirror of https://github.com/apache/cloudstack.git
master - Bug ID: CLOUDSTACK-369. Unable to add XenServer 6.1 to cloudstack. Created a new resource for XS 6.1. Also introduced a guest map for the list of supported os.
Signed-off-by: Devdeep Singh <devdeep.singh@citrix.com> Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
This commit is contained in:
parent
238c55fb6e
commit
5405242674
|
|
@ -70,6 +70,7 @@ import com.cloud.hypervisor.xen.resource.XenServer56Resource;
|
|||
import com.cloud.hypervisor.xen.resource.XenServer56SP2Resource;
|
||||
import com.cloud.hypervisor.xen.resource.XenServer600Resource;
|
||||
import com.cloud.hypervisor.xen.resource.XenServer602Resource;
|
||||
import com.cloud.hypervisor.xen.resource.XenServer610Resource;
|
||||
import com.cloud.hypervisor.xen.resource.XenServerConnectionPool;
|
||||
import com.cloud.resource.Discoverer;
|
||||
import com.cloud.resource.DiscovererBase;
|
||||
|
|
@ -436,9 +437,9 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
|
||||
if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.2"))
|
||||
return new XenServer602Resource();
|
||||
|
||||
if (prodBrand.equals("XenServer") && prodVersion.startsWith("6.0.9"))
|
||||
return new XenServer602Resource();
|
||||
|
||||
if (prodBrand.equals("XenServer") && prodVersion.equals("6.1.0"))
|
||||
return new XenServer610Resource();
|
||||
|
||||
if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.100")) {
|
||||
String prodVersionTextShort = record.softwareVersion.get("product_version_text_short").trim();
|
||||
|
|
@ -448,18 +449,18 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
return new XenServer56FP1Resource();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (prodBrand.equals("XCP_Kronos")) {
|
||||
return new XcpOssResource();
|
||||
}
|
||||
|
||||
String msg = "Only support XCP 1.0.0, 1.1.0, 1.5 beta; XenServer 5.6, XenServer 5.6 FP1, XenServer 5.6 SP2, Xenserver 6.0, 6.0.2, 6.0.9 but this one is " + prodBrand + " " + prodVersion;
|
||||
_alertMgr.sendAlert(AlertManager.ALERT_TYPE_HOST, dcId, podId, msg, msg);
|
||||
s_logger.debug(msg);
|
||||
throw new RuntimeException(msg);
|
||||
|
||||
String msg = "Only support XCP 1.0.0, 1.1.0, 1.5 beta; XenServer 5.6, XenServer 5.6 FP1, XenServer 5.6 SP2, Xenserver 6.0, 6.0.2, 6.1.0 but this one is " + prodBrand + " " + prodVersion;
|
||||
_alertMgr.sendAlert(AlertManager.ALERT_TYPE_HOST, dcId, podId, msg, msg);
|
||||
s_logger.debug(msg);
|
||||
throw new RuntimeException(msg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void serverConfig() {
|
||||
String value = _params.get(Config.XenSetupMultipath.key());
|
||||
_setupMultipath = Boolean.parseBoolean(value);
|
||||
|
|
@ -589,8 +590,8 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
resource = XenServer600Resource.class.getName();
|
||||
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.2")) {
|
||||
resource = XenServer602Resource.class.getName();
|
||||
} else if (prodBrand.equals("XenServer") && prodVersion.startsWith("6.0.9")) {
|
||||
resource = XenServer602Resource.class.getName();
|
||||
} else if (prodBrand.equals("XenServer") && prodVersion.equals("6.1.0")) {
|
||||
resource = XenServer610Resource.class.getName();
|
||||
} else if(prodBrand.equals("XenServer") && prodVersion.equals("5.6.100")) {
|
||||
String prodVersionTextShort = details.get("product_version_text_short").trim();
|
||||
if("5.6 SP2".equals(prodVersionTextShort)) {
|
||||
|
|
@ -603,7 +604,7 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L
|
|||
}
|
||||
|
||||
if( resource == null ){
|
||||
String msg = "Only support XCP 1.0.0, 1.1.0, 1.5 beta; XenServer 5.6, 5.6 FP1, 5.6 SP2 and Xenserver 6.0 , 6.0.2, 6.0.9 but this one is " + prodBrand + " " + prodVersion;
|
||||
String msg = "Only support XCP 1.0.0, 1.1.0, 1.5 beta; XenServer 5.6, 5.6 FP1, 5.6 SP2 and Xenserver 6.0 , 6.0.2, 6.1.0 but this one is " + prodBrand + " " + prodVersion;
|
||||
s_logger.debug(msg);
|
||||
throw new RuntimeException(msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ public class CitrixHelper {
|
|||
private static final HashMap<String, String> _xenServer56FP2GuestOsMap = new HashMap<String, String>(70);
|
||||
private static final HashMap<String, String> _xenServer600GuestOsMap = new HashMap<String, String>(70);
|
||||
private static final HashMap<String, String> _xenServer602GuestOsMap = new HashMap<String, String>(70);
|
||||
private static final HashMap<String, String> _xenServer610GuestOsMap = new HashMap<String, String>(70);
|
||||
private static final ArrayList<String> _guestOsList = new ArrayList<String>(70);
|
||||
|
||||
|
||||
|
|
@ -554,6 +555,134 @@ public class CitrixHelper {
|
|||
_xenServer602GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)");
|
||||
}
|
||||
|
||||
static {
|
||||
_xenServer610GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6.0 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6.0 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 6.1 (32-bit)", "CentOS 6.1 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 6.1 (64-bit)", "CentOS 6.1 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 6.2 (32-bit)", "CentOS 6.2 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("CentOS 6.2 (64-bit)", "CentOS 6.2 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6.0 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6.0 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.1 (32-bit)", "Oracle Enterprise Linux 6.1 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.1 (64-bit)", "Oracle Enterprise Linux 6.1 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.2 (32-bit)", "Oracle Enterprise Linux 6.2 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.2 (64-bit)", "Oracle Enterprise Linux 6.2 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6.0 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6.0 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", "Red Hat Enterprise Linux 6.1 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", "Red Hat Enterprise Linux 6.1 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", "Red Hat Enterprise Linux 6.2 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", "Red Hat Enterprise Linux 6.2 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows 8 (32-bit)", "Windows 8 (32-bit) (experimental)");
|
||||
_xenServer610GuestOsMap.put("Windows 8 (64-bit)", "Windows 7 (64-bit) (experimental)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 PAE (32-bit)", "Windows Server 2003 PAE (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows Server 8 (64-bit)", "Windows Server 8 (64-bit) (experimental)");
|
||||
_xenServer610GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)");
|
||||
_xenServer610GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)");
|
||||
_xenServer610GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)");
|
||||
_xenServer610GuestOsMap.put("Other Linux (32-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other Linux (64-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other (32-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other (64-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other CentOS (32-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other CentOS (64-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media");
|
||||
_xenServer610GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)");
|
||||
_xenServer610GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)");
|
||||
}
|
||||
|
||||
public static String getXcpGuestOsType(String stdType) {
|
||||
String guestOS = _xcp100GuestOsMap.get(stdType);
|
||||
if (guestOS == null) {
|
||||
|
|
@ -636,4 +765,18 @@ public class CitrixHelper {
|
|||
}
|
||||
return guestOS;
|
||||
}
|
||||
|
||||
public static String getXenServer610GuestOsType(String stdType, boolean bootFromCD) {
|
||||
String guestOS = _xenServer610GuestOsMap.get(stdType);
|
||||
if (guestOS == null) {
|
||||
if (!bootFromCD) {
|
||||
s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 6.1.0 guestOS type, start it as HVM guest");
|
||||
guestOS = "Other install media";
|
||||
} else {
|
||||
String msg = "XenServer 6.1.0 DOES NOT support Guest OS type " + stdType;
|
||||
s_logger.warn(msg);
|
||||
}
|
||||
}
|
||||
return guestOS;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.hypervisor.xen.resource;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ejb.Local;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.resource.ServerResource;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.script.Script;
|
||||
|
||||
|
||||
@Local(value=ServerResource.class)
|
||||
public class XenServer610Resource extends XenServer56FP1Resource {
|
||||
private static final Logger s_logger = Logger.getLogger(XenServer610Resource.class);
|
||||
|
||||
public XenServer610Resource() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getGuestOsType(String stdType, boolean bootFromCD) {
|
||||
return CitrixHelper.getXenServer602GuestOsType(stdType, bootFromCD);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<File> getPatchFiles() {
|
||||
List<File> files = new ArrayList<File>();
|
||||
String patch = "scripts/vm/hypervisor/xenserver/xenserver60/patch";
|
||||
String patchfilePath = Script.findScript("" , patch);
|
||||
if (patchfilePath == null) {
|
||||
throw new CloudRuntimeException("Unable to find patch file " + patch);
|
||||
}
|
||||
File file = new File(patchfilePath);
|
||||
files.add(file);
|
||||
return files;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue