CSE 451, Introduction to Operating Systems, Spring 2012

Virtual Machine Information

In this course, we will be using a specially-prepared virtual machine image for development work on some of the projects. It is available from attu and the other CSE servers at /cse/courses/cse451/12sp/FC13-CSE451-2012-03-22.tar.gz. To use this virtual machine image, you have two options: either use a lab machine with VMWare installed (one of the Windows ones) or your own machine.

  • Option 1: Use a Windows lab machine

    1. Log into a Windows lab machine.
    2. Enable VMWare host-only networking by going to Control Panel -> View Network Status and Tasks -> Change Adapter Settings, then enabling both VMWare Virtual Ethernet Adapters.
    3. Navigate to C:\VM\FC13-CSE451-2011-04-09\.
    4. Double-click FC13-CSE451.vmx to launch the VM.

    For security reasons, the CSE451 VM has been set up to use "host only networking." It's accessible via the usual network tools (e.g., ssh, scp, etc.), but only from the machine on which VMware Player is running.

    To access the VM using networking tools, you need to know its IP address. You determine that by opening a shell on the VM and executing ifconfig:

    [451user@cse451-2011-04-09 kernel]$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 31:39:18:88:65:C4  
              inet addr:192.168.16.130  Bcast:192.168.16.255  Mask:255.255.255.0
              inet6 addr: ee90::20c:290f:fea8:65c4/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:28084 errors:0 dropped:0 overruns:0 frame:0
              TX packets:60093 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:1895248 (1.8 MiB)  TX bytes:87245770 (83.2 MiB)
              Interrupt:19 Base address:0x2024 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:8 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:480 (480.0 b)  TX bytes:480 (480.0 b)
    

    In this particular case, the VM is at 192.168.16.130 (2nd line of information for interface eth0). To login to the VM over the network, I could do this:

    $ ssh 451user@192.168.16.130

    In PuTTY, for the host name or IP address field, I would enter:

    451user@192.168.16.130

    Please be aware that the files inside of the VM are preserved across reboots of the VM itself, but if you log out of and back into the lab machine, the state of the VM will be lost. Always back up the files you edit to a repository or some other sort of backed up storage.

    For user account names/passwords on the VM, see the section on virtual machine accounts.

  • Option 2: Use your personal machine

    First, acquire the virtual machine image from attu at /cse/courses/cse451/12sp/FC13-CSE451-2012-03-22.tar.gz. This file is 4.2GB, so depending on your connection speed, it might be easiest to fetch it while at CSE, either to your portable machine or to your portable flash drive.

    Next, install VMWare Player or your virtual machine manager of choice: some alternatives are VirtualBox, Virtual PC, Parallels Desktop, etc., but note that you're best going with either VMWare Player or VirtualBox if you want support from the TAs ;)

    To set up VMWare Player:

    1. Download VMWare Player.
    2. Install it.
    3. Reboot, if required.
    4. Go to Start / Settings / Control Panel / Network Connections / VMWare Network Adaptor VMNet1 and select Properties.
    5. Highlight Internet Protocol(TCP/IP) and click the Properties button.
    6. Select Use the following IP address and enter 192.168.93.1 (this can be whatever local address you like, really--just make sure it doesn't conflict with your computer's IP address or that of another device on the network) and 255.255.255.0 for the subnet mask, then OK until everything is closed.
    7. On a Linux machine, the setup for this is somewhat different, so ask the TAs if you cannot figure it out yourself.
    8. Unpack, then run the VM by double-clicking the .vmx file. This file contains the settings for the VM and should launch it automatically.
    9. See the section on virtual machine accounts for details on how to log in.

    To set up VirtualBox:

    1. Download VirtualBox.
    2. Install it.
    3. Reboot, if required.
    4. Run VirtualBox, and go to File -> Preferences -> Network -> Add host-only network (a button at the right). Click OK.
    5. Unpack the VM. In VirtualBox, select the New button.
    6. Name the VM, select Linux for the operating system, and select Fedora (64-bit) for the version. Click Next.
    7. Set the base memory size as your host computer permits. At least 1GB would be good. Click Next.
    8. For the startup disk, select Use existing hard disk and navigate to FC13-CSE451.vmdk. Click Next, then Create.
    9. Right click on the VM you created, and select Settings. Under Network, select Host-only Adapter under Attached to:. Click OK.
    10. Enable more features under the Settings menu as you like; for example, you can increase the number of visible processor cores.
    11. Once you run the VM, see the section on virtual machine accounts for details on how to log in.

Virtual Machine Accounts

451user / 451userpassword

The account under which most of your work takes place. You can gain privilege (become root) to execute a single command by sudo cmd. You can become root until you ctrl-d by sudo -s.

root / rootpassword

Enough said.

forkuser / forkuserpassword

A spare user account, for emergency use. This account can sudo, so can do root-y things.

Virtual Machine Files

~451user/project1

Where your work should go.

~451user/project1/kernel/linux-2.6.38.2

Contains the kernel source, ready for re-building.

/boot/vmlinuz-2.6.38.2-CSE451

Your installed kernel. The VM boots this kernel by default. The one the VM comes with is basically an unadulterated build of the 2.6.38.2 kernel source. Once you modify and install the kernel, it's possible you won't be able to boot this kernel. If that happens, choose one of the others offered during boot. The machine should come up, and your files will be accessible.