首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >更新了Vagrantfile,但仍然收到警告说我的Vagrantfile已经过时

更新了Vagrantfile,但仍然收到警告说我的Vagrantfile已经过时
EN

Stack Overflow用户
提问于 2014-12-25 06:53:21
回答 1查看 342关注 0票数 0

我已经更新了我的Vagrantfile

代码语言:javascript
复制
# -*- 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我的虚拟机时,我仍然会收到这个警告信息。

代码语言:javascript
复制
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.

知道为什么吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-12-26 02:45:43

好吧,我想出来了。我正在使用的这个第三方ceph附带了自己的Vagrantfile,它覆盖了我的Vagrantfile,而包含的方框Vagrantfile (位于~/.vagrant.d/boxes/big-ceph中)仍然包含

代码语言:javascript
复制
config.vm.customize ["modifyvm", :id, "--nictype1", "virtio"]

评论掉了,我再也看不到恼人的警告了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27644907

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档