Docker Community Forums

Share and learn in the Docker community.

Docker-machine cant create vsphere containers, NoPermission


(Carlmanning) #1

Hi im having issues using the docker-machine create function. Im trying to create a container t run on vmware vsphere 6 but i get an error of NoPermission even though i can.

my command
docker-machine -D create -d vmwarevsphere --vmwarevsphere-username=username@vsphere.local --vmwarevsphere-password=passwordthatcontainspunctuation --vmwarevsphere-compute-ip=10.21.15.2 --vmwarevsphere-datastore=“VMFS_DEV_001” --vmwarevsphere-vcenter=10.21.15.100 --vmwarevsphere-network=VLAN710-Development --vmwarevsphere-datacenter=Development tdocker15

Output
INFO[0000] Generating SSH Keypair…
INFO[0000] Uploading Boot2docker ISO …
DEBU[0000] govcOutErr executing: govc datastore.ls --u=username@vsphere.local:passwordthatcontainspunctuation@10.21.15.100 --k=true --ds=VMFS_DEV_001 --dc=Development boot2docker-iso
INFO[0000] Creating directory boot2docker-iso on datastore VMFS_DEV_001 of vCenter 10.21.15.100…
DEBU[0000] govcOutErr executing: govc datastore.mkdir --u=username@vsphere.local:passwordthatcontainspunctuation@10.21.15.100 --k=true --ds=VMFS_DEV_001 --dc=Development boot2docker-iso
ERRO[0000] Error creating machine: Unable to mkdir on datastore VMFS_DEV_001 due to Error: NoPermission

I have the permissions in the client of vsphere so its something to do with the way the govc is interrogating vmware.
I think it may be to do with the way the final url is being constructed in the govc command i came to this conclusion when i ran the govc command outside of docker-machine and i had a bash error because there was an ! in the password.
i have tried escaping everything but to no luck. i am returned NoPermmision from govc everytime.

I can change the password but it must have punctuation in, i cannot change the username which must be name@vsphere.local.
This is how the url is constructed myname@vsphere.local:my.password@the.ip.add.ress

I may be barking up the wrong tree but hopefully someone can help me?


(Carlmanning) #2

The issue has been found and being looked at by the govc developer here: https://github.com/vmware/govmomi/issues/251