0
votes

I'm running Windows 10 (version 2004, build 19041.388) where I have Vagrant and Virtualbox installed locally. For Laravel development, I'd like to use Homestead, since it's an easy way to set up. For other development I have WSL2 installed.

Everytime I wanna start up the Homestead VM I get this (basically the same as this question):

vagrant up --provision
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Clearing any previously set forwarded ports...
==> homestead: Clearing any previously set network interfaces...
==> homestead: Preparing network interfaces based on configuration...
    homestead: Adapter 1: nat
    homestead: Adapter 2: hostonly
==> homestead: Forwarding ports...
    homestead: 80 (guest) => 8000 (host) (adapter 1)
    homestead: 443 (guest) => 44300 (host) (adapter 1)
    homestead: 3306 (guest) => 33060 (host) (adapter 1)
    homestead: 4040 (guest) => 4040 (host) (adapter 1)
    homestead: 5432 (guest) => 54320 (host) (adapter 1)
    homestead: 8025 (guest) => 8025 (host) (adapter 1)
    homestead: 9600 (guest) => 9600 (host) (adapter 1)
    homestead: 27017 (guest) => 27017 (host) (adapter 1)
    homestead: 22 (guest) => 2222 (host) (adapter 1)
==> homestead: Running 'pre-boot' VM customizations...
==> homestead: Booting VM...
==> homestead: Waiting for machine to boot. This may take a few minutes...
    homestead: SSH address: 127.0.0.1:2222
    homestead: SSH username: vagrant
    homestead: 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.

It basically hangs for a long time and then gives me that error. I already tried these options:

  • I re-installed Vagrant, Virtualbox and Homestead. Afterwards I made sure to tick the Cable connected box in Virtualbox and boot up homestead with the --provision option.
  • Enabled Intel Virtualization Technology in my BIOS.
  • Re-generated my SSH keys and made sure it matches directories with my Homestead.yaml

My Homestead.yaml file looks like this:

memory: 2048
cpus: 2
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: C:/Users/Bas/Projects
      to: /home/vagrant/code

sites:
    - map: someproject.test
      to: /home/vagrant/code/someproject/public
      php: '7.2'

databases:
    - goeswerkt

features:
    - mariadb: false
    - ohmyzsh: false
    - webdriver: false

Could it be possible that I can't run a Virtualbox instance next to WSL2? If so, how can I fix this?

1

1 Answers

0
votes

Turn off Hyper-V autolaunch: bcdedit /set hypervisorlaunchtype off

Run: vagrant destroy Clear: C:\Users\USER_NAME\VirtualBox VMs if the box still exists

Reboot and vagrant up