Updated Branches: refs/heads/master 27ce69fd5 -> fac22936f
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 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fac22936 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fac22936 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fac22936 Branch: refs/heads/master Commit: fac22936f645ee0ca2b8a7cdd0c7fa21e8c35666 Parents: 27ce69f Author: Alena Prokharchyk <[email protected]> Authored: Wed Nov 6 15:44:55 2013 -0800 Committer: Alena Prokharchyk <[email protected]> Committed: Wed Nov 6 15:46:57 2013 -0800 ---------------------------------------------------------------------- server/src/com/cloud/vm/UserVmManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fac22936/server/src/com/cloud/vm/UserVmManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 80a4036..2c1343a 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -2749,7 +2749,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } } else { if (hostName == null) { - hostName = uuidName; + //Generate name using uuid and instance.name global config + hostName = _configDao.getValue(Config.InstanceName.key()) + "-" + uuidName; } }
