Vagrant 与 FreeBSD 客户机和 Windows 10 主机连接失败

Vagrant 与 FreeBSD 客户机和 Windows 10 主机连接失败

有人能在 FreeBSD vagrant box 上看到 /vagrant 目录吗?我无论如何也看不到它。

在 Windows 10 上测试后,我认为这些问题是跨平台的。使用截至 2017 年 11 月的最新版本的 vagrant 和 virtualbox 进行了测试:

vagrant init freebsd/FreeBSD-11.1-STABLE
vagrant up

我收到以下错误:

No base MAC address was specified. This is required for the NAT networking to work properly (and hence port forwarding, SSH, etc.). Specifying this MAC address is typically up to the box and box maintainer. Please contact the relevant person to solve this issue.

然后当我添加 MAC 地址时:

freebsd.vm.base_mac = "E82AEA3A79B0" #You can change this to your local mac address

freebsd: Warning: Remote connection disconnect. Retrying... freebsd: Warning: Connection aborted. Retrying... freebsd: Warning: Remote connection disconnect. Retrying... freebsd: Warning: Connection aborted. Retrying... freebsd: Warning: Remote connection disconnect. Retrying...

所以我们走得更远,但是当我vagrant ssh进去时,我进去了,但却ls /vagrant不存在。

所以我尝试: config.vm.synced_folder ".", "/vagrant", type: "nfs"

但这似乎没有帮助

此外,我收到以下错误: The configured shell (config.ssh.shell) is invalid and unable to properly execute commands. The most common cause for this is using a shell that is unavailable on the system. Please verify you're using the full path to the shell and that the shell is executable by the SSH user.

和:

config.vm.provision "run",
type: "shell",
privileged: true,
run: "always",
inline: <<-SHELL
    cd /vagrant/tools
    ls
SHELL

相关内容