[英]VirtualBox and Vagrant stops working after Docker desktop instalation on Win10 pro
On win 10 pro I got VM, Vagrant and Homestead.在 win 10 pro 上,我得到了 VM、Vagrant 和 Homestead。 After installation Docker Desktop VM, Vagrant stops working.安装 Docker 桌面虚拟机后,Vagrant 停止工作。 Message from console:来自控制台的消息:
$ vagrant up --provision
Bringing machine 'homestead' up with 'virtualbox' provider...
==> homestead: Checking if box 'laravel/homestead' version '10.1.0' is up to date...
==> homestead: A newer version of the box 'laravel/homestead' is available and already
==> homestead: installed, but your Vagrant machine is running against
==> homestead: version '10.1.0'. To update to version '10.1.1',
==> homestead: destroy and recreate your machine.
==> 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.
I know there is problem with sharing Hyper-V, or windows subsystem for Linux.我知道为 Linux 共享 Hyper-V 或 windows 子系统存在问题。
Please give the solution how you can work with them on same windows 10.请给出解决方案如何在相同的 windows 10 上使用它们。
This thread here: https://github.com/hashicorp/vagrant/issues/11987 outlines the same problem.这个线程在这里: https://github.com/hashicorp/vagrant/issues/11987概述了同样的问题。 When WSL2 is enabled as part of the Docker install, the vagrant up command hangs.当WSL2作为 Docker 安装的一部分启用时, vagrant up命令挂起。
The commenter here: https://github.com/hashicorp/vagrant/issues/11987#issuecomment-758089840 mentions that by disabling the VirtualMachinePlatform and restarting the machine, vagrant will work as normal again.这里的评论者: https://github.com/hashicorp/vagrant/issues/11987#issuecomment-758089840提到通过禁用VirtualMachinePlatform并重新启动机器,vagrant 将再次正常工作。
Of course, it's not an ideal solution especially if you need to use Docker but it does offer a temporary solution.当然,这不是一个理想的解决方案,特别是如果您需要使用 Docker,但它确实提供了一个临时解决方案。
WSL2 does not play well with VirtualBox. WSL2 不能很好地与 VirtualBox 配合使用。
Since you are Win 10 Pro, why not using Hyper-V?既然你是 Win 10 Pro,为什么不使用 Hyper-V? You can see this benchmark , using Hyper-V is A LOT FASTER... You can follow this step-by-step guide to setup.你可以看到这个基准测试,使用 Hyper-V 会快很多...你可以按照这个分步指南进行设置。
If you want to try out Docker+WSL2, you can use Official Laravel Sail.如果你想试用 Docker+WSL2,可以使用官方 Laravel Sail。 You can follow this tutorial to setup.您可以按照本教程进行设置。
Answer https://github.com/hashicorp/vagrant/issues/11987#issuecomment-777256616 by johollmann works for me and others (according to likes): "My current workaround is to open VirtualBox Manager and select the virtual maschine, my vagrant is boooting up. It seems wiered but having the vm just in focus in VirtualBox GUI during vagrant up solves the problem" Answer https://github.com/hashicorp/vagrant/issues/11987#issuecomment-777256616 by johollmann works for me and others (according to likes): "My current workaround is to open VirtualBox Manager and select the virtual maschine, my vagrant正在启动。看起来很奇怪,但在 vagrant 期间让虚拟机在 VirtualBox GUI 中聚焦可以解决问题“
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.