Controller for vsphere-cloud only uses ESXi host it was bootstrapped on

Same here. Tried everything to get the deployment to a specific host via bundle yaml contraints:

zones=CLUSTERNAME/HOSTFQDN
zones=HOSTFQDN
zones=CLUSTERNAME/HOST
zones=HOST

Nothing worked. Every time a get a
ERROR cannot deploy bundle: cannot create machine for holding etcd unit: cannot add a new machine: availability zone “CLUSTERNAME/HOSTFQDN” not found

Edit: I tried it with “VM/Host Groups” inside the cluster, but it still fails.

1 Like

Hi @panda - are you trying to deploy to a specific host inside a cluster? I don’t think the Juju zones constraint provides a way to specify a specific host inside a cluster - anything after the first slash is interpreted as a resource pool, not a host.

If you’re trying to deploy to a host or cluster, the name used should be whatever is displayed in the vSphere web client for the host/cluster, not the FQDN (unless they happen to be the same).

Yes I try to use a specific host inside a cluster and yes it is the same (display name = dns name)

I don’t think we have a way to specify that in Juju at the moment, sorry!
Could you give me some more details about your situation? Why do you need to deploy to a specific host in the cluster?

One of the reasons is that juju deploys not equally on all available hosts inside a cluster. E. g. I have a 5 node cluster and deploy 10 instances of kubernetes-worker I would assume that every host will get two workers. But I have hosts with 3 workers and hosts with 0 worker and it is quite random which host gets how many.

Another reason is to get more control of where an instance is deployed. From the example above, one of the 5 hosts has less RAM and only one cpu socket instead of 2. Therefore it would be useful if there are less machines on than on the other four. Specifying hosts during deployment would help a lot. Same for if inside the cluster are more hosts than juju should use.

BR

Does the cluster you’re using have DRS automatic placement enabled? At the moment we just specify the cluster’s resource pool and ask vSphere to create a VM there - it determines how that maps to a specific host in the cluster.

It sounds like we need to detect when DRS is off and either do more work to distribute machines across hosts in the cluster ourselves (which gets difficult once you start taking hardware differences into account), or enable specifying a specific host within the cluster and require that the user provides it in that case.

Unfortunately we don’t currently have access to a vSphere instance with a cluster to build this, but it’s being put together at the moment.

What about using tag constraints? Or the --to placement directive.

Given a vSphere host can have a tag added to it, and Juju has the ability to place a unit on a host matching the specified tag (if enabled for the specific cloud), we could do that enablement work for vSphere.