diff --git a/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java b/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java index 426145d9dcc5..87746447188d 100644 --- a/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java +++ b/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java @@ -72,7 +72,7 @@ private String getLinstorRscName(String name) { private String getHostname() { // either there is already some function for that in the agent or a better way. - ProcessBuilder pb = new ProcessBuilder("/usr/bin/hostname"); + ProcessBuilder pb = new ProcessBuilder("hostname"); try { String result; @@ -88,7 +88,7 @@ private String getHostname() { return result.trim(); } catch (IOException | InterruptedException exc) { Thread.currentThread().interrupt(); - throw new CloudRuntimeException("Unable to run '/usr/bin/hostname' command."); + throw new CloudRuntimeException("Unable to run 'hostname' command."); } }