Understanding Vagrant disk space usage

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Understanding Vagrant disk space usage

Mohammed Ibrahim
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

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Understanding Vagrant disk space usage

Alvaro Miranda Aguilera
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

On Mon, Dec 25, 2017 at 12:15 AM, Mohammed Ibrahim <[hidden email]> wrote:
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

--
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 [hidden email].
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ez4tMka-dC1ihfJDTr%3DQg7%2BbbskyvRznaX1GB0Z%3DiawGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.