diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtStartCommandWrapper.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtStartCommandWrapper.java index da9f1f3b3d1a..4fa6aaafdc78 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtStartCommandWrapper.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtStartCommandWrapper.java @@ -116,7 +116,7 @@ public Answer execute(final StartCommand command, final LibvirtComputingResource } } // try to patch and SSH into the systemvm for up to 5 minutes - for (int count = 0; count < 10; count++) { + for (int count = 0; count < 30; count++) { // wait and try passCmdLine for 30 seconds at most for CLOUDSTACK-2823 libvirtComputingResource.passCmdLine(vmName, vmSpec.getBootArgs()); // check router is up? diff --git a/server/src/main/java/com/cloud/server/ConfigurationServerImpl.java b/server/src/main/java/com/cloud/server/ConfigurationServerImpl.java index 68c12333c5e3..238171f4db3c 100644 --- a/server/src/main/java/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/main/java/com/cloud/server/ConfigurationServerImpl.java @@ -620,7 +620,7 @@ public void updateKeyPairs() { s_logger.error("Cannot read the private key file", e); throw new CloudRuntimeException("Cannot read the private key file"); } - String privateKey = new String(arr1).trim(); + String privateKey = new String(arr1).trim() + "\n"; byte[] arr2 = new byte[4094]; // configuration table column value size try (DataInputStream dis = new DataInputStream(new FileInputStream(pubkeyfile))) { dis.readFully(arr2); @@ -630,7 +630,7 @@ public void updateKeyPairs() { s_logger.warn("Cannot read the public key file", e); throw new CloudRuntimeException("Cannot read the public key file"); } - String publicKey = new String(arr2).trim(); + String publicKey = new String(arr2).trim() + "\n"; final String insertSql1 = "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " +