Computer Science 347 - setting up a VM Fall 2013
The notes below are to set up a VM in the MCS Linux lab at UofTM.
You must be in the CSC347 class, otherwise you will not have the correct permissions.
If you want to do this work at home, you can grab the zip file, using scp or sftp, from
cslinux.utm.utoronto.ca at /virtual_machines/RH72LabImage*.rar. At home, you can download vmware player or virtual box, which should also run the vmware files.
Keywords: vmware, C, memory, stack, data types, data type sizes, pointers, variables, memory address.
Instructions
Start up a terminal
cd /virtual
mkdir your_name
cd your_name
unrar x /virtual_machines/RH72LabImage*.rar
start up vmplayer (type player in a terminal)
Click on "Open a virtual machine", (Next)
Browse to /virtual/your_name/RH72LabImage/Red Hat Linux.vmx
Click Open
Start the virtual machine
Red Hat will start
Username: root/hacker, Password: password. Change this if you run this at home. (In general, it is not good to use the system logged in as a root. Why?)
Type "startx" at the command prompt if you want the GUI
Additional notes:
If you go into the "Full Screnn" mode in vmware, hit Right CTRL+ALT simultaneously to return into the normal mode.
The host computer (the linux computer) is 192.168.81.1
You can find the IP address your VM has been allocated from "ifconfig". For example, the IP of my Red Hat is 192.168.82.128
Copying files from the local host to the Red Hat VM:
Open up a new terminal in the host
scp /src_path/file.c hacker@[RED_HAT_IP]:/dest_path/file.txt
The typical syntax of scp is equivalent to the syntax of cp (i.e. scp src dst)
For example, the following command will copy test.txt from my desktop on the localhost to the Red Hat VM: "scp test.txt hacker@192.168.82.128:/home/hacker/text.txt"
The following command will copy test.txt from my Red Hat VM to my localhost: "scp hacker@192.168.82.128:/home/hacker/text.txt test.txt