Skip to content

Instantly share code, notes, and snippets.

@xdu
Last active August 29, 2015 14:27
Show Gist options
  • Save xdu/a2ccb70d5fc599b72011 to your computer and use it in GitHub Desktop.
Save xdu/a2ccb70d5fc599b72011 to your computer and use it in GitHub Desktop.
Setup Vagrant under Windows

Vagrant

Although the install of vagrant on linux or MacOSx is quite simple, to install it on windows platform is not a trivial task.

First download the vagrant and follow the setup program. https://www.vagrantup.com/downloads.html

Rsync

Vagrant uses rsync to synchronize a local folder with a folder inside virtualbox, but rsync is not available on windows, you need to download it from https://www.itefix.net/cwrsync.

Once downloaded you can unzip the file to bin folder of vagrant.

Proxy

If you'are behind a corporate proxy, you need to install a vagrant plugin or the virtual machine can't download nothing from internet. https://github.com/tmatilai/vagrant-proxyconf

set HTTPS_PROXY=https://proxy.example.com:3128
set HTTP_PROXY=http://proxy.example.com:3128
vagrant plugin install vagrant-proxyconf

Fedora

Fedora provides a official image for the vagrant, you can get it from https://getfedora.org/en/cloud/download/index.html

if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.http     = "http://192.168.0.2:3128/"
    config.proxy.https    = "http://192.168.0.2:3128/"
    config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment