├── .gitignore ├── README.adoc ├── Vagrantfile ├── i386 ├── .gitignore ├── Vagrantfile └── shared │ └── .gitignore └── shared └── .gitignore /.gitignore: -------------------------------------------------------------------------------- 1 | /shared/* 2 | .bundle 3 | .vagrant 4 | *.swp 5 | *.swo 6 | -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | = `Vagrantfile` for ops-class.org 2 | 3 | This boots a VirtualBox VM containing a development environment that you can 4 | use to complete the https://www.ops-class.org[`ops-class.org`] programming 5 | assignments. 6 | // 7 | Vagrant is a good option for Mac and Windows users. 8 | // 9 | If you already have Ubuntu installed, you can 10 | // 11 | https://launchpad.net/~ops-class/+archive/ubuntu/os161-toolchain[add our PPA] 12 | // 13 | and install the toolchain natively using `apt-get`. 14 | 15 | == Installation 16 | 17 | . (On Windows) Download https://git-scm.com/download/[Git for Windows]. 18 | // 19 | This includes a `bash` shell which you should use in lieu of the terrible 20 | Windows shell. 21 | // 22 | . (Required) If you already have https://www.virtualbox.org/[VirtualBox] 23 | installed, upgrade to the latest version. 24 | // 25 | . (Required) https://docs.vagrantup.com/v2/installation/[Install Vagrant] 26 | // 27 | . (Suggested) Install two Vagrant plugins: 28 | // 29 | .. `vagrant plugin install vagrant-vbguest`. 30 | // 31 | This ensure that your VirtualBox Guest Additions are up to date. 32 | // 33 | .. `vagrant plugin install vagrant-timezone`. 34 | // 35 | This synchronizes time between your VM guest and host. 36 | 37 | Note that these plugins may be required to get certain Windows systems to 38 | work. 39 | 40 | == Usage 41 | 42 | [source,bash] 43 | ---- 44 | vagrant up 45 | ---- 46 | 47 | == Configuration 48 | 49 | * The default user and hostname is `trinity@zion`. 50 | // 51 | * The OS/161 toolchain is installed from the 52 | https://launchpad.net/~ops-class/+archive/ubuntu/os161-toolchain[ops-class 53 | OS/161 toolchain PPA]. 54 | // 55 | * An up-to-date version of Git is also preinstalled. 56 | // 57 | * The default machine configuration is fairly lightweight. 58 | // 59 | You may want to beef it up a bit. 60 | // 61 | Or not. 62 | // 63 | `sys161` is pretty lightweight itself. 64 | // 65 | * You are encouraged virtual machine to your liking--either by editing the 66 | `Vagrantfile` or by modifying the machine directly. 67 | // 68 | 69 | == Known Problems and Workarounds for Windows 70 | 71 | === Missing `MSVCR100.dll` 72 | If your `vagrant up` failed with empty error message like: 73 | 74 | image::http://i.imgur.com/75IcjsN.png[GitHub mascot] 75 | 76 | It's probably because your Windows OS is missing the `MSVCR100.dll` file. 77 | 78 | *Solution:* 79 | 80 | 1. Download `MSVCR100.dll` from http://fix4dll.com/msvcr100_dll based on your OS. 81 | 82 | 1. Copy downloaded `MSVCR100.dll` to `C:\Windows\System32\` or `C:\Windows\SysWOW64\` based on your System version 32-bit/64-bit. 83 | 84 | Video help can be found: https://www.youtube.com/watch?v=6GZH_zObpmg 85 | 86 | 87 | === SSH Connection Issues in Windows Command Prompt 88 | 89 | *Symptom:* `vagrant ssh` hangs while connecting. 90 | 91 | *Solution:* Vagrant cannot connect over ssh using Windows Command Prompt. Please use Git Bash or Cygwin instead. 92 | 93 | 94 | === Windows Virtualization Issues 95 | 96 | *Symptom:* `vagrant up` Hangs While Connecting 97 | 98 | *Solution:* 99 | 100 | 1. Make sure virtualization is enabled in your BIOS. 101 | 102 | 2. If Hyper-V is enabled, disable it. Vagrant cannot coexist with Hyper-V. 103 | 104 | === `bmake` fails with symbolic link errors 105 | 106 | *Symptom:* `ln: failed to create symbolic link ...` 107 | 108 | *Solution:* Windows requires users to have special privileges for creating symbolic links. 109 | Follow instructions listed https://discourse.ops-class.org/t/errors-with-vagrant-and-windows-machines/132/7?u=gurupras[here]. 110 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | VAGRANT_COMMAND = ARGV[0] 2 | 3 | Vagrant.configure(2) do |config| 4 | 5 | if ENV['BOX_VERSION'] != nil 6 | config.vm.box = "ubuntu-16.04-" + ENV['BOX_VERSION'] 7 | else 8 | config.vm.box = "ops-class/ubuntu-16.04" 9 | config.vm.box_version = ">= 0.0.2" 10 | end 11 | config.ssh.username = "trinity" 12 | config.vm.synced_folder "shared", "/home/trinity/shared", create: true, owner: "trinity", group: "trinity" 13 | 14 | if Vagrant.has_plugin?("vagrant-timezone") 15 | config.timezone.value = :host 16 | end 17 | 18 | config.vm.provider "virtualbox" do |v| 19 | # 24 Dec 2015 : GWA : This is a fairly lightweight configuration. Feel 20 | # free to beef it up to improve performance if needed. 21 | v.name = "ops-class.org" 22 | v.cpus = "1" 23 | v.memory = "512" 24 | # 24 Dec 2015 : GWA : Uncomment this if you want a GUI environment. 25 | # v.gui = true 26 | v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] 27 | v.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000] 28 | v.customize ["modifyvm", :id, "--usb", "off"] 29 | v.customize ["modifyvm", :id, "--usbehci", "off"] 30 | v.customize ["modifyvm", :id, "--cableconnected1", "on"] 31 | end 32 | 33 | $script = <