Understanding Vagrant disk space usage

668 views
Skip to first unread message

Mohammed Ibrahim

unread,
Dec 24, 2017, 6:15:57 PM12/24/17
to Vagrant
Hello,
Just starting with Vagrant using the docs https://www.vagrantup.com, using Ubuntu server 16.04
And now playing on my first box "hashicorp/precise64",
Trying to understand the disk usage of vagrant:

1. Although i made a new partition for my 1st box, the new box is installed on "/root/VirtualBox VMs", how to change the destination of new box creation path?

2. I tried to create dummy sizes of 30 GB using "dd" on the box, but i didn't get where is that disk size located on the host server, as it is still the same for the host?!

disk sizes on box:
Filesystem                           Size  Used Avail Use% Mounted on
/dev/mapper/precise64-root   79G   32G   44G  43% /  => where is that disk usage located on the host server?
vagrant                                40G  2.1G   38G   6% /vagrant  => this is the host partition size of the vagrant box

The .vmdk file size:
1.3G    box-disk1.vmdk

Thanks in advance

Alvaro Miranda Aguilera

unread,
Dec 25, 2017, 8:04:01 AM12/25/17
to vagra...@googlegroups.com
Hello

reply to 1. Open Virtualbox Settings, check the virtual machine directory, you can change it. 

then destroy and recreate will put the VM on the new path.

reply to 2.

dd with zeroes may not use much space, several layers are there that will try to be smart. Filesystem, the Virtualbox disk, etc.

if you want to use space, you need to create files that are not zeroes, ie put something big like an iso on on same directory of Vagrantfile, then on the VM copy that multiples times.

Om the host the disk.vmdk will start growing if the VM start using it.


Vagrant is a tool that automate lots of things, but is good to know whats happening under the hood, so please feel free to send all the questions you have, and we will be more than happy to help.


Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/69c86747-f08b-4542-82b1-bb8f9a173a46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages