Skip to content

Instantly share code, notes, and snippets.

@rogerhub
Last active November 3, 2021 06:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerhub/456ae31427aafe5b70f7 to your computer and use it in GitHub Desktop.
Save rogerhub/456ae31427aafe5b70f7 to your computer and use it in GitHub Desktop.
Install CS 162 Vagrant VM on Windows

Running the CS 162 Vagrant VM on Windows

There are some challenges to running Vagrant on Windows. This file is meant to provide assistance to Windows users.

1. Set up Cygwin

Cygwin provides a set of linux tools for Windows computers. You should install Cygwin and use the Cygwin terminal for SSH.

  1. Go to the Cygwin website and download setupx84_64.exe (Cygwin for 64-bit versions of Windows).
  2. Run the setupx86_64.exe file that you downloaded.
  3. At the welcome screen, press "Next".
  4. At "Choose A Download Source", you should select "Install from Internet" and press "Next".
  5. At "Select Root Install Directory", you should leave the default value of "Root Directory" and install for "All Users". Press "Next".
  6. At "Select Local Package Directory", you should leave the default value of "Local Package Directory" and press "Next".
  7. At "Select Your Internet Connection", you should leave the default value of "Direct Connection" and press "Next".
  8. (No action required.) Cygwin will now download a list of mirrors (e.g. servers that host available Cygwin software).
  9. At "Choose A Download Site", select any one of the download sites, and press "Next".
  10. (No action required.) Cygwin will now retrieve a list of available software from the mirror.
  11. You should now be at a screen titled "Select Packages". I suggest you click the "View" button at the top right corner, so that the label says "Full" instead of "Category". Make sure "Cur" is selected for the package version channel (this is the default).
  12. Search for EACH of the following packages, and click the "Skip" label to select them for installation. When you click the "Skip" label, it should turn into a version number like "2.1.4-1". Some of these may already be selected for installation, in which case it will have the version number already there instead of "Skip".
  13. bash: THE GNU Bourne Again SHell
  14. git: Distributed version control system
  15. git-completion: Bash completion for Git version control system
  16. Click "Next" to review the packages to install.
  17. At "Resolving Dependencies", make sure "Select required packages" is selected, and press "Next".
  18. (No action required.) Cygwin will now install your packages.
  19. At "Create Icons", I recommend you add both the Desktop and Start Menu icons, so Cygwin Terminal is easier to find. Press "Finish" to exit the installer.

2. Set up VirtualBox

VirtualBox is a Virtual Machine runtime. You can download VirtualBox for Windows on the VirtualBox website. Select the one labeled "Virtualbox platform packages - for Windows hosts". Then, run the downloaded file and complete the installation.

3. Set up Vagrant

Vagrant is a tool for provisioning development environments. You can download Vagrant for Windows on the VagrantUp website.

At this point, you should restart your computer, for the greatest chance of success.

4. Set up the CS 162 VM

We will now use Cygwin Terminal to set up our virtual machine.

  1. Open up the Cygwin Terminal.
  2. Run mkdir cs162-vm
  3. Run cd cs162-vm
  4. Run vagrant init cs162/spring2016
  5. Run vagrant up. This step may take a while, and requires a fast internet connection.
  6. Run vagrant ssh. You should now be in an SSH session connected to the virtual machine. You can type logout to log out.

5. Closing notes

You need to run all vagrant commands from the cs162-vm directory you created earlier. Do NOT delete that directory, or vagrant will not know how to manage the VM you created.

You can run vagrant halt to stop the virtual machine. If this command does not work, make sure you are running it from your host machine, not inside SSH. To start the virtual machine the next time, you only need to run vagrant up and vagrant ssh. All of the other steps (installing Cygwin and running vagrant init) do not need to be repeated.

@sodabear
Copy link

Thanks!

@pixelkot
Copy link

Thanks!

@lyuleon
Copy link

lyuleon commented Sep 18, 2018

Thanks!

@TetraDSerket
Copy link

Thanks!

@xuebofan
Copy link

Thanks!

@adityavarshney
Copy link

Thanks!

@flinesse
Copy link

Thanks!

@lwh-code
Copy link

lwh-code commented Jun 5, 2021

Thanks!

@lwh-code
Copy link

lwh-code commented Jun 5, 2021

Thanks!

@RshStone
Copy link

RshStone commented Nov 3, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment