Virtual Lab for CIS 192 & 196 Rich Simms May 27, 2006 Overview Microsoft s virtualization technology has been available as a product called Virtual Server. Microsoft recently announced two major changes for Virtual Server 2005 R2. It is now a free download and Linux is supported. A virtual MiddleEarth lab was created was created using Virtual Server on one physical host computer running Windows 2003 Enterprise Edition R2. It is a virtual replica of the physical MiddleEarth lab running at Cabrillo College. There are some differences from the real lab in that the version of Linux is different and the VMs created are not dual boot. Each VM was either loaded with Windows or Linux as shown in the diagram below. The lab-router server was a virtual machine running Linux that bridged the virtual world with the physical world. The Sniffer VM had three interfaces with Ethereal loaded for troubleshooting purposes. Layout Physical Host
The Host computer supporting all these VMs had a single 2.6 GHz Pentium 4 CPU with 2 GB of RAM installed as shown in the following System Properties summary. Lab-Router configuration The VM named lab-router is a Linux server that connects the virtual lab to the home LAN. Eth0 is connected to the home LAN and eth1 is connected to virtual Shire network. Routes were added so MiddleEarth VMs could communicate with PCs on the home LAN. A destination NAT was added so VM s would still think the Cabrillo DNS server was available. The Cabrillo DNS addresses was translated to my home Netgear router which provide DNS services. Commands used: iptables -t nat -A PREROUTING -d 207.62.187.54 -j DNAT --to-destination 192.168.0.1 route add -net 192.168.2.0 netmask 255.255.255.0 gw 172.30.4.107 route add -net 192.168.3.0 netmask 255.255.255.0 gw 172.30.4.107 Routing Table: [root@lab-router root]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.30.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.3.0 172.30.4.107 255.255.255.0 UG 0 0 0 eth1 192.168.2.0 172.30.4.107 255.255.255.0 UG 0 0 0 eth1 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 [root@lab-router root]# - 2-5/27/2006
NAT table: [root@lab-router root]# iptables -L -t nat Chain PREROUTING (policy ACCEPT) target prot opt source destination DNAT all -- anywhere buttercup.cabrillo.eduto:192.168.0.1 Chain POSTROUTING (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination [root@lab-router root]# Lab-router VM configuration Serial Connections Some of the lab assignments required serial connections between computers. There is a way to have a virtual serial cable running between the COM ports of the VMs. This is done by specifying a named pipe as the COM port setting. For example the Com 1 ports on Frodo and Elrond are both set to \\.\pipe\null-modem-cable to enable a serial connection between the two of them. - 3-5/27/2006
Physical Disk Space Each VM occupies about 2 GB of physical disk space. They are kept in the folder shown below on the host machine: - 4-5/27/2006
- 5-5/27/2006
The virtual machines The Windows VMs were loaded with Windows 2003 Standard Edition and the Linux VMs were loaded with Redhat Enterprise Linux AS3. - 6-5/27/2006
Typical Linux VM configuration: - 7-5/27/2006
Typical Windows VM configuration - 8-5/27/2006
Virtual Networks: Example network: - 9-5/27/2006
Resource Allocation: - 10-5/27/2006
Issues with Virtual Server 2005 R2 Most issues that arose were resolved. The first issue I ran into was effective mouse control on a VM when using a Remote Desktop Connection. For example if you had a remote connection into the server hosting the VM s it was just about impossible to control the mouse using the Virtual Machine Remote Control Client. The resolution was to install the Virtual Machine Additions on each Windows VM. With Linux I still have two unresolved issues. One is an annoyance and the other is a serious limitation. The annoyance was that randomly on the Linux VM s you will get the following message: i8253 count too high! Resetting.. It seems to have no impact at all so I have just ignored it. The more serious issue is that I cannot get Linux to run in Graphics mode correctly. The display configuration is wrong resulting in a very stretched out screen. There is no ability to scroll to the right side and the GUI tools are too unreadable to be useful. I thought the not so easy to install VM Additions for Linux would help, especially the vmadd-x11-0.0.1-1.i386.rpm. While they improved mouse control there were no improvements to the display issue. - 11-5/27/2006
I had a similar problem in the past trying to install Linux on my laptop. The solution then was to fiddle with the boot and configuration files till it worked correctly. The Linux VMs work fine in text mode so it is a good way to learn how to do everything from the command line. Later I learned from Jim Griffin that using the VESA video driver completely resolved this issue with graphics mode. Summary This has been a very useful tool and the price is right. VMs are very flexible and useful for doing lab assignments. Being able to save the state of a VM allows you to save of multiple configurations that can be brought back online whenever needed. - 12-5/27/2006