hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.33k stars 4.44k forks source link

vagrant up timeout (WSL) #12065

Open mcandre opened 4 years ago

mcandre commented 4 years ago

Hi, I am able to use my boxes in native Windows hosts, and in native Linux hosts, and in native macOS hosts. However, when I try to vagrant up in WSL, then the SSH connection always times out.

Box: mcandre/vagrant-centos-vera

Vagrant 2.2.14

WSL 2 (Ubuntu 20.04 distro)

Windows 10

chrisroberts commented 4 years ago

Hi there,

Thank you for opening an issue. However, there is not enough information here to reproduce or provide a recommendation. When you first open an issue, a template is pre-filled in the box. That template provides instructions for getting your host and guest information, the version of Vagrant, and the debug output. Without that information, it is very challenging for us to assist you.

Please supply that information either by updating this ticket or by closing this ticket and opening a new one. Thank you! 😄

nmofonseca commented 3 years ago

Hello @chrisroberts, I am also facing this issue and this is also described in other issues, there is quite a few after searching for WSL with the same problem for WSL2.

On my Scenarion I have: Windows 10 Enterprise: 1909 OS build: 18363.1316 VirtualBox: 6.1.16 WSL2 Ubuntu 20.04

This is my Vagrant file:

-*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    config.vm.box = "geerlingguy/centos7"
    config.ssh.insert_key = false
    #config.vm.synced_folder ".", "/vagrant", disabled: true
    config.vm.provision "ansible_local" do |ansible|
        ansible.verbose =  "v"
        ansible.galaxy_command = "sudo ansible-galaxy collection install ansible.posix"
        ansible.playbook = "/vagrant/playbook.yml"
    end
    # rketest server
    config.vm.define "rketest" do |rke|
        rke.vm.hostname = "rketest"
        rke.vm.network "private_network", ip: "192.168.60.4"
        rke.vm.provider :virtualbox do |v|
            v.memory = 6144
            v.linked_clone = true
        end
    end
 end

When I do vagrant up ssh connection timesout