util: Resize VM root partition max size to ~128GB
Prior to this change we were limited to a root partition with only 60GB of space which caused issues when running larger simulations (see: https://github.com/gem5/gem5/issues/165). There are two factors in this issue which this patch resolves: 1. The root partition in the VM was capped at 60GB despite the virtual machines size being capped at 128GB. This resulted in libvirt giving the VM free space it couldn't use. To fix this `lvextend` was added to the "provision_root.sh" script to resize the root partition to fill the available space. 2. The virtual machine size can be set via the `machine_virtual_size` parameter. The minimum and default value is 128GB. This wasn't exposed previously. Now, if we required, we can increase the size of the VM/Root partition if we require (though I believe 128GB is more than sufficient for now). Fixes: https://github.com/gem5/gem5/issues/165 Change-Id: I82dd500d8807ee0164f92d91515729d5fbd598e3
This commit is contained in:
3
util/github-runners-vagrant/Vagrantfile
vendored
3
util/github-runners-vagrant/Vagrantfile
vendored
@@ -40,9 +40,10 @@ Vagrant.configure("2") do |config|
|
||||
config.ssh.password = "vagrant"
|
||||
|
||||
config.vm.provider "libvirt" do |vb|
|
||||
# Customize the amount of cpus and memory on the VM:
|
||||
# Customize the amount of cpus, memory, and storage on the VM:
|
||||
vb.cpus = "4".to_i
|
||||
vb.memory = "16384".to_i
|
||||
vb.machine_virtual_size = 128 # 128G is the minimum.
|
||||
end
|
||||
|
||||
# sets up vm
|
||||
|
||||
@@ -72,3 +72,6 @@ usermod -aG docker vagrant
|
||||
|
||||
# Cleanup
|
||||
apt-get autoremove -y
|
||||
|
||||
# Resize the root partition to fill up all the free size on the disk
|
||||
lvextend -l +100%FREE $(df / --output=source | sed 1d)
|
||||
|
||||
Reference in New Issue
Block a user