rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 655 forks source link

Rancher OS issues with vmwareworkstation driver #1483

Open fighne opened 7 years ago

fighne commented 7 years ago

So running

$> docker-machine create --driver=vmwareworkstation vm-base the above works fine $> docker-machine create -d virtualbox --virtualbox-boot2docker-url https://releases.rancher.com/os/latest/rancheros.iso vb-rancher the above works fine docker-machine create--driver=vmwareworkstation --vmwareworkstation-boot2docker-url https://releases.rancher.com/os/latest/rancheros.iso vm-rancher doesn't work fine ?? VMware Workstation 12, running on Windows 7 Enterprise, docker-machine v0.8.2

joshwget commented 7 years ago

Can you post a bit more details about what isn't working as expected?

fighne commented 7 years ago

I'm unable to connect to the dockerd, having looked at the ps listing it would appear that the service is not correctly configured and that the certificates have not been transferred! I've opened up an issue on the vmwareworkstation driver list to and there is information there as well.

fighne commented 7 years ago

Ok been in conversation with the creator of the vmwareworkstation driver. He says that the ISO image has to have the VMWare tools installed for it to be able to complete the linking. Do you know if there is any isssues with using RancherOS with the ESXi server?

joshwget commented 7 years ago

The VMware tools package is available as an option system service. They aren't included in the ISO by default which is causing this issue.

It's possible to build a custom ISO that includes this service by default, but I'm not sure if we'd want to add that extra maintenance step for each release. @SvenDowideit is working on improving customizations for scenarios just like this, so it might be more feasible down the line.

fighne commented 7 years ago

Hi Josh, so how do I enable an 'option system service' ? Please. Can I enable them after booting, and then try to connect via docker-machine?

broesch commented 7 years ago

I'm having similar issues using the vsphere driver. I tried:

sudo ros service enable open-vm-tools

but still no IP and vpshere reports that the tools are not running. Settings don't stick after reboot. Probably I'm doing something wrong...

SvenDowideit commented 7 years ago

can you please try https://github.com/rancher/os/releases/tag/v0.8.0-rc5 ? this rc should make the machine work, and after that - http://docs.rancher.com/os/system-services/adding-system-services/ should help you enable the open-vm-tools

denji commented 7 years ago

@SvenDowideit It looks like it does not fix the problem DHCP, still not available:

% docker version
Client:
 Version:      1.13.0
 API version:  1.25
 Go version:   go1.7.4
 Git commit:   49bf474
 Built:
 OS/Arch:      darwin/amd64

% docker-machine --version
docker-machine version 0.9.0, build 15fd4c7

% sw_vers
ProductName:    Mac OS X
ProductVersion: 10.12.3
BuildVersion:   16D30a

% docker-machine --debug create \
    --driver vmwarefusion --vmwarefusion-memory-size 2048 \
    --vmwarefusion-boot2docker-url='https://github.com/rancher/os/releases/download/v0.8.0-rc5/rancheros.iso' \
    vmware-rancheros

(vmware-rancheros) Downloading /Users/denji/.docker/machine/cache/boot2docker.iso from https://github.com/rancher/os/releases/download/v0.8.0-rc5/rancheros.iso...
(vmware-rancheros) 0%....10%....20%....30%....40%....50%....60%....70%....80%....90%....100%
(vmware-rancheros) Creating SSH key...
(vmware-rancheros) Creating VM...
(vmware-rancheros) Creating disk '/Users/denji/.docker/machine/machines/vmware-rancheros/vmware-rancheros.vmdk'
(vmware-rancheros) Virtual disk creation successful.
(vmware-rancheros) Starting vmware-rancheros...
(vmware-rancheros) DBG | executing: /Applications/VMware Fusion.app/Contents/Library/vmrun start /Users/denji/.docker/machine/machines/vmware-rancheros/vmware-rancheros.vmx nogui
(vmware-rancheros) Waiting for VM to come online...
(vmware-rancheros) DBG | executing: /Applications/VMware Fusion.app/Contents/Library/vmrun list
(vmware-rancheros) DBG | MAC address in VMX: 00:0c:29:d1:94:cc
(vmware-rancheros) DBG | Trying to find IP address in configuration file: /Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf
(vmware-rancheros) DBG | Following IPs found map[00:50:56:c0:00:01:192.168.180.1]
(vmware-rancheros) DBG | Trying to find IP address in configuration file: /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf
(vmware-rancheros) DBG | Following IPs found map[00:50:56:c0:00:08:172.16.37.1]
(vmware-rancheros) DBG | Trying to find IP address in leases file: /var/db/vmware/vmnet-dhcpd-vmnet1.leases
(vmware-rancheros) DBG | Trying to find IP address in leases file: /var/db/vmware/vmnet-dhcpd-vmnet8.leases
(vmware-rancheros) DBG | IP found in DHCP lease table: 172.16.37.128
(vmware-rancheros) DBG | Got an ip: 172.16.37.128
(vmware-rancheros) DBG | SSH Daemon not responding yet: dial tcp 172.16.37.128:22: i/o timeout
(vmware-rancheros) DBG | executing: /Applications/VMware Fusion.app/Contents/Library/vmrun list
(vmware-rancheros) DBG | MAC address in VMX: 00:0c:29:d1:94:cc
(vmware-rancheros) DBG | Trying to find IP address in configuration file: /Library/Preferences/VMware Fusion/vmnet1/dhcpd.conf
(vmware-rancheros) DBG | Following IPs found map[00:50:56:c0:00:01:192.168.180.1]
(vmware-rancheros) DBG | Trying to find IP address in configuration file: /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf
(vmware-rancheros) DBG | Following IPs found map[00:50:56:c0:00:08:172.16.37.1]
(vmware-rancheros) DBG | Trying to find IP address in leases file: /var/db/vmware/vmnet-dhcpd-vmnet1.leases
(vmware-rancheros) DBG | Trying to find IP address in leases file: /var/db/vmware/vmnet-dhcpd-vmnet8.leases
(vmware-rancheros) DBG | IP found in DHCP lease table: 172.16.37.128
(vmware-rancheros) DBG | Got an ip: 172.16.37.128
(vmware-rancheros) DBG | SSH Daemon not responding yet: dial tcp 172.16.37.128:22: i/o timeout
(vmware-rancheros) DBG | IP found in DHCP lease table: 172.16.37.128
(vmware-rancheros) DBG | Got an ip: 172.16.37.128
(vmware-rancheros) DBG | Creating Tar key bundle...
(vmware-rancheros) DBG | executing: /Applications/VMware Fusion.app/Contents/Library/vmrun -gu docker -gp tcuser directoryExistsInGuest /Users/denji/.docker/machine/machines/vmware-rancheros/vmware-rancheros.vmx /var/lib/boot2docker
joshwget commented 7 years ago

@SvenDowideit This is a different Docker Machine issue that has always been the case with RancherOS. The problem here is that open-vm-tools is not included in the default ISO.

SvenDowideit commented 7 years ago

ah :/

bestrand commented 7 years ago

Is it possible to build a custom ISO with a modified "os-config.tpl.yml" file containing the commands "ros service enable open-vm-tools" and "ros service up open-vm-tools" so they can run on boot?

After checking the boot sequence I was thinking of adding it to "preload-user-images", but I am not too familiar with the sequence so this might be way off.

mvlintho commented 7 years ago

I'm trying the same thing but i get a different error/result;

transitioning": "error", "transitioningMessage": "Error in driver during machine creation: 502 Proxy Error", "transitioningProgress": null, "vmwarevsphereConfig": { "boot2dockerUrl": "https://releases.rancher.com/os/latest/rancheros.iso",

When executing a default install (boot2docker is used) there are no issues.

SvenDowideit commented 7 years ago

in v1.1.0, RancherOS will auto-detect vmware, and automatically load open-vm-tools - you might like to try out https://github.com/rancher/os/releases/tag/v1.1.0-rc2 - it works for me with vmware esxi, and I'd love to know how it goes for you :)

@mvlintho I've not see that error before - interesting!

mvlintho commented 7 years ago
vm_rancheros_msg

@SvenDowideit I have upgraded rancher to 1.6.7 and am using rancheros v1.1.0-rc2 which you've suggested. I no longer get the proxy error but I'm stuck at:

Error detecting OS: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded

With the latest boot2docker iso everything works :-)

SvenDowideit commented 7 years ago

yeah #1750 suggests there are still issues, even when you update to the latest docker-machine (which contains fixes that make things "work for me"

sur1v commented 7 years ago

Same issue here using vsphere machine driver to deploy to vcenter with Rancher 1.6.8, it boots and start openvm tools but rancher time out looking for ssh, no drama with boot2docker.

image

SvenDowideit commented 7 years ago

did you upgrade the docker-machine on your Rancher Server to v0.12.2? there are some associated fixes that are needed.

lachnerd commented 7 years ago

Hi, has anyone got this working? I'd like to run rancheros (1.10) iso with VMWare on Rancher v1.6.5 but i keep getting this Errors:

Error detecting OS: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded

What exactly do you mean with "docker-machine on your Rancher Server to v0.12.2" do i have to upgrade to latest rancher version ?

bestrand commented 7 years ago

@lachnerd Yea I think you need to upgrade, but I am not sure how high. I have tried with docker-machine (v0.12.2) directly to VMware with RancherOS 1.1.0 and that works, but not from Rancher UI / Server (gonna upgrade soon). I am running Rancher Server 1.6.7 and under the vmware machine driver in the API it seems it is using v0.10.0-pre1 of the machine-package:

"schemaVersion": "https://github.com/rancher/machine-package/releases/download/v0.10.0- pre1/docker-machine.tar.gz",

You can find this info under /v2-beta/machinedrivers and search for vmwarevsphere, or just click "View in API" on the driver.

The latest release in the machine-package repo is "v0.12.2", and one of the files has "build_machine_binary 'https://github.com/docker/machine' 'v0.12.2'", so I am soon gonna upgrade Rancher Server to figure out if any of the rancher releases above 1.6.7 has this new machine package.

matt-benett commented 7 years ago

@golvteppe Did you work out how to do this upgrade?

bestrand commented 6 years ago

@matt-benett Sry for late response, but I just got one VM up and running with rancheros v1.1.0 tonight without any modifications in the iso. I upgraded to Rancher v1.6.12, and provisioned one VM through the rancher cli.

Rancher v1.6.12 has the v0.12.2 machine-package now for vsphere driver, but I am not sure when it was added. I checked v1.6.10 (stable) a while back but I dont think that version had the correct docker-machine version for the vsphere driver for this to work.