0
我已经建立了一个虚拟机,包含两台虚拟机a)Ubuntu b)Windows 10.我为这些虚拟机从头开始创建了流浪盒。每个流浪者箱子都可以单独运行。但我想要一次启动两台虚拟机。所以我在本文档的帮助下创建了一个Vagrantfile(如下所示):https://docs.vagrantup.com/v2/multi-machine/为多台机器配置Vagrantfile - Vagrant
使用以下Vagrantfile,首先声明的盒子会启动,而另一个则不启动。我的Vagrantfile中是否有错误? 任何解决方案,提示如何解决这个问题?我如何启动这两个虚拟机?
----------- --------------- Vagrantfile上终端
Vagrant.configure(2) do |config|
config.vm.define "linux" do |linux|
linux.vm.box = "ubuntu"
linux.vm.box_url = "/Users/xyz/Desktop/vagrant/linux_package.box"
end
config.vm.define "win" do |win|
win.vm.box = "Windows10"
win.vm.box_url = "/Users/xyz/Desktop/vagrant/win_package.box"
end
config.vm.provider "virtualbox" do |v|
v.gui = true
end
end
输出:
当Linux计算机第一次启动时,我得到下面的消息在终端:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mkdir -p /vagrant
Stdout from the command:
Stderr from the command:
sudo: no tty present and no askpass program specified
我在linux机器上添加了上面的行到/ etc/sudoers文件。从命令“下面的SSH命令非零退出状态回应 流浪假设,这意味着该命令失败 的mkdir -p /游民 标准输出: 但我仍然得到同样的错误! stderr命令: sudo:没有tty存在,也没有指定askpass程序“ – Dana