# 安装 vagrant-disk-size 插件
vagrant plugin install vagrant-disksize --plugin-clean-sources --plugin-source https://gems.ruby-china.com/
编辑 Vagrantfile
文件
Vagrant.configure('2') do |config|
...
config.vm.box = 'ubuntu/bionic'
# 设置磁盘大小
config.disksize.size = '50GB'
...
end
# 停止虚拟机并启动虚拟机
vagrant halt && vagrant up
References
- Vagrant 扩大磁盘根目录(图文详解)
- vagrant No space left on device (RuntimeError)错误处理 --尝试了,好像当时尝试是失败了~~
- How Can i increase disk size on a vagrant vm