Windows 10 + Vagrant + Virtualbox + Homestead
2015-09-06 15:38
323 查看
Best Answer — Asker's Choice
Eldair
— 3,475 PointsPosted 1 month ago
Hello,
New solution:
Install Virtualbox 5 and Vagrant 1.7.4
Comment line 17: config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10" in homestead.rb
Comment line 64: b.use ClearNetworkInterfaces in action.rb (path ~\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\providers\virtualbox\action.rb)
Homestead init and/or up
Homestead halt
In Virtualbox preferences -> network -> host-only networks edit existing Host-Only adapter and add 192.168.10.10 as IP address
Select homestead box in Virtualbox and go to settings -> network -> adapter 2 and select Host-only network (the one edited in step above)
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.
Eldair
— 3,475 PointsPosted 1 month ago
Hello,
New solution:
Install Virtualbox 5 and Vagrant 1.7.4
Comment line 17: config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10" in homestead.rb
Comment line 64: b.use ClearNetworkInterfaces in action.rb (path ~\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\providers\virtualbox\action.rb)
Homestead init and/or up
Homestead halt
In Virtualbox preferences -> network -> host-only networks edit existing Host-Only adapter and add 192.168.10.10 as IP address
Select homestead box in Virtualbox and go to settings -> network -> adapter 2 and select Host-only network (the one edited in step above)
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.
相关文章推荐
- samba配置文件讲解
- EL 表达式
- [leetcode][Binary Search] H-Index II
- jQuery Ajax 跨域请求
- iOS小结(一)resolution 适配问题
- leetcode:Maximum Product Subarray
- 使用WindowManager实现悬浮窗
- android LayoutInflater
- 常用SQL语句收藏 <四>
- linux automake使用
- 封装静态库与Framework
- 关于appicon 大小和启动页大小的设置
- oracle impdp的table_exists_action详解
- telerik自定义皮肤的制作及用法
- 线程的概念
- JS实现鼠标滑过折叠与展开菜单效果代码
- 数据资源
- ubuntu批量解压rar文件到各自文件夹
- STL中的模板介绍
- shell printf(echo增强)