我在hyper-v中使用宅基。 流浪者盒子运行良好。
但是。 IP地址每次都更改。
我在Homestead.yaml文件中修复了IP地址。但不起作用。
我用
我尝试增加10倍的无所事事...
homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: hyperv
无用消息。
PS C:\Users\hi\dev\homestead> vagrant up
Bringing machine 'homestead' up with 'hyperv' provider...
==> homestead: Verifying Hyper-V is enabled...
==> homestead: Verifying Hyper-V is accessible...
homestead: Configuring the VM...
==> homestead: Starting the machine...
==> homestead: Waiting for the machine to report its IP address...
homestead: Timeout: 120 seconds
homestead: IP: 172.17.76.38
==> homestead: Waiting for machine to boot. This may take a few minutes...
homestead: SSH address: 172.17.76.38:22
homestead: SSH username: vagrant
homestead: SSH auth method: private key
==> homestead: Machine booted and ready!
hyper-v机器的IP是172.17.76.38 ...
如何修复???
答案 0 :(得分:0)
我建议切换到VirtualBox或VMware。如Vagrant的official website
所述,您的问题是Hyper-V提供程序的局限性的一部分答案 1 :(得分:0)
只需安装 Vagrant Host Manager Plug-in,然后您就可以使用主机名 homestead
进行连接,而无需查找 IP 地址。
您可以按照此 guide 获取非常详细的分步说明。