Vagrant Alias to Make Life Easy: vurp

I’ve been using Vagrant on a daily basis for over a year now, and there is one common issue I run into: Sometimes VirtualBox’s network will hang and I need to force shutdown & re-up the instance. If you use NFS on Mac, this will also require some administrator privileges half the way through the process.

So what did I do? I made an alias for my terminal. In my ~/.bash_profile file I added this line:

alias vurp="sudo -v ; vagrant halt -f ; vagrant up"

What that does is it first prompts me to refresh my sudo password at the very beginning, then force halts the vagrant instance, then ups it again.

It’d be nice if I didn’t have to do this, but hey, it only happens once and awhile.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close