From 172103749ea8313631f29cd816a531d4e4c275d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Mon, 14 Sep 2015 23:19:21 +0900 Subject: [PATCH] Increase size of operator to allow building images This is only implemented for libvirt provider at the moment. Partially-Implements: blueprint vagrant-improvements Change-Id: I72a2c32d7b5966a255eefcf687533023e84280da --- vagrant/Vagrantfile | 6 ++++++ vagrant/bootstrap.sh | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index abcd9d72f7..8ee6f9611f 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -82,6 +82,12 @@ Vagrant.configure(2) do |config| admin.vm.synced_folder ".", "/home/vagrant/sync", disabled: true admin.vm.provider PROVIDER do |vm| vm.memory = MULTINODE ? 1024 : 4096 + if PROVIDER == 'libvirt' + # This only works with libvirt provider. + # We should be able to do something similar for virtualbox + # http://askubuntu.com/questions/317338/how-can-i-increase-disk-size-on-a-vagrant-vm + vm.machine_virtual_size = 40 + end end admin.hostmanager.aliases = "operator" end diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index cd413527f8..81d0aa3af3 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -61,6 +61,24 @@ EOF usermod -aG docker vagrant } +function resize_partition { + fdisk /dev/vda <