mirror of https://github.com/apache/cloudstack.git
CS-15081 : set pv-bootloader-args for SUSE PV VM
This commit is contained in:
parent
065eeb6141
commit
4aea70f11f
|
|
@ -21,6 +21,8 @@ import org.apache.log4j.Logger;
|
|||
* Reduce bloat inside CitrixResourceBase
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
public class CitrixHelper {
|
||||
private static final Logger s_logger = Logger.getLogger(CitrixHelper.class);
|
||||
private static final HashMap<String, String> _xcp100GuestOsMap = new HashMap<String, String>(70);
|
||||
|
|
@ -632,4 +634,15 @@ public class CitrixHelper {
|
|||
}
|
||||
return guestOS;
|
||||
}
|
||||
|
||||
public static String getPVbootloaderArgs(String guestOS) {
|
||||
if (guestOS.startsWith("SUSE Linux Enterprise Server")) {
|
||||
if (guestOS.contains("64-bit")) {
|
||||
return " --kernel /boot/vmlinuz-xen --ramdisk /boot/initrd-xen";
|
||||
} else if (guestOS.contains("32-bit")) {
|
||||
return " --kernel /boot/vmlinuz-xenpae --ramdisk /boot/initrd-xenpae";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ public class XenServer56FP1Resource extends XenServer56Resource {
|
|||
record.VCPUsMax = (long) vmSpec.getCpus();
|
||||
record.VCPUsAtStartup = (long) vmSpec.getCpus();
|
||||
record.consoles.clear();
|
||||
|
||||
String pvBootloaderArgs = CitrixHelper.getPVbootloaderArgs(guestOsTypeName);
|
||||
record.PVBootloaderArgs += pvBootloaderArgs;
|
||||
VM vm = VM.create(conn, record);
|
||||
VM.Record vmr = vm.getRecord(conn);
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue