[SOLVED]VMware vSphere multiple datastores deployment failure

Hello.

I am very new to juju so please excuse being a total noob.

I have a single ESXi host added to vCenter Server with three datastores called "SSD 2TB, “SSD 4TB-1” and “SSD 4TB-2”.

After some digging I was able to deploy controller with command juju bootstrap vsphere-cloud-wojcieh juju-cloud-controller --config datastore="SSD 2TB" --config primary-network="vLAN-253-HomeLab01-Kubernetes"

It worked fine. I am now trying to deploy charmed/kubernetes with commands juju add-model k8s followed by juju deploy charmed-kubernetes.

Deployment kind of starts but it is complaining about multiple datastores.

0        down          pending  focal       failed to start machine 0 (no datastore provided and multiple available: "SSD 2TB, SSD 4 TB - 1, SSD 4 TB - 2"), retrying in 10s (9 more attempts)

How can I configure deployment to a desired datastore?

I’ve tried following:

  • juju deploy charmed-kubernetes --constraints root-disk-source="SSD 2TB" but it has error ERROR malformed constraint "2TB"

The --config entries you created for datastore and primary-network were set on the controller model-config, but you’ll need to also apply those to the new model you’re deploying kubernetes into.

There are both model-config and model-defaults that can be modified. model-config works with the configuration of a currently existing model, and model-defaults will apply to any newly defined models. If you intend to create several models in this environment all using the same network and datastore, I’d suggest updating model-defaults as well as any current models.

The following should get you going for your current model:

juju model-config datastore="SSD 2TB" primary-network="vLAN-253-HomeLab01-Kubernetes"
1 Like

Just to mention the command for updating the default as well:

juju model-defaults datastore="SSD 2TB" primary-network="vLAN-253-HomeLab01-Kubernetes"

That will let newly created models also have the same settings. You can also supply

juju bootstrap --model-default datastore=...

So that it applies to all models.

1 Like

Issue is solved. I can start deployment, there is a different error though which I will cover in different post.

Thanks for help.