|
CPS 196 Systems and Networks |
|||||||
|
|||||||
You will be running most of your experiments on the Devil Cluster in the Computer Science department. You will each be assigned a Xen machine (named vmmXX.cod.cs.duke.edu) to log into. These machines are hidden away from the outside world, and you can only log into them from another machine in the cluster. For example, let's say you ssh into linux.cs.duke.edu:
Now, log into your assigned vmm.
You're now good to go!
In your home directory, you will find a file called {name}.xen. This is here to help you get started with your virtual machines. This is a plain text file that contains some information needed by Xen to create your virtual machine. To create a virtual machine with this script, just type in
You should see bootup messages scroll by. These are from your new virtual machine. Finally, log into the prompt that appears and look around your new virtual machine. Unfortunately, these new virtual machines do not have X-Windows set up, so you will be restricted to playing around with the console.
xm is the command that allows you to interact with virtual machines running on the physical host. The create command is telling xm to create a new virtual machine, using the information contained in the specified file. The -c flag is to automatically connect you to the newly created machine's console. Try experimenting with leaving it out, to see what happens.
Here are other xm commands that might come in handy.
In order to modify anything in your repository, you must first check out an initial copy. To do this, type
Go ahead and start editing your code. If you add any new files to your working set, you should let subversion know;
Other useful commands are
Once you are done with your edits, you need to
You can edit your code anywhere, as long as you've checked it out first. Suppose you've checked out your code both into your project space, as well as on your laptop. Suppose further, that you've made changes and committed them from your project space. Now your laptop will have an out of date copy of your repository. Fix that by running
There is one further use of svn update that you might find useful. You can go back to any previous committed version of your repository if you've made a mistake and wish to undo one or more commits.
The svn status command will show you the current state of your working set. Please read the manual or the subversion book to learn more about what the status command outputs. Subversion can be used from many places, not just the Unix shell. For example, there is a Windows shell plugin called tortoise svn as well as an eclipse plugin. There are many more things you can do with subversion to make your life easier. Read the subversion book for more details. Focus on chapters 2, 3 and 4.
There are absolutely no restrictions on where you can edit source files. Just make sure that your editor doesn't insert spurious newlines in the middle of code. I've heard complaints about this from the windows version of emacs a while ago, I don't know if the problem persists.
You can compile your linux kernels anywhere gcc is available. However, please refrain from building kernels in your home directory, since that volume doesn't have a great deal of free space. If you want to build kernels on the research machines, you can use /usr/research/playground/cps196/{username}. This directory is what we refer to as your "project space" or your "playground". It is accessible from any of the department or research machines.
Unfortunately, you can't test your newly built kernel anywhere you please. If you recall, Xen requires the "guest" OS (which is what you're building) to be slightly modified. This means that it will not boot on your laptop, for example.
In order for you to test your virtual machines, you'll need to boot them in a virtual machine. The {name}.xen file contains a line like this: