Created
March 22, 2022 22:45
-
-
Save panda1100/cbadb1f9ec41cebd83cb9b47410ba684 to your computer and use it in GitHub Desktop.
Expand disk size of Vagrant box for libvirt provider
This file contains 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
Vagrant.configure("2") do |config| | |
config.vm.define :server do |server| | |
server.vm.box = "rockylinux/8" | |
server.vm.box_version = "4.0.0" | |
server.vm.hostname = "warewulf-server" | |
server.vm.network "private_network", | |
ip: "10.0.0.254", | |
netmask: "255.255.252.0", | |
libvirt__network_name: "pxe", | |
libvirt__dhcp_enabled: false | |
server.vm.provider :libvirt do |libvirt| | |
libvirt.cpu_mode = "host-passthrough" | |
libvirt.memory = '4192' | |
libvirt.cpus = '2' | |
libvirt.machine_virtual_size = 40 | |
end | |
server.vm.provision "shell", inline: <<-SHELL | |
dnf install -y cloud-utils-growpart | |
growpart /dev/vda 1 | |
xfs_growfs /dev/vda1 | |
SHELL | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment