mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2823: move kernelVersion to global configuration in LibvirtComputingResource.java
This commit is contained in:
parent
6e85ae219b
commit
564c30a040
|
|
@ -289,6 +289,7 @@ ServerResource {
|
|||
private int _migrateSpeed;
|
||||
|
||||
private long _hvVersion;
|
||||
private long _kernelVersion;
|
||||
private KVMHAMonitor _monitor;
|
||||
private final String _SSHKEYSPATH = "/root/.ssh";
|
||||
private final String _SSHPRVKEYPATH = _SSHKEYSPATH + File.separator
|
||||
|
|
@ -846,6 +847,10 @@ ServerResource {
|
|||
storageProcessor.configure(name, params);
|
||||
storageHandler = new StorageSubsystemCommandHandlerBase(storageProcessor);
|
||||
|
||||
String unameKernelVersion = Script.runSimpleBashScript("uname -r");
|
||||
String[] kernelVersions = unameKernelVersion.split("[\\.\\-]");
|
||||
_kernelVersion = Integer.parseInt(kernelVersions[0]) * 1000 * 1000 + Integer.parseInt(kernelVersions[1]) * 1000 + Integer.parseInt(kernelVersions[2]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -3312,10 +3317,7 @@ ServerResource {
|
|||
|
||||
// pass cmdline info to system vms
|
||||
if (vmSpec.getType() != VirtualMachine.Type.User) {
|
||||
String unameKernelVersion = Script.runSimpleBashScript("uname -r");
|
||||
String[] kernelVersions = unameKernelVersion.split("[\\.\\-]");
|
||||
long kernelVersion = Integer.parseInt(kernelVersions[0]) * 1000 * 1000 + Integer.parseInt(kernelVersions[1]) * 1000 + Integer.parseInt(kernelVersions[2]);
|
||||
if ((kernelVersion < 2006034) && (conn.getVersion() < 1001000)) { // CLOUDSTACK-2823: try passCmdLine some times if kernel < 2.6.34 and qemu < 1.1.0 on hypervisor (for instance, CentOS 6.4)
|
||||
if ((_kernelVersion < 2006034) && (conn.getVersion() < 1001000)) { // CLOUDSTACK-2823: try passCmdLine some times if kernel < 2.6.34 and qemu < 1.1.0 on hypervisor (for instance, CentOS 6.4)
|
||||
for (int count = 0; count < 10; count ++) {
|
||||
passCmdLine(vmName, vmSpec.getBootArgs());
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue