mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CLOUDSTACK-2823: pass cmdline info to system vms for 30 times
This commit is contained in:
parent
ca5c800f8d
commit
4eedfe53fc
@ -3834,12 +3834,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
||||
|
||||
// pass cmdline info to system vms
|
||||
if (vmSpec.getType() != VirtualMachine.Type.User) {
|
||||
if ((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)
|
||||
//wait for 5 minutes at most
|
||||
//wait and try passCmdLine for 5 minutes at most for CLOUDSTACK-2823
|
||||
String controlIp = null;
|
||||
for (NicTO nic : nics) {
|
||||
if (nic.getType() == TrafficType.Control) {
|
||||
controlIp = nic.getIp();
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (int count = 0; count < 30; count++) {
|
||||
@ -3850,9 +3850,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
passCmdLine(vmName, vmSpec.getBootArgs());
|
||||
}
|
||||
}
|
||||
|
||||
state = DomainState.VIR_DOMAIN_RUNNING;
|
||||
|
||||
@ -117,7 +117,7 @@ get_boot_params() {
|
||||
if [ ! -e /dev/vport0p1 ]; then
|
||||
log_it "/dev/vport0p1 not loaded, perhaps guest kernel is too old." && exit 2
|
||||
fi
|
||||
while [$cmd -eq ""]; do
|
||||
while [ -z "$cmd" ]; do
|
||||
while read line; do
|
||||
if [[ $line == cmdline:* ]]; then
|
||||
cmd=${line//cmdline:/}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user