Created
October 3, 2023 13:55
-
-
Save fabiomix/4c5bd4f52e3384d7576405b6fde8251c to your computer and use it in GitHub Desktop.
[Vagrant] Resize main disk and partition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: 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| | |
# 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://vagrantcloud.com/search. | |
config.vm.box = "debian/bullseye64" | |
# Change the size of the existing disk. Be sure to install the external | |
# vagrant plugin https://github.com/sprotheroe/vagrant-disksize | |
config.disksize.size = '64GB' | |
# Extend partition size with a shell script to fill available space. | |
config.vm.provision "shell", inline: <<-SHELL | |
growpart /dev/sda 1 | |
resize2fs /dev/sda1 | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment