Skip to content

Commit fac2293

Browse files
author
Alena Prokharchyk
committed
CLOUDSTACK-4979: if no hostName is passed to deployVm call, automatically generated hostName follows the pattern <instance.id global config>-<randomly generated uuid>.
Example: VM-a6c6457e-e4d0-486f-a392-9239be9b36f5
1 parent 27ce69f commit fac2293

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎server/src/com/cloud/vm/UserVmManagerImpl.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,8 @@ protected UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOf
27492749
}
27502750
} else {
27512751
if (hostName == null) {
2752-
hostName = uuidName;
2752+
//Generate name using uuid and instance.name global config
2753+
hostName = _configDao.getValue(Config.InstanceName.key()) + "-" + uuidName;
27532754
}
27542755
}
27552756

0 commit comments

Comments
 (0)