pires / kubernetes-vagrant-coreos-cluster

Kubernetes cluster (for testing purposes) made easy with Vagrant and CoreOS.
Apache License 2.0
597 stars 205 forks source link

Timed out while waiting for the machine to boot #293

Closed JimmyCYJ closed 6 years ago

JimmyCYJ commented 6 years ago

I get this failure when I try to set up Kubernetes with vagrant. I am using Ubuntu 16.04, vagrant 2.0.3, virtualbox 5.2.8r121009. Can any one take a look at this issue?

$ sudo vagrant up Bringing machine 'master' up with 'virtualbox' provider... Bringing machine 'node-01' up with 'virtualbox' provider... Bringing machine 'node-02' up with 'virtualbox' provider... ==> master: Running triggers before up... ==> master: 2018-04-02 15:47:23 -0700: setting up Kubernetes master... ==> master: Setting Kubernetes version 1.9.6 ==> master: Importing base box 'coreos-alpha'... ==> master: Matching MAC address for NAT networking... ==> master: Checking if box 'coreos-alpha' is up to date... ==> master: Setting the name of the VM: kubernetes-vagrant-coreos-cluster_master_1522709246002_19452 ==> master: Fixed port collision for 22 => 2222. Now on port 2202. ==> master: Clearing any previously set network interfaces... ==> master: Preparing network interfaces based on configuration... master: Adapter 1: nat master: Adapter 2: hostonly ==> master: Forwarding ports... master: 22 (guest) => 2202 (host) (adapter 1) ==> master: Running 'pre-boot' VM customizations... ==> master: Booting VM... ==> master: Waiting for machine to boot. This may take a few minutes... master: SSH address: 127.0.0.1:2202 master: SSH username: core master: SSH auth method: private key Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes. Verify that authentication configurations are also setup properly, as well.

If the box appears to be booting properly, you may want to increase the timeout ("config.vm.boot_timeout") value.

JimmyCYJ commented 6 years ago

Now I make this change to Vagrantfile CHANNEL = ENV['CHANNEL'] || 'stable'

It fails at mounting NFS shared folders:

==> master: Mounting NFS shared folders... The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!

mount -o vers=3,udp,nolock,vers=3,udp,noatime 172.17.8.1:/usr/local/google/home/yinjie/go/src/istio.io/kubernetes-vagrant-coreos-cluster /vagrant

Stdout from the command:

Stderr from the command:

mount.nfs: requested NFS version or transport protocol is not supported

bmcustodio commented 6 years ago

@JimmyCYJ can you please check whether the https://github.com/pires/kubernetes-vagrant-coreos-cluster/tree/vbox-kvm branch fixes your original issue?

Edit: It seems @peterfraedrich had already suggested doing this, but only came across their comment now. Let's move the discussion there.

bmcustodio commented 6 years ago

Duplicate of #282.