我已将Vagrantfile
更新为:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define :ceph do |ceph|
ceph.vm.box = "big-ceph"
ceph.vm.network :private_network, ip: "192.168.251.100"
ceph.vm.hostname = "ceph"
end
config.vm.define :client do |client|
client.vm.box = "hashicorp/precise64"
client.vm.hostname = "ceph-client"
client.vm.provision :shell, path: "setup/ceph.sh"
client.vm.network :private_network, ip: "192.168.251.101"
end
end
但每当我vagrant up
我的虚拟机时,我仍会收到此警告消息。
calvin % vagrant reload ceph && vagrant reload client
There were warnings and/or errors while loading your Vagrantfile
for the machine 'ceph'.
Your Vagrantfile was written for an earlier version of Vagrant,
and while Vagrant does the best it can to remain backwards
compatible, there are some cases where things have changed
significantly enough to warrant a message. These messages are
shown below.
Warnings:
* `config.vm.customize` calls are VirtualBox-specific. If you're
using any other provider, you'll have to use config.vm.provider in a
v2 configuration block.
知道为什么吗?
答案 0 :(得分:0)
好的,我明白了。我正在使用的第三方ceph框附带了自己的Vagrantfile
,它覆盖了我的Vagrantfile
,并且包含的框Vagrantfile
(位于~/.vagrant.d/boxes/big-ceph
中)仍然包含
config.vm.customize ["modifyvm", :id, "--nictype1", "virtio"]
注释出来,我不再看到恼人的警告。