Vagrant- Hyper-V:不应存在以下设置:自定义、gui
Vagrant- Hyper-V: The following settings shouldn't exist: customize, gui
我正在尝试 运行 windows 10 中的 2.2.5 版 vagrant 和 Hyper-V 10.0 版
我遇到了这个错误
There are errors in the configuration of this machine.
Please fix the following errors and try again:
Hyper-V:
* The following settings shouldn't exist: customize, gui
我检查了其他类似的问题,但似乎没有任何帮助。
我的 vagrant 文件
$script = <<-SCRIPT
echo "cd /vagrant" >> /home/vagrant/.profile
echo "All good!!"
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-16.04"
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
config.ssh.insert_key = 'true'
# Ports foward
# For CouchDB Container
config.vm.network "forwarded_port", guest: 5984, host: 5984
# Zookeeper
#config.vm.network "forwarded_port", guest: 2181, host: 2181
# For Kafka Broker
#config.vm.network "forwarded_port", guest: 9092, host: 9092
# For Kafka Manager
config.vm.network "forwarded_port", guest: 9000, host: 9000
# This gets executed for both vm1 & vm2
#config.vm.provision "shell", inline: "echo 'All good'"
config.vm.provision "shell", inline: $script
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "1"]
vb.gui = false
end
config.vm.provider :hyperv do |hv|
hv.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "1"]
hv.gui = false
end
end
您可以删除此部分
config.vm.provider :hyperv do |hv|
hv.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "1"]
hv.gui = false
end
一起。这些参数特定于 VirtualBox
你可以看看hyperv specific settings如果你需要可以添加到这个部分
我正在尝试 运行 windows 10 中的 2.2.5 版 vagrant 和 Hyper-V 10.0 版 我遇到了这个错误
There are errors in the configuration of this machine.
Please fix the following errors and try again:
Hyper-V:
* The following settings shouldn't exist: customize, gui
我检查了其他类似的问题,但似乎没有任何帮助。
我的 vagrant 文件
$script = <<-SCRIPT
echo "cd /vagrant" >> /home/vagrant/.profile
echo "All good!!"
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-16.04"
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
config.ssh.insert_key = 'true'
# Ports foward
# For CouchDB Container
config.vm.network "forwarded_port", guest: 5984, host: 5984
# Zookeeper
#config.vm.network "forwarded_port", guest: 2181, host: 2181
# For Kafka Broker
#config.vm.network "forwarded_port", guest: 9092, host: 9092
# For Kafka Manager
config.vm.network "forwarded_port", guest: 9000, host: 9000
# This gets executed for both vm1 & vm2
#config.vm.provision "shell", inline: "echo 'All good'"
config.vm.provision "shell", inline: $script
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "1"]
vb.gui = false
end
config.vm.provider :hyperv do |hv|
hv.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "1"]
hv.gui = false
end
end
您可以删除此部分
config.vm.provider :hyperv do |hv|
hv.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "1"]
hv.gui = false
end
一起。这些参数特定于 VirtualBox
你可以看看hyperv specific settings如果你需要可以添加到这个部分