Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
if [ "$1" = '' ]; then
echo "Usage: ./`basename "$0"` <hostname>"
exit 1
fi
# NOTE: lets say you try to provision a previously provisioned host...
# $ vp foo
# [foo] Configuring cache buckets...
# The following SSH command responded with a non-zero exit status.
# Vagrant assumes that this means the command failed!
#
# mkdir -p /tmp/vagrant-cache/yum
#
# Stdout from the command:
#
#
#
# Stderr from the command:
#
# mkdir: cannot create directory `/tmp/vagrant-cache': Permission denied
#
# NOTE: this is a bug, but here's a workaround:
vagrant ssh "$1" -c 'sudo timeout 3 umount /tmp/vagrant-cache'
vagrant ssh "$1" -c 'sudo umount /tmp/vagrant-cache'
#/tmp/vagrant-cache was not found in /proc/mounts
#/tmp/vagrant-cache was not found in /proc/mounts
vagrant ssh "$1" -c 'sudo rmdir /tmp/vagrant-cache/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.