The Open Source Virtual Lab: A Case Study
The Open Source Virtual Lab: A Case Study
Ernesto Damiani
Fulvio Frati
Davide Rebeccani
Department of Information
Technology
University of Milan
Italy
Department of Information
Technology
University of Milan
Italy
Department of Information
Technology
University of Milan
Italy
ABSTRACT
E-Learning is becoming a standard issue for Information
Technologies degree courses. Video lessons, on-line exercises, and didactic forums, with interactions with tutors
and teachers are already provided by current on-line degree
courses. Within this scenario, there is a lack of virtual environments to allow students to make real experiences on
network programming and configuration. In order to plug
this gap, within the on-line degree course of Security of
Informatics Systems and Networks provided by University
of Milan, our group designed and realized the Virtual Lab,
to offer to students a complete training environment accessible via web directly from normal web browser. This paper
describes our fully open source solution and supplies a road
map for other future works on virtual laboratories and online
teaching.
Keywords
e-Learning, On-Line degree courses, Open Source, Virtual
Laboratories, Xen
1.
INTRODUCTION
Providing hands-on experience by using computer and making exercises on network configuration and security-related
issues are essential for current Information Technologies (IT)
education. In fact, IT degrees rely on laboratory activities, especially for courses that aim to provide an experience on network programming. Many universities, therefore, developed security laboratories, from which realistic
experience of security technologies, network programming
and tools become available for students. Thanks to Internet
technologies, it is now possible to offer courses and laboratories on the web that satisfy all functionalities of conventional laboratories. However, some issues remain to be
solved. For instance, conventional laboratories usually are
implemented on an isolated network which allows students
to exercise on network programming, firewall design, etc.
Although this isolation, that prevents students from per-
forming some dangerous operations, there are several problems, like system failures, that can be recovered manually
only if they take place in a conventional laboratory. The
computational resource requested and the fact that virtual
machines must be used with administrator privileges, make
virtual laboratories very difficult to develop. Nevertheless,
they are of paramount importance in case of remote teaching
and e-Learning experience, especially in Information Technologies related courses. This idea, coupled with the eLearning Strategies of University of Milan1 and the Italian legislation (ministerial decree 17.4.2003, http://www.
mininnovazione.it/ita/normativa/allegati/Decreto17_
04_03.pdf) that defines the possibility of online university
degrees, constitutes the bases of University of Milans CdL
(Corso di Laurea, degree course) online project. This online course, focused on security related issues, provides an
e-Learning experience with a full support of a virtual laboratory. This kind of e-Learning experience is not only an online
distribution of course related material: CdL online is not a
simple online version of a normal university course but
an online focused course with a totally re-minded and redesigned teaching context. The e-Learning model used is a
blended model based on the presence of different teaching
situations: traditional lessons, online video-lessons, forum
activities, online exercises and laboratory exercises. In this
context, we develop the Virtual Lab project basing only on
open source technologies. This fully open source system has
been developed using Xen platform on top of Gentoo Linux
distribution. In this manner we overcome all problems related to virtual networking laboratory and networking programming on virtual network using powerful Linux scripts.
The purpose of this paper is to present our fully open source
virtual laboratory for e-Learning on University course of IT,
and to propose an ideal road map for other future works on
virtual laboratories and online teaching. This paper is organized as follows. Section 2 presents related works about
existing implementations of remote laboratories and available virtualization techniques. Section 3 globally describes
the entities of our environment. Section 4 shows the Virtual
Lab system framework and the implemented technologies.
Section 5 describes in details how we configured the Virtual
Lab environment. Section 6 lists some expected enhanced of
1
This strategies is well delineated in international congresses: e-Learning: una sfida per luniversit`
a. Strategie, metodi, modelli (11-13 November 2002) and the following meetings e-Learning 2003 ANEE (30 June 2003)
and Qualit`
a nella gestione di progetti di e-Learning (June
2004)
2. BACKGROUND
2.1 Related Work
Remote laboratories represent the translation of in-situ laboratory experiments to distance learning (or e-Learning), offering remote access to real laboratory equipments and real
instruments. New way for e-Learning is a virtual laboratory,
where a simulation system commonly replaces the real system. Virtual laboratories typically were born for simulation
software such as Matlab+Simulink in case of [6] or LabView
for [15] or web-based training system for Information Technology Security named Telelab [10, 11], that provides to
students virtual machines related on a particular security
exercise. Yet, one has to take care that such software can
be also used for real system control. One can find remote
(or virtual) laboratory experiments in various scientific and
technical topics such as automatic control in [7], electronics,
chemicals and mechanicals in [8] and robotics in [5, 14].
2.2
3.
SYSTEM DESCRIPTION
4.
The system framework of Virtual Lab can be examined focusing on three aspects:
the Hardware of the Virtual Server and the Firewall;
the Virtualization software;
the Virtual Machines.
Each of these aspects is explained in details in the following
sections.
4.1
Hardware
from external attacks and to preserve virtual server performance. The firewall has the following features: a FujitsuSiemens Primergy RX-100 S2 with an Intel Pentium 4 CPU
at 3.00 Ghz, 1Gb RAM memory and two 80Gb SATA hard
disks. Further, it is connected to the external net with an
Intel Corporation 82541 GI/PI Gigabit Ethernet network
interface.
The maximum number of VMs running simultaneously on
our system is currently about 90, and the storage occupation
is currently of about 300 Gb, that allows us to fully manage
all students of current and future academic years.
4.2
4.3
Virtual Machines
4.3.1
Gentoo
5.
5.1
Network Configuration
The initial stage of VMs network configuration is the creation of VM images. In fact, each VM is composed of a root
kernel = "/home/kernels/vmlinuz-2.6"
memory = 512
name = "vm-10058"
vif = [ ]
ip = "10.0.0.1"
netmask = "255.255.255.0"
gateway = "10.0.0.254"
disk = [file:/vm/root-10001,hda1,w,
file:/vm/swap-10001,hda2,w]
root = "/dev/hda1 ro"
Figure 3: Xen virtual machine configuration file example.
image, that represents the available disk space and contains
the operating system and the installed packages, and a swap
image, used to manage memory swaps. We create an initial
2 Gb image over which we install a basic version of Gentoo.
This image contains all essential services and, in particular,
a complete gcc compiler and tools such as iptables, text editors, Perl and Python. The swap image is created by the
mkswap command and has a size of 256 Mb. At this point,
we have to associate each student with the relative root and
swap images. Students root and swap images are automatically created by a shell script, that reads students id and
copies the original images naming them by the concatenation of the string root and swap with the student id
plus 10000.
The next stage is to create for each VM the relative Xen
configuration file, that contains all the settings specific to
this VM. Figure 3 shows an example of Xen configuration
file created by a shell script for the student id 1. Except
for small differences, all the VMs share the same settings
[20]:
kernel : indicate which kernel load at boot time;
memory: indicate the amount of server memory to
assign to the VM. This value is tuned basing on VM
purposes and installed packages;
name: indicate the name to assign to the VM. Since
it has to be unique within the Xen environment and
it is used to refer to the specific VM, it is created
concatenating the string vm- with the student id
plus 10000.
vif : allow to specify additional options for the virtual
network interface, as for instance the VM MAC address;
ip: set a static IP address to the VM. IP addresses are
assigned sequentially and all students of the same year
share the same subnet. For the next year, IP addresses
will be in the form of 10.0.1.x;
netmask : set the netmask, allowing students to communicate only with VMs owned by students of the
same year. In particular, they can communicate only
with machines that share the same subnet;
gateway: set the VM common gateway. The gateway is
responsible for the management of the packets through
5.2
Firewall Configuration
In the Virtual Lab project, the firewall has three main goals:
protects the server from external attacks, isolates VMs from
the external net, and forwards connections from student
computer, through the e-Learning platform, to the relative
VM via ssh. Note that each VM has a local IP address and
can not be accessed from the external without some specific
firewall configurations.
Figure 5 shows the communication flow between the platform, with its public IP address,
accessed by a student, to the virtual server through the firewall. In particular, the figure explains how the student,
whose id is equal to 1, through the platform, accesses to
the firewall; the port number used to connect identifies univocally the VM owned by the student. Based on this port
number, firewall rules forward the incoming connection to
the right local IP, identifying the VM, to the well-known
ssh port 22. Looking at the example in Figure 5, the incoming communication on port 10001 is forwarded to local
IP 10.0.0.1 on port 22, hence to VM 1. Figure 4 supplies
an example of firewall rules, created by a shell script, that
forward connections from port 10001 to the local IP 10.0.0.1
on the port 22 and vice versa. The first statement in the example literally says to add to the NAT table of the firewall
a rule to intercept all incoming packets from the external
interface, on the TCP protocol, on the 10001 port and to
forward them to the local IP 10.0.0.1, the VM running on
the virtual server, on the port 22. The second statement
add a rule to the FORWARD chain; this rule accepts all
incoming connections from the external interface to the internal interface that are directed to the local IP 10.0.0.1 on
the port 22 [16].
5.3
Platform Connection
6.
FUTURE WORKS
7.
CONCLUSIONS
Figure 5: Communications between virtual machines and the external net through Xen-bridge.
#!/bin/bash
XM="/usr/sbin/xm"
MACHINES_CONFIG="/vm"
CONFIG_PREFIX="config-"
case "$1" in
start)
sudo $XM create
$MACHINES_CONFIG/$CONFIG_PREFIX$2
;;
stop)
sudo $XM shutdown
sudo xm list|grep $2|awk {print $2}
sleep 10
if [ -z sudo losetup -a |
grep root-$2 |
cut -d ":" -f 1 ];
then
exit;
else
sudo losetup -d
sudo losetup -a |
grep root-$2|
cut -d ":" -f 1
sudo losetup -d
sudo losetup -a |
grep swap-$2|
cut -d ":" -f 1
fi
;;
esac
exit 0
Acknowledgments
8.
ADDITIONAL AUTHORS
Additional authors:
Marco Anisetti (Department of Information Technology, University of Milan, email: [email protected]),
Valerio Bellandi (Department of Information Technology,
University of Milan, email: [email protected]), and
Umberto Raimondi (Department of Information Technology,
University of Milan, email: [email protected]).
9.
REFERENCES
[1] AppGate Network Security - MindTerm,
http://www.appgate.com/products/80_MindTerm/,
April 2006.
[2] P. Barham, B. Dragovic, K. Fraser, S. Hand, T.
Harris, A. Ho, R. Neugebauer, I. Pratt, and Andrew
Warfield: Xen and the Art of Virtualization, In
Proceedings of the nineteenth ACM symposium on
Operating systems principles, Operating Systems