Vagrant,如何指定磁盘大小? [英] Vagrant, how to specify the disk size?
本文介绍了Vagrant,如何指定磁盘大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想确保我的开发环境有足够的可用空间来安装工具和其他东西.我找不到任何关于告诉 Vagrant 我想要的最小磁盘大小的配置选项.这是可能的还是我需要创建自己的盒子?
I want to make sure that my development environment has enough free space to install tools and other stuff. I can't find any configuration option about telling to Vagrant the minimum disk size that I want. Is this possible or I need to create my own box?
推荐答案
我用过 vagrant 插件 vagrant-disksize 调整磁盘大小.
I have used the vagrant plugin vagrant-disksize to resize the disk.
它奏效了.它还可以帮助指定初始磁盘大小.
It worked. It can also help to specify the initial disk size.
在命令行运行以下命令:
Run the following at the command line:
vagrant plugin install vagrant-disksize
并在您的 Vagrantfile 中使用以下内容:
and use the following in your Vagrantfile:
vagrant.configure('2') do |config|
config.vm.box = 'ubuntu/xenial64'
config.disksize.size = '50GB'
end
这篇关于Vagrant,如何指定磁盘大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文