Created
March 10, 2018 03:27
Star
You must be signed in to star a gist
Run this script before running 'vagrant up' to ensure everything is on a tmpfs aka a ramdisk (Linux-only)). #SaveYourSSD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#lrwxrwxrwx 1 jesse jesse 22 Jan 17 13:00 .vagrant.d -> /dev/shm/vm/Vagrant.d/ | |
#lrwxrwxrwx 1 jesse jesse 19 Jan 17 13:00 .vagrant -> /dev/shm/vm/Vagrant | |
#lrwxrwxrwx 1 jesse jesse 23 Jan 17 13:00 .VirtualBox -> /dev/shm/vm/VirtualBox/ | |
[ -e /dev/shm/vm/Vagrant ] || mkdir -p /dev/shm/vm/Vagrant | |
[ -e /dev/shm/vm/Vagrant.d ] || mkdir -p /dev/shm/vm/Vagrant.d | |
[ -e /dev/shm/vm/VirtualBox ] || mkdir -p /dev/shm/vm/VirtualBox | |
[ -L ~/.vagrant.d ] || rm -rf ~/.vagrant.d; ln -s /dev/shm/vm/Vagrant.d ~/.vagrant.d | |
[ -L ~/.vagrant ] || rm -rf ~/.vagrant; ln -s /dev/shm/vm/Vagrant ~/.vagrant | |
[ -L ~/.VirtualBox ] || rm -rf ~/.VirtualBox; ln -s /dev/shm/vm/VirtualBox ~/.VirtualBox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WARNING: This script will DELETE whatever you had in .VirtualBox, .vagrant and .vagrant.d!