sprotheroe / vagrant-disksize

Vagrant plugin to resize disks in VirtualBox
MIT License
479 stars 51 forks source link

Feature: Compatibility with CentOS 7 & 8 #39

Open pedrofurtado opened 4 years ago

pedrofurtado commented 4 years ago

A workaround is to write something like that:

Vagrant.configure('2') do |config|
  config.vagrant.plugins = ['vagrant-disksize']
  config.disksize.size = '50GB'
  config.vm.box = 'centos/7'

  config.vm.provision 'shell', privileged: true, inline: <<-SHELL
    yum install -y cloud-utils-growpart
    sudo growpart /dev/sda 1
    sudo xfs_growfs /
  SHELL
end
jwstric2 commented 4 years ago

@pedrofurtado great writeup, this would probaly be a good fit on the README.md as this solution works for most all distros (minus the package manager is different)...