3 Vagrant.configure("2") do |config|
4 config.vm.box = "debian/jessie64"
5 # Disable default /vagrant folder rsync
6 config.vm.synced_folder ".", "/vagrant", disabled: true
7 config.disksize.size = '60GB'
9 config.vm.provision "shell", inline: <<-SHELL
11 sudo egrep . /proc/partitions /proc/swaps
12 #sudo apt-get update && sudo apt-get install -y parted
13 #sudo swapoff /dev/sda5 # disable swap so we can then remove the partition
14 #sudo parted /dev/sda rm 5 rm 2 # remove swap and extended partition
15 # Extend sda1 to the full disk. Yes, this needs three dashes. See
16 # https://unix.stackexchange.com/a/365657/126364.
17 #sudo parted ---pretend-input-tty /dev/sda resizepart 1 yes 100%
18 #sudo resize2fs /dev/sda1 # enlarge filesystem to fill the whole partition
19 sudo dd if=/dev/zero of=/swap bs=1024K count=500 # create a swapfile
23 #sudo sed -i '/swap/d' /etc/fstab # and update fstab with the swapfile
24 echo "/swap none swap sw 0 0" | sudo tee -a /etc/fstab
25 #sudo ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -t ed25519 -N ''
28 #config.vm.provision "file", source: "~/.ssh/id_ed25519.pub", destination: "/root/.ssh/authorized_keys"