Windows 10 + Vagrant + Virtualbox + Homestead

來源:互聯網
上載者:User

標籤:

 Best Answer — Asker‘s Choice

Eldair 

— 3,475 PointsPosted 1 month ago

Hello,

New solution:

  1. Install Virtualbox 5 and Vagrant 1.7.4

  2. Comment line 17: config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10" in homestead.rb

  3. Comment line 64: b.use ClearNetworkInterfaces in action.rb (path ~\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\providers\virtualbox\action.rb)

  4. Homestead init and/or up

  5. Homestead halt

  6. In Virtualbox preferences -> network -> host-only networks edit existing Host-Only adapter and add 192.168.10.10 as IP address

  7. Select homestead box in Virtualbox and go to settings -> network -> adapter 2 and select Host-only network (the one edited in step above)

  8. Homestead up, provision

P.S. I don‘t know why, but I had to add :8000 to alias urls in browser to get them to open pages.
Edit: the :8000 can be avoided if you change default port forwarding 80 => 80 instead of 80 => 8000 in homestead.rb or go to settings of your box -> network settings -> adapter 1 (nat) and port forwarding option, and there is port 80 forwarded to port 8000, change 8000 to 80 and that‘s it.

And it‘s working (: Cheers

UPDATE Alternative solution by @pdcmoreira:
I found a VERY SIMPLE way to make it work without touching any file in the accepted answer!

Install and run this file: https://www.virtualbox.org/attachment/ticket/14040/VBox-Win10-fix-14040.exe (leave it running in the background) Go to the C:\Program Files\Oracle\VirtualBox folder, right click on VirtualBox.exe, go to compatibility, check the "Run in compatibility mode" checkbox and choose Windows 7. Click OK to close the window. Repeat step 2. for VBoxManage.exe and VBoxHeadless.exe Run cmd and do homestead up. There you go! It should work!

After all is done and working, close the program opened in step 1.

[UPDATED]

You don‘t need to run cmd as Administrator in step 4.


Windows 10 + Vagrant + Virtualbox + Homestead

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.