mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-2823: try passCmdLine some times if kernel < 2.6.34 and qemu < 1.1.0 on hypervisor (for instance, CentOS 6.4)
This commit is contained in:
parent
bdc7e4ce33
commit
dc9f7290e8
@ -3318,8 +3318,22 @@ ServerResource {
|
|||||||
|
|
||||||
// pass cmdline info to system vms
|
// pass cmdline info to system vms
|
||||||
if (vmSpec.getType() != VirtualMachine.Type.User) {
|
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)
|
||||||
|
for (int count = 0; count < 10; count ++) {
|
||||||
|
passCmdLine(vmName, vmSpec.getBootArgs());
|
||||||
|
try {
|
||||||
|
Thread.sleep(5000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
s_logger.trace("Ignoring InterruptedException.", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
passCmdLine(vmName, vmSpec.getBootArgs() );
|
passCmdLine(vmName, vmSpec.getBootArgs() );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
state = State.Running;
|
state = State.Running;
|
||||||
return new StartAnswer(cmd);
|
return new StartAnswer(cmd);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user