Vagrant:* 未知的配置部分“disksize”

2024-04-18

在我的机器上配置 Vagrant 环境期间,我收到了以下消息:

流浪汉: * 未知的配置部分“disksize”。

它是在插件安装后显示的。

这里是vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.
  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.

  config.vm.box = "bento/ubuntu-16.04"
  config.disksize.size = '150GB'
  config.vm.provider :virtualbox do |vb|
  vb.gui = true
  end

  # Disable automatic box update checking. If you disable this, then
  # boxes will only be checked for updates when the user runs
  # `vagrant box outdated`. This is not recommended.
  # config.vm.box_check_update = false

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.

  config.vm.network "forwarded_port", guest: 8888, host: 8887

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.

  config.vm.network :private_network, ip: "192.168.33.12"
  config.vm.hostname = "dsvm"

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  # config.vm.network "public_network"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.

  config.vm.synced_folder "./shared_directory", "/shared_directory"

  # Provider-specific configuration so you can fine-tune various
  # backing providers for Vagrant. These expose provider-specific options.
  # Example for VirtualBox:
  #
  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    #vb.gui = true

    # Customize the amount of memory on the VM:
    vb.memory = "4096"#"2048"
    vb.customize ["modifyvm", :id, "--cableconnected1", "on"]

  end

  # View the documentation for the provider you are using for more
  # information on available options.

  # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
  # such as FTP and Heroku are also available. See the documentation at
  # https://docs.vagrantup.com/v2/push/atlas.html for more information.
  # config.push.define "atlas" do |push|
  #   push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
  # end

  # Enable provisioning with a shell script. Additional provisioners such as
  # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  # documentation for more information about their specific syntax and use.

  #config.ssh.username = 'root'
  #config.ssh.password = 'vagrant'
  #config.ssh.insert_key = 'true'

  #fixing_scripts
  config.vm.provision :shell, path: "./shared_directory/install_scripts/fixing_scripts.sh"

  #install_various_tools
  config.vm.provision :shell, path: "./shared_directory/install_scripts/install_various_tools.sh"

  #install_java
  config.vm.provision :shell, path: "./shared_directory/install_scripts/install_java.sh"

  #finalize_instalations.sh
  config.vm.provision :shell, path: "./shared_directory/install_scripts/finalize_instalations.sh"

  # Install R:  
  config.vm.provision :shell, path: "./shared_directory/install_scripts/install_R.sh"

  # Install Docker: 
  config.vm.provision :shell, path: "./shared_directory/install_scripts/install_docker.sh"

  # Adjust size :   
  config.vm.provision :shell, path: "./shared_directory/install_scripts/adjust_size_1.sh"
  config.vm.provision :shell, path: "./shared_directory/install_scripts/adjust_size_2.sh"

  #config.vm.provision "shell", inline: <<-SHELL
    # some bach commnads to run in 1st "vagrant up"   
  #SHELL

  config.vm.provision "shell", run: "always", inline: <<-SHELL
    sudo su -
    source /root/.bashrc
    sudo -H jupyter notebook --notebook-dir=/shared_directory --no-browser --ip=0.0.0.0 --port=1565 &

  SHELL
  #Vagrant.configure("2") do |config|
  #  config.vm.provision "chef_solo" do |chef|
  #      chef.add_recipe 'apt'
  #      chef.add_recipe ''
  #  end
  #end

end

我尝试过改变容量disksize.size到更小的尺寸,但没有成功。

可能是什么问题呢?

提前致谢


您需要安装插件:

vagrant plugin install vagrant-disksize
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Vagrant:* 未知的配置部分“disksize” 的相关文章

随机推荐

  • Next Js服务器端Api读写JSON

    我正在尝试使用 Next js 为自己编写一个基本的本地 api 它是一个时间线生成器 而我却陷入了实际从 api 文件夹中读取文件的困境 我想要在本地应用程序中得到什么 1 一个简单的页面 我可以在其中输入事件 以及日期和描述 2 在某处
  • 如何在Python中使用多线程并加速代码

    我正在尝试在 python 3 中使用多线程 加快某些代码的执行速度 基本上我必须在可迭代上运行相同的函数 channels range 1 8 我已经制作了一个到目前为止我正在使用的工作示例 我正在针对正常执行对其进行测试 我没有看到任何
  • 使用 Nokogiri 替换时的编码问题

    我有这个代码 encoding utf 8 require nokogiri s a href path to file Caf Verona a encode UTF 8 puts Original string s doc Nokogi
  • 运行模拟器时出现“com.android.exchange.ExchangeService 已泄漏...”错误[关闭]

    这个问题不太可能对任何未来的访客有帮助 它只与一个较小的地理区域 一个特定的时间点或一个非常狭窄的情况相关 通常不适用于全世界的互联网受众 为了帮助使这个问题更广泛地适用 访问帮助中心 help reopen questions 当我将模拟
  • NHibernate.Exceptions.GenericADOException:无法执行查询

    我有一个遗留应用程序 vfp 8 我需要从中提取数据 无插入 我使用 Accnum 字段作为主键 它在表中定义为字符 11 出厂配置
  • 如何检查 Google VM 实例是否已具有 gcloud 凭据

    为了不每次都打电话 gcloud auth login 这会中断用户输入的脚本 我想查看用户是否已经通过身份验证 任何用户 并且只有在没有用户的情况下 才调用gcloud auth login 我想要一个比抓取输出更优雅 可靠的解决方案gc
  • 为什么 ActionScript 中没有记录 drawRoundRectComplex() ?

    在研究actionscript 3的图形类时 我遇到了未记录的drawRoundRectComplex 方法 它是一个变种drawRoundRect 但有 8 个参数 最后四个是每个角的直径 x y 宽度 高度 左上 右上 左下 右下 ex
  • 将集合添加到列表框

    我正在尝试让用户能够添加name and ingredient到列表框 下面简单介绍一下相关类 RecipeForm是形式 RecipeManager是一个集合管理器类Recipe Recipe是 内容 类 其中字段name and ing
  • ggplot2 - 具有堆栈和闪避的条形图

    我正在尝试使用创建条形图ggplot2我通过一个变量进行堆叠并通过另一个变量进行躲避 这是一个示例数据集 df data frame year rep c 2010 2011 each 4 treatment rep c Impact Co
  • Linux (Fedora 13) 与 OS X 中的 sigwait

    因此 我尝试使用 pthreads 创建一个可在 OS X 和 Linux 上运行的信号处理程序 下面的代码适用于 OS X 但不适用于 Fedora 13 该应用程序相当简单 它生成一个 pthread 注册 SIGHUP 并等待信号 生
  • 好的斯坦福 Javascript 加密库 (SJCL) 示例? (JS密码学)[关闭]

    Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 我正在寻找一种在 Javascript 中进行客户端加密的方法 保持http www matasano
  • 3D 图形矩阵 4x4 中最后一行的 magic 4 的用途是什么?

    当我阅读有关WebGL的书时 我看到了下一个矩阵描述 有关于书中最后一行的信息 WebGL 初学者指南 初学者指南 Diego Cantor Brandon Jones 神秘的第四排 第四排没有任何特殊之处 意义 元素 m4 m8 m12
  • 丰富域模型与贫乏域模型[关闭]

    Closed 这个问题是基于意见的 help closed questions 目前不接受答案 我正在决定是否应该使用丰富域模型而不是贫乏域模型 并寻找两者的好例子 我一直在使用贫血领域模型构建 Web 应用程序 并由服务 gt 存储库 g
  • 我的服务应该返回什么接口? IQueryable、IList、IEnumerable?

    想象一下 我有一个 SearchService 层 它有一个方法来搜索以某个字符串开头的所有汽车 public static class Searcher public IAnInterface
  • 如何在 Safari 上提供 ES6 模块?

    我有一个关于 Safari 中 ES6 模块使用的问题 这让我抓狂 因为它阻止我与 Safari 用户共享我的网站 我的网络应用程序和即将推出的 MWE工作得很好在以下环境中 Windows Chrome Edge 和 Firefox 均通
  • 适用于 Objective C iPhone 的 XMLStreamReader?

    我在用XML编写器 http code google com p xswi 用于生成 xml 现在我想用一些阅读器库 框架来阅读这个 xml 是否有任何可用的补充框架 库 我目前正在寻找使用 TouchXML 库来读取此内容 但它无法按预期
  • “mov offset(%rip),%rax”有什么作用?

    Does rax获取偏移量加上这条指令的地址 还是下一条指令的地址 从微代码的角度来看 如果答案是下一条指令可能会更容易 下一个 这是 x86 上的一般规则 另请参阅分支 在 Intel 手册第 2 卷第 2 2 1 6 RIP 相对寻址部
  • Sprite Kit 物理碰撞问题

    我遇到了一些碰撞问题 我有两个大小和质量相同的物体 当一个物体与另一个静止物体碰撞时 我会得到正确的行为 图像中的灰色区域 当我有两个彼此相邻的对象时 行为不太正确 Spritekit 结果在左侧 右侧是预期 需要的结果 我想我知道发生了什
  • 两个字段的 sqlalchemy 验证器

    SQLAlchemy 文档解释了如何使用 validates 装饰器向模型添加验证 from sqlalchemy orm import validates class EmailAddress Base tablename address
  • Vagrant:* 未知的配置部分“disksize”

    在我的机器上配置 Vagrant 环境期间 我收到了以下消息 流浪汉 未知的配置部分 disksize 它是在插件安装后显示的 这里是vagrantfile mode ruby vi set ft ruby All Vagrant conf