coreos / bugs

Issue tracker for CoreOS Container Linux
https://coreos.com/os/eol/
146 stars 30 forks source link

Unable to boot vagrant with vmware fusion 11 and vagrant 2.2 #2523

Open dcode opened 5 years ago

dcode commented 5 years ago

Issue Report

Bug

Container Linux Version

Never got this far

Environment

VMware Fusion 11 (also tried with 10) MacOS 10.13.6 Vagrant 2.2.0 (also tested with 2.1.4)

Expected Behavior

VM would boot and provision the same as the Virtualbox box.

Actual Behavior

Vagrant is unable to reach the VM via SSH to start the provisioning.

Reproduction Steps

git clone https://github.com/coreos/coreos-vagrant.git
cd coreos-vagrant
cp config.rb{.sample,}
cp user-data{.sample,}
vagrant up --provider vmware_desktop
Installing plugins: vagrant-ignition
Installing the 'vagrant-ignition' plugin. This can take a few minutes...
Fetching: vagrant-ignition-0.0.3.gem (100%)
Installed the plugin 'vagrant-ignition (0.0.3)'!
Installing plugins: vagrant-ignition
Installing the 'vagrant-ignition' plugin. This can take a few minutes...
Installed the plugin 'vagrant-ignition (0.0.3)'!
Installing plugins: vagrant-ignition
# ... (continues to loop until cancelled w/ control + c

I manually installed vagrant-ignition in another directory to get out of the loop. Then I noticed it still wasn't quite working due to changes in vagrant to a unified desktop provider. I then added "vmware_desktop" to each of the vmware blocks. After that, running again produces the following:

vagrant up --provider vmware_desktop
/Users/dcode/Projects/coreos-vagrant/Vagrantfile:21: warning: already initialized constant CLOUD_CONFIG_PATH
/Users/dcode/Projects/coreos-vagrant/Vagrantfile:21: warning: previous definition of CLOUD_CONFIG_PATH was here
/Users/dcode/Projects/coreos-vagrant/Vagrantfile:22: warning: already initialized constant IGNITION_CONFIG_PATH
/Users/dcode/Projects/coreos-vagrant/Vagrantfile:22: warning: previous definition of IGNITION_CONFIG_PATH was here
/Users/dcode/Projects/coreos-vagrant/Vagrantfile:23: warning: already initialized constant CONFIG
/Users/dcode/Projects/coreos-vagrant/Vagrantfile:23: warning: previous definition of CONFIG was here
Bringing machine 'core-01' up with 'vmware_desktop' provider...
==> core-01: Checking if box 'coreos-alpha' is up to date...
==> core-01: Verifying vmnet devices are healthy...
==> core-01: Preparing network adapters...
==> core-01: Starting the VMware VM...
==> core-01: Waiting for the VM to receive an address...
==> core-01: Forwarding ports...
    core-01: -- 22 => 2222
==> core-01: Waiting for machine to boot. This may take a few minutes...
    core-01: SSH address: 127.0.0.1:2222
    core-01: SSH username: core
    core-01: 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.

Other Information

I ended up installing Virtualbox to test and that worked as expected.

luishdez commented 5 years ago

I have exactly the same problem. Ignition plugin says it only works for virtualbox so I guess it fails the ssh key

plkokanov commented 5 years ago

Hello, I have a similar issue. My vagrant version is 2.2.3 I modified https://github.com/coreos/coreos-vagrant/blob/master/Vagrantfile and the machine was able to start. Basically I had to add vmware_desktop to the providers eg: ["vmware_fusion", "vmware_workstation"] -> ["vmware_fusion", "vmware_workstation", "vmware_desktop"]. However, it takes around 30 minutes for the CoreOS kernel to boot.