Install VirtualBox and the CS50 appliance

Note: These instructions have been copied and adapted from this website at Harvard.

Mac OS Installation

If your Mac is running OS X 10.8 or later, then download the latest release of VirtualBox from http://www.virtualbox.org/wiki/Downloads by clicking amd64 to the right of VirtualBox 5.x.y for OS X Hosts (where 5.x.y stands for the current release). If your Mac is running an earlier version of Mac OS X, then download the latest release of VirtualBox 4.3.y from https://www.virtualbox.org/wiki/Download_Old_Builds_4_3 by clicking Intel Macs to the right of OS X hosts under VirtualBox 4.3.y.

  1. Double-click the file you just downloaded. You may see a window that says Verifying... after which a VirtualBox icon should appear on your desktop (or on the lefthand side of a Finder window).
  2. Double-click the VirtualBox icon on your desktop (or single-click the icon on the lefthand side of a Finder window). A window containing VirtualBox.mpkg should then appear.
  3. Double-click VirtualBox.mpkg.
  4. A window entitled Oracle VM VirtualBox for Mac OS X should then appear, in front of which should appear a smaller window that prompts you to determine if the software can be installed. Click Continue on both.
  5. A window entitled Standard Install should then appear. Click Install.
  6. If prompted for your username and password, provide both, then click Install Software.
  7. A few seconds or minutes later, a window entitled The installation was completed successfully should appear. Click Close.
  8. Launch VirtualBox, as by single- or double-clicking its icon, wherever you installed it. (Odds are it’s in Applications.)
  9. Select Preferences under VirtualBox’s VirtualBox menu in your display’s top-left corner.
  10. Click Network.
  11. If vboxnet0 does not already appear in the white box under Host-only Networks, click the "+" icon to the right of that box, and vboxnet0 should then appear in the box.
  12. With vboxnet0 highlighted in the white box under Host-only Networks, click the screwdriver icon to the right of that box.
  13. A window with two tabs should then appear. Click Adapter, if not selected already. Ensure that the window contains precisely these values:
    • IPv4 Address: 192.168.56.1
    • IPv4 Network Mask: 255.255.255.0
    • IPv6 Address:
    • IPv6 Network Mask Length: 0
  14. Click OK.
  15. Click DHCP Server. Ensure that Enable Server is checked and that the window contains precisely these values:
    • Server Address: 192.168.56.100
    • Server Mask: 255.255.255.0
    • Lower Address Bound: 192.168.56.101
    • Upper Address Bound: 192.168.56.254
  16. Click OK.
  17. Click OK.
  18. If you prefer to use an appliance with tools pre-installed, download the Appliance OVA file from here. If you wish to install tools on your own, download the Appliance’s OVA file here. The appliance file is nearly 2GB in size, so it might take a while to download.
  19. Once the file has finished downloading, check whether its name ends in .ova or .ovf. There appears to be a bug in Chrome whereby .ova is incorrectly changed to .ovf, so if the file’s name does now end in .ovf, change it back as follows:
    • Single-click the file.
    • Hit Enter.
    • Change .ovf to .ova.
    • Hit Enter.
  20. Launch VirtualBox, if not running already, as by single- or double-clicking its icon, wherever you installed it. (Odds are it’s in Applications.)
  21. Select Import Appliance... from VirtualBox’s File menu.
  22. Click Open Appliance.
  23. Navigate your way to the OVA file that you downloaded, highlight it, and click Open. Then click Continue.
  24. You should see a summary of the appliance’s settings. Click Import, and you’ll see CS50 Appliance 2014 in VirtualBox’s left-hand menu after a few seconds or minutes.
  25. Click CS50 Appliance 2014 to highlight it. To prevent a common error message upon startup, select Settings and click Network. Navigate to Adapter2. Ensure that it has both Enable Network Adapter checked and a value of Host-only Adapter for Attached to, and ensure that the adapter also has a value of vboxnet0 now for Name, selecting it yourself from the drop-down menu next to Name yourself if necessary.
  26. Then click Start to start the appliance. If you see a black-and-white screen entitled GNU GRUB, no need to do anything; the appliance will continue to boot after a few seconds!

Troubleshooting

Nonexistent host networking interface, name (VERR_INTERNAL_ERROR)

For some reason, VirtualBox doesn't always come with a "host-only adapter" configured. (A "host-only adapter" lets you connect to theCS50 Appliance via HTTP, SSH, and the like.) To resolve this problem:

  1. Launch VirtualBox. (If VirtualBox is already running, shut down any virtual machines that are running, as by clicking the red circle in the top-left corner of each window.)
  2. Select Preferences... under VirtualBox's VirtualBox menu in your display's top-left corner.
  3. Click Network.
  4. If vboxnet0 does not already appear in the white box under Host-only Networks, click the "+" icon to the right of that box, and vboxnet0 should then appear in the box.
  5. Click OK.
  6. Single-click whichever virtual machine originally triggered the error (e.g., the CS50 Appliance), then click Settings.
  7. Click Network.
  8. Click each of Adapter 1, Adapter 2, Adapter 3, and Adapter 4. If any of them has both Enable Network Adapter checked and a value of Host-only Adapter for Attached to (as should the CS50 Appliance for Adapter 2), ensure that the adapter also has a value of vboxnet0 now for Name, selecting it yourself from the drop-down menu next to Name yourself if necessary.
  9. Click OK.
  10. Start whichever virtual machine originally triggered the problem (e.g., the CS50 Appliance); it should now be gone.

Failed to load VMMR0.r0 (VERR_SUPLIB_OWNER_NOT_ROOT)

This message usually indicates that /Applications is not owned by root but, rather, by a user account (e.g., your own). To resolve this problem:

  1. Launch Applications > Utilities > Terminal, which will provide you with a command-line environment on your own Mac.
  2. Type
      sudo chown root /Applications
    
    followed by Enter, inputting your password if prompted.
  3. Quit Terminal via File > Quit Terminal.
  4. Launch VirtualBox, if not already running.
  5. Start whichever virtual machine originally triggered the problem (e.g., the CS50 Appliance); it should now be gone.

Source: http://forums.virtualbox.org/viewtopic.php?f=7&t=38825

Failed to load VMMR0.r0 (VERR_SUPLIB_WORLD_WRITABLE)

This message usually indicates that that /Applications is world-writable for some reason. To resolve this problem:
  1. Launch Applications > Utilities > Terminal, which will provide you with a command-line environment on your own Mac.
  2. Type
    sudo chmod o-w /Applications
    
    followed by Enter, inputting your password if prompted.
  3. Quit Terminal via File > Quit Terminal.
  4. Launch VirtualBox, if not already running.
  5. Start whichever virtual machine originally triggered the problem (e.g., the CS50 Appliance); it should now be gone.
Source: http://forums.virtualbox.org/viewtopic.php?f=7&t=39179

Windows Installation

In the instructions below, 4.x.y represents whatever version of VirtualBox is available on the day that you download it.

  1. Download the latest version of VirtualBox from here by clicking x86/amd64<.mono> to the right of VirtualBox 4.x.y for Windows Hosts.
  2. Right-click the file you just downloaded and select Run as administrator from the menu that appears. If asked whether you want to allow the following program to make changes to this computer, click Yes.
  3. A window entitled Welcome to the Oracle VM VirtualBox 4.x.y Setup Wizard should then appear. Click Next.
  4. A window entitled Custom Setup should then appear. Odds are you won’t need to change anything on this window, but do be sure that all of the features in the "tree" are checked (whereby a gray disk icon appears to the left of each). You might need to click one or more plus (+) icons to see the whole tree. There should not be a red X to the left of any feature. Once certain that all features will be installed, click Next.
  5. Another window entitled Custom Setup should then ask you whether you’d like to create a shortcut on the desktop and/or in the Quick Launch Bar. We recommend that you leave at least the first box checked. Decide which to check, then click Next.
  6. A window entitled Warning: Network Interfaces might then try to scare you. Not to worry, click Yes.
  7. A window entitled Ready to Install should then appear. Click Install.
  8. If prompted one or more times whether you would like to install this device software, click Install each time.
  9. A few seconds or minutes later, a window entitled Oracle VM VirtualBox 4.x.y installation is complete should appear. Leave Start Oracle VM VirtualBox 4.x.y after installation checked, then click Finish. VirtualBox should launch.
  10. Select Preferences... under VirtualBox's File menu.
  11. Click Network.
  12. If VirtualBox Host-Only Ethernet Adapter does not already appear in the white box under Host-only Networks, click the "+" icon to the right of that box, and VirtualBox Host-Only Ethernet Adapter should then appear in the box.
  13. Click VirtualBox Host-Only Ethernet Adapter in the white box under Host-only Networks in order to highlight it, if not highlighted already, then click the "screwdriver.png" icon at right.
  14. Click Adapter, if not selected already. Ensure that the window contains precisely these values:
    • IPv4 Address: 192.168.56.1
    • IPv4 Network Mask: 255.255.255.0
    • IPv6 Address:
    • IPv6 Network Mask Length: 0
  15. Click OK.
  16. Click DHCP Server. Ensure that Enable Server is checked and that the window contains precisely these values:
    • Server Address: 192.168.56.100
    • Server Mask: 255.255.255.0
    • Lower Address Bound: 192.168.56.101
    • Upper Address Bound: 192.168.56.254
  17. Click OK.
  18. Click OK.
  19. If you prefer to use an appliance with tools pre-installed, download the Appliance OVA file from here. If you wish to install tools on your own, download the Appliance’s OVA file here. The appliance file is nearly 2GB in size, so it might take a while to download.
  20. Launch VirtualBox, if not running already, as by single- or double-clicking its icon, wherever you installed it.
  21. Select Import Appliance... from VirtualBox’s File menu.
  22. Click Open Appliance.
  23. Navigate your way to the OVA file that you downloaded, highlight it, and click Open. Then click Continue.
  24. You should see a summary of the appliance’s settings. Click Import, and you’ll see CS50 Appliance 2014 in VirtualBox’s left-hand menu after a few seconds or minutes.
  25. Click CS50 Appliance 2014 to highlight it. To prevent a common error message upon startup, select Settings and click Network. Navigate to Adapter2. Ensure that it has both Enable Network Adapter checked and a value of Host-only Adapter for Attached to, and ensure that the adapter also has a value of VirtualBox Host-Only Ethernet Adapter or vboxnet0 now for Name, selecting it yourself from the drop-down menu next to Name yourself if necessary.
  26. Then click Start to start the appliance. If you see a black-and-white screen entitled GNU GRUB, no need to do anything; the appliance will continue to boot after a few seconds!

If you ultimately find that the CS50 Appliance runs unbearably slowly within VirtualBox, you might need to enable hardware virtualizationon your PC.

Troubleshooting

Nonexistent host networking interface, name (VERR_INTERNAL_ERROR)

For some reason, VirtualBox doesn't always come with a "host-only adapter" configured. (A "host-only adapter" lets you connect to theCS50 Appliance via HTTP, SSH, and the like.) To resolve this problem:

  1. Launch VirtualBox. (If VirtualBox is already running, shut down any virtual machines that are running, as by clicking the red circle in the top-left corner of each window.)
  2. Select Preferences... under VirtualBox's File menu in your display's top-left corner.
  3. Click Network.
  4. If VirtualBox Host-Only Ethernet Adapter does not already appear in the white box under Host-only Networks, click the "+" icon to the right of that box, and VirtualBox Host-Only Ethernet Adapter should then appear in the box.
  5. Click OK.
  6. Single-click whichever virtual machine originally triggered the error (e.g., the CS50 Appliance), then click Settings.
  7. Click Network.
  8. Click each of Adapter 1, Adapter 2, Adapter 3, and Adapter 4. If any of them has both Enable Network Adapter checked and a value of Host-only Adapter for Attached to (as should the CS50 Appliance for Adapter 2), ensure that the adapter also has a value of VirtualBox Host-Only Ethernet Adapter now for Name, selecting it yourself from the drop-down menu next to Name yourself if necessary.
  9. Click OK.
  10. Start whichever virtual machine originally triggered the problem (e.g., the CS50 Appliance); it should now be gone.

Nonexistent host networking interface, name VirtualBox Host-Only Ethernet Adapter(VERR_INTERNAL_ERROR)

Sometimes (e.g., after an update), VirtualBox forgets about its "host-only adapter." (A "host-only adapter" lets you connect to the CS50 Appliance via HTTP, SSH, and the like.) To resolve this problem:

  1. Launch VirtualBox. (If VirtualBox is already running, shut down any virtual machines that are running, as by clicking the red circle in the top-left corner of each’s window.)
  2. Select Preferences... under VirtualBox's File menu.
  3. Click Network.
  4. If VirtualBox Host-Only Ethernet Adapter does not already appear in the white box under Host-only Networks, click the "+" icon to the right of that box, and VirtualBox Host-Only Ethernet Adapter should then appear in the box.
  5. Click OK.
  6. Single-click whichever virtual machine originally triggered the error (e.g., the CS50 Appliance), then click Settings.
  7. Click Network.
  8. Click each of Adapter 1, Adapter 2, Adapter 3, and Adapter 4. If any of them has both Enable Network Adapter checked and a value of Host-only Adapter for Attached to (as should the CS50 Appliance for Adapter 2), ensure that the adapter also has a value of VirtualBox Host-Only Ethernet Adapter now for Name, selecting it yourself from the drop-down menu next to Name yourself if necessary.
  9. Click OK.
  10. Start whichever virtual machine originally triggered the problem (e.g., the CS50 Appliance); it should now be gone.

The installer has encountered an unexpected error installing this package. The error code is 2869.

This problem generally indicates that VirtualBox's installer wasn't run as an "administrator." To resolve this problem:

  1. Hit Windows-R on your keyboard (i.e., hold the Windows key, then hit R) to open a Run prompt.
  2. Input ncpa.cpl to the right of Open, then hit Enter.
  3. A window entitled Network Connections should then appear, containing an icon called Wireless Network Connection and/or Local Area Connection (or similar).
  4. If using wireless Internet, right-click Wireless Network Connection (or similar), then choose Properties from the menu that appears. A window entitled Wireless Network Connection Properties (or similar) should then appear.
  5. If using wired Internet, right-click Local Area Connection (or similar), then choose Properties from the menu that appears. A window entitled Local Area Connection Properties (or similar) should then appear.
  6. Inside of that window should be a list of items, some (or all) of which are checked. If VirtualBox Bridged Networking Driver appears in the list, single-click it to highlight it, then click Uninstall.
  7. If prompted if you are sure you want to uninstall, click Yes.
  8. Click Close.
  9. Proceed to reinstall VirtualBox per the directions above. Be sure to run the installer as an administrator.

The application "iphlpsvc.dll" needs to be closed for the installation to continue.

This error generally precedes another error: The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869.

See troubleshooting tips for that other error.

The application "Install Queue" needs to be closed for the installation to continue

This error generally precedes another error: The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869.

See troubleshooting tips for that other error.

Linux Installation

  1. Download the latest version of VirtualBox from here by clicking i386 (if you’re running a 32-bit OS) or AMD64 (if you’re running a 64-bit OS) to the right of your particular distribution.
  2. Install VirtualBox via the file you just downloaded in a manner consistent with your distribution (as with dpkg, rpm, or yum).
  3. Launch VirtualBox, as by single- or double-clicking its icon, wherever you installed it.
  4. Select Preferences... under VirtualBox’s File menu.
  5. Click Network.
  6. If vboxnet0 does not already appear in the white box under Host-only Networks, click the "+" icon to the right of that box, and vboxnet0 should then appear in the box.
  7. With vboxnet0 highlighted in the white box under Host-only Networks, click the screwdriver icon to the right of that box.
  8. Click Adapter, if not highlighted already, and ensure that the four text fields below are as follows:
    • IPv4 Address: 192.168.56.1
    • IPv4 Network Mask: 255.255.255.0
    • IPv6 Address:
    • IPv6 Network Mask: 0
  9. Click OK.
  10. Click DHCP Server. Ensure that Enable Server is checked and that the window contains precisely these values:
    • Server Address: 192.168.56.100
    • Server Mask: 255.255.255.0
    • Lower Address Bound: 192.168.56.101
    • Upper Address Bound: 192.168.56.254
  11. Click OK.
  12. Click OK.
  13. If you prefer to use an appliance with tools pre-installed, download the Appliance OVA file from here. If you wish to install tools on your own, download the Appliance’s OVA file here. The appliance file is nearly 2GB in size, so it might take a while to download.
  14. Launch VirtualBox, if not running already, as by single- or double-clicking its icon, wherever you installed it.
  15. Select Import Appliance... from VirtualBox’s File menu.
  16. Click Open Appliance.
  17. Navigate your way to the OVA file that you downloaded, highlight it, and click Open. Then click Continue.
  18. You should see a summary of the appliance’s settings. Click Import, and you’ll see CS50 Appliance 2014 in VirtualBox’s left-hand menu after a few seconds or minutes.
  19. Click CS50 Appliance 2014 to highlight it. To prevent a common error message upon startup, select Settings and click Network. Navigate to Adapter2. Ensure that it has both Enable Network Adapter checked and a value of Host-only Adapter for Attached to, and ensure that the adapter also has a value of vboxnet0 now for Name, selecting it yourself from the drop-down menu next to Name yourself if necessary.
  20. Then click Start to start the appliance. If you see a black-and-white screen entitled GNU GRUB, no need to do anything; the appliance will continue to boot after a few seconds!
If you ultimately find that the CS50 Appliance runs unbearably slowly within VirtualBox, you might need to enable hardware virtualizationon your PC.

Troubleshooting

Nonexistent host networking interface, name (VERR_INTERNAL_ERROR)

For some reason, VirtualBox doesn't always come with a "host-only adapter" configured. (A "host-only adapter" lets you connect to theCS50 Appliance via HTTP, SSH, and the like.) To resolve this problem:

  1. Launch VirtualBox. (If VirtualBox is already running, shut down any virtual machines that are running, as by clicking the red circle in the top-left corner of each window.)
  2. Select Preferences... under VirtualBox's VirtualBox menu in your display's top-left corner.
  3. Click Network.
  4. Assuming nothing appears in the white box under Host-only Networks, click the "+" icon to the right of that box, and vboxnet0 should then appear in the box.
  5. Click OK.
  6. Single-click whichever virtual machine originally triggered the error (e.g., the CS50 Appliance), then click Settings.
  7. Click Network.
  8. Click each of Adapter 1, Adapter 2, Adapter 3, and Adapter 4. If any of them has both Enable Network Adapter checked and a value of Host-only Adapter for Attached to (as should the CS50 Appliance for Adapter 2), ensure that the adapter also has a value of vboxnet0 now for Name, selecting it yourself from the drop-down menu next to Name yourself if necessary.
  9. Click OK.
  10. Start whichever virtual machine originally triggered the problem (e.g., the CS50 Appliance); it should now be gone.