Problems provisioning Host on vsphere

When provisioning an rancheros host with docker-machine using --vmwarevsphere-boot2docker-url https://releases.rancher.com/os/latest/rancheros.iso it is stuck on:

Waiting for VMware Tools to come online…

It seems, that open-vm-tools are not launching by default. Is Rancheros not supported on vsphere?

Any help will be appreciated
Thanks

This sounds like the same as https://github.com/rancher/os/issues/1483. RancherOS should work well on vpshere though. You can install via the normal installation method and then use the open-vm-tools service.

Or… can RancherOS come default with open-VMware-tools?

Is there an issue to do so? This issue also affects me (and enterprise users).

I’m trying to build my own iso as suggested here Rancher OS issues with vmwareworkstation driver · Issue #1483 · rancher/os · GitHub
I cloned the repo, modified os-config.tpl.yml, adding the following to the services section:

    open-vm-tools:
      image: rancher/os-openvmtools:v0.8.0-rc1
      command: /usr/bin/vmtoolsd
      privileged: true
      labels:
        io.rancher.os.scope: system
      restart: always
      pid: host
      ipc: host
      net: host
      uts: host
      volumes_from:
      - command-volumes
      - system-volumes

Would this be the correct approach?

Because it doesn’t seem to be working. After building the iso, using it with docker-machine to provision the host I eventually get:

Error creating machine: Error in driver during machine creation: ServerFaultCode: Failed to authenticate with the guest operating system using the supplied credentials.

In the vpshere event log I see:

Guest operation authentication failed for operation Initiate File Transfer To Guest on Virtual machine …

The VM has an IP and reports that the vmware-tools are running, but it is unusable for docker-machine…

I posted a more general question here:

as I’m not sure if this issue is related to the service not benign launched correctly, or have to to with vsphere…

I have actually solved it the problem was that when using docker-machine with the vshpere driver, vsphere connects to the open-vm-tools in order to transfer userdata.tar(ssh keys, etc.). This connections is using the username:pass docker:tcuser which had to be created in the container running open-vm-tools. (I had to hack some other details related to docker-machine expecting boot2docker and not rancher), but it is working now. Kind of…

The Host can be created (even from the Rancher web interface) and container can run etc., but the disk is not formatted…
Here is what I found out:
A magic string is added to the partition from docker-machine for several drivers, but not for vsphere. RancherOS (as well as boot2docker) looks for this string to format the right disk. It is not found, so no disk is formatted

So now I’m trying to hack it so that it formats the correct disk, similar what boot2docker does here:
https://github.com/boot2docker/boot2docker/blob/master/rootfs/rootfs/etc/rc.d/automount
, but it fails with the following errors:

It comes from init.go where it tries to set the configuration on which disk to format. Somehow it seems /var/lib/rancher/conf is empty at this moment…
On boot2docker this part works fine…
To reproduce just add

boot2DockerEnvironment = true
cfg.Rancher.State.Dev = “LABEL=B2D_STATE”
cfg.Rancher.State.Autoformat = string{“/dev/sda”}

to line 270 of init/init.go

I’m using Tag 0.7.1 as I had issues creating a working iso on master (even for boot2docker)

Any hints that could help me solve it would be appreciated.

Once it’s working I’ll happily share the modifications/images. For the issue at hand it is just not relevant and it still needs some cleaning up, as it it still is a proof of concept.