ECE 570/670 - (Advanced) System Software Design
University of Massachusetts Amherst
The College of Engineering
Department of Electrical and Computer Engineering
UMass Amherst Logo

Calendar Staff Assignments Projects
Resources Feedback


You will be working on your projects within a virtual machine environment. I will supply a virtual appliance that you can run within the VirtualBox VM platform.  To install VirtualBox visit here.  You can download the course's virtual appliance here.  This virtual appliance
includes Guest Additions, and sudo access to apt-get, apt-cache, mount, and umount. These additions enable you to share folders between your VM and local machine, and to install software from Ubuntu repositories.  See sections below on how to do this.

To start the virtual appliance VM, open the VirtualBox application, and then go to File -> Import Appliance.  Then select the file ece570.ova that you just downloaded. Each group will have their own username, of the form group<#>, on the virtual appliance with their own password.  I will email the username and password for your group.

This class assumes you are comfortable programming in C++/C in a UNIX environment, e.g., using a bash shell, make, gdb debugger, etc. You are free to use any integrated development environment (IDE) you would like for programming, e.g., such as Eclipse, or you may simply use a text editor, e.g., such as emacs, nano, or vim.  You do not have to use the virtual appliance for development.  However, the virtual appliance is setup exactly like the machine we will use for grading, so you should always verify that your code works on the virtual appliance even if you do development somewhere else. You must also submit your code through the virtual appliance; copying the submit program and submitting from another machine will not work!

The canonical book for C++ is "The C++ Programming Language" by Bjarne Stroustroup.  The canonical book for C is "The C Programming Language" by Kernighan and Ritchie.  Below are links to some shorter tutorials on C/C++ programming.

Essential C Tutorial
Introduction to C++ guide
Programming in C
C++ Standard Template Library

Copying files to and from your VM

You can use ssh and scp to copy files to and from your local machine.  The VirtualBox VM should be setup with port forwarding to enable this, as described below.  However, just in case you cannot use the examples below to ssh/scp into the VM, try the following: open VirtualBox and select your VM.  Then click Machine -> Settings in the menu at the top.  Then click the Network tab across the top.  In the Network tab, click on Port Forwarding.  If there is not already a rule for SSH, click the small + sign in the upper right corner of the box.  Now type rule name as "SSH", the protocol should be "TCP", the Host IP should be empty, the Host Port can be "2500", the Guest IP should be empty, and the Guest Port should be "22".

With port forwarding setup, if you're using Mac OSX, you can use ssh and scp in the terminal program (in Applications->Utilities->Terminal).  To ssh into your VM type:

$ ssh -p 2500 group<#>@localhost

To scp a file to the Desktop directory within your home directory type:

$ scp -P 2500 file_name.txt group<#>@localhost:Desktop/.

To scp a file from your VM to your desktop type:

$ scp -P 2500 group<#>@localhost:Desktop/file_name.txt file_name.txt

If you are using Windows, then you will need an SSH or SCP program, such as Putty or WinSCP (linked below).  Note that for these programs you will need to connect to localhost, and you will need to change the default port from 22 to 2500 (i.e., if you see a 22 somewhere change it to be 2500, and enter for the IP address to connect to).

Putty - Windows SSH client
WinSCP - Windows SCP client

ssh and scp require you to use a password.  You can change the password on the VM (so that it is simpler to type) by running the passwd program in the terminal on the VM. 

Sharing folders between your local machine and the VM

If you have downloaded the latest VM image, which has VirtualBox Guest Additions installed, you can also share folders between your VM and your Desktop. To share folders between your VirtualBox VM and your Desktop, click on "Devices" in the VirtualBox menu, and then click on "Shared Folders Settings...". To add a new folder, click on the little folder icon with a plus sign in the upper right corner.  Choose the folder you wish to share on your local machine in the top box; in the bottom box choose the name, such as "mymachine".

Click on "Make Permanent" and "Auto-mount" if you want to share this folder everytime the VM boots.
Now inside of your VM, run the following command, to get your uid and gid numbers (where XX is your group number).

$ id
uid=501(groupXX) gid=20(groupXX) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),395(,399(,401(

Now run the following command, where "mymachine" comes from the name you chose above and XXXX and YYYY are the uid and gid numbers, respectively, from running the id command above.

$ sudo mount -t vboxsf -o umask=002,gid=XXXX,uid=YYYY mymachine /mnt

Now all of your files in the local directory you chose should be available in the /mnt directory on the VM.  Note that you must access them as the root user (e.g., via sudo).

Installing Software

You have sudo (i.e., root) access to run the following commands on the VM: apt-cache, apt-get, mount, and umount. apt-cache enables you to search for code repositories on your VM.  apt-get lets automatically install software from the repository.  mount and umount let you access the filesystem that is shared between your VM and your local machine.

Suggestions if your VM is slow

If your VM is slow, one suggestion is to write code on your native OS on your laptop and then simply copy it to your VM only to compile, run, and test the code.  You can also interact with your VM through an ssh terminal session, rather than through the VirtualBox GUI, which will be faster.  In other words, after you start your VM, just minimize that window, open up an ssh session (via a terminal window on Mac or through Putty on Windows) and ssh into your VM to code.  You should also be able to copy and paste code through the ssh terminal.