3

SuperUsers. I want to preserve the life of my laptop's SSD drive. I make heavy use of Vagrant, Chef, and Virtualbox. I'm using Test Kitchen w/ Vagrant to run my infrastructure code tests. I am creating and destroying VMs all day, several times a day, sometimes in parallel. I'd like all of this ephemeral activity to happen on a tmpfs, like /dev/shm/, rather than chewing away at my write-limited SSD. I'm running GNU/Linux. I have 32 GB RAM, so would like to make heavy use of it! :)

There are so many locations where these programs store their files, that I was hoping someone out there has a magic symlink, bind mount, or similar that will just magically make this problem easy to solve. :) Any takers? Thanks in advance.

1 Answers1

2

OK, so I answered this myself, with help from https://www.virtualbox.org/manual/ch10.html .

$ cd ~/.VirtualBox/
$ mv Machines Machines.OFF
$ ln -s /dev/shm/ Machines

NOTE: If you are using a tool like Test Kitchen, and you find yourself faced with an error while purging a machine, undo this configuration and try again:

$ cd ~/.VirtualBox/
$ mv Machines Machines.LINK
$ mv Machines.OFF Machines

NOTE: Monitor available RAM closely. /dev/shm/ is a tmpfs mount on my system, with a default of half of the available physical RAM allocated. Make sure your virtual machines don't allocate more RAM than necessary. I'v'e got 32 GB real RAM, hence my interest in this. :)