Virtualization As a Teaching Tool
Total Page:16
File Type:pdf, Size:1020Kb
DISTANCE LEARNING, MULTIMEDIA and VIDEO TECHNOLOGIES Virtualization as a Teaching Tool MICHAL BLIŽŇÁK, JIŘÍ VOJTĚŠEK, RADEK MATUŠŮ, TOMÁŠ DULÍK Faculty of Applied Informatics Tomas Bata University in Zlin Nad Stráněmi 4511, 760 05 Zlin CZECH REPUBLIC Abstract: - Nowadays, the virtualization technologies are more and more often used in many informatics areas. They are applied for better utilization of existing hardware or software resources, servers’ consolidation and for security reasons as well. This article shows how is possible to used the virtualization technology also in the academic environment as a support of laboratory exercises of two academic courses. The case study is based on the idea of virtualization of the physical computer for lower costs and security reasons. The VMWare and VirtualBox were chosen suitable programs for demonstration. However, described approaches and techniques can be applied to many others fields, not only in these two courses. Key-Words: - Virtualization, VMWare, VirtualBox, VNC, NoMachine NX server, Parallel programming, Operating systems, e-Learning 1 Introduction Briefly, what the virtualization is? Virtualization, in The main advantage of the virtualization is that it general, is an abstraction layer that decouples the could rapidly reduce cost and dangerousness of the physical hardware from the operating system to deliver experiments. greater IT resource utilization and flexibility. This paper will present the use of virtualization in Virtualization allows multiple virtual machines (VM), two courses in Tomas Bata University in Zlin – Parallel with heterogeneous operating systems to run in isolation, Programming and Operating Systems. side-by-side on the same physical machine. Each virtual machine has its own set of virtual hardware (e.g., RAM, 2.1 The Use in the Parallel Programming Course CPU, NIC, etc.) upon which an operating system and Imagine a situation when students are learning various applications are loaded. The operating system sees a programming techniques dealing with algorithm consistent, normalized set of hardware regardless of the parallelization and distributed computing. actual physical hardware components [1]. One of the most important parts of the learning curve There are many ways how to provide the virtualized is the verification of the obtained knowledge in the real environment. An emulation of the underlying raw conditions, so it is obvious that students should test their hardware can be used (so called Type 1 a 2 hypervisors parallel application on the real parallel computation [2]) as well as some form of paravirtualization [3]. system. Assume that the students are learning the However, this article doesn’t deal with technological programming techniques suitable for SMP parallel background of various virtualization technologies but is computers with the shared memory architecture aimed to their usage area. (generally all presently shipped multi-core desktop So, let’s focus on the advantages which the computers, workstations, servers and notebooks). One of virtualization brings to the informatics (especially in the the possible ways how to do this is to provide each academic environment) area. This article describes student with one multi-core computer. It is obvious that virtual HW/SW environment used as the support of this solution is not ideal – the multi-core computer are parallel applications development training [4] and a still quite expensive, moreover, the utilization of their teaching tool for teaching of a operating systems basics. computing power and other hardware resources (RAM, disk space, etc.) can be poor in this scenario. So, what 2 The Fields of Usage solution provides efficient learning conditions as well as the most effective hardware and software utilization? Virtualization has many fields to apply. Starting with The solution of the situation described above is to simple demonstrative examples, advertisements, etc. through the training applications for teaching purposes usage of one multi-core computer with high number of CPUs/cores and sufficient amount of the RAM and other for several not only computer-oriented courses in HW resources. This system can be then partitioned into universities to the complex virtual machines in industry, several virtual parallel machines sharing the underlying training kits for NASA etc. ISSN: 1790-5109 214 ISBN: 978-960-474-005-5 DISTANCE LEARNING, MULTIMEDIA and VIDEO TECHNOLOGIES hardware running on the host machine. To achieve this, 2.2 The Use in Operating Systems Course some form of hypervisor monitor must run on the host In common offices the number of people accessing one machine (the currently available hypervisor monitors desktop PC, workstation or notebook is limited. In differs mainly in the way how they manage the contrast, in academic environment, especially in the case virtualized HW and whether they run on the top of the of computer used by the students the amount of the users host OS or on the “bare metal”). is simply great. Moreover, often is very difficult The first one is shown on the Figure 1. In this (sometimes impossible) to watch all students’ activities scenario, the hypervisor monitor runs directly on the performed on the workstations. It is obvious that this fact hardware which is partitioned into several independent can quite often lead to corruption of PC’s operation virtual machines where each of those is configured as system integrity and necessity to reinstall whole OS all two-processor computer with adequate amount of software equipment. This is much more critical in the assigned physical system memory. Operating Systems course, where we expect students to modify system configuration which could corrupt system and lead to reinstall of the system. In this situation the virtualization technology can very significantly simplify a software administrator’s life. On reason is that the virtual machine (VM) is completely separated from the host environment (OS). Operational memory and VM’s file system are fully virtualized via a file system of the host OS (similarly to classic swap files) so potential virus’ attack or crash of the guest OS cannot involve the host OS. Moreover, it is very simple to backup whole virtual machine (including its configuration, OS and installed software applications) thus any necessary reinstallation Fig. 1 Virtualized environment without host OS can be quickly done by simple rewriting of the damaged VM by the archived image. The second possible configuration shown in the The last great advantage of the VM is that it could Figure 2 differs from the first one in the sense that the emulate several types of OS independently on the host hypervisor monitor doesn't run directly on the virtualized OS – e.g. you can run Linux on Windows Vista host OS hardware, but on the top of any supported OS. This without restart etc. scenario is suitable for a situation when the underlying hardware is not directly supported by the hypervisor so 3 Software for VM some other suitable OS must be used for managing it and There are several suitable softwares which can be used the hypervisor uses the virtualized HW via the host OS’s for purposes described in previous chapter – Bochs, device drivers. DosBox, Xen, Virtual PC etc. which differs in several ways – USB support, 3D acceleration, Graphical User Interface (GUI) and of course price. Some features of these softwares are shown in Table 1 and Table 2 [5]. Method of 3D Name USB/GUI operation acceleration Bochs Emulation partially/yes no DosBox Emulation no/yes no VirtualPC Virtualization yes/yes no VMWare Virtualization yes/yes yes VirtualBox Virtualization yes/yes partially Xen Paravirtualization no/partially partially Table 1 General information about some VM Fig. 2 Virtualized environment with host OS This paper is focused mainly on two members of them – VMWare and VirtualBox. The reason why we ISSN: 1790-5109 215 ISBN: 978-960-474-005-5 DISTANCE LEARNING, MULTIMEDIA and VIDEO TECHNOLOGIES choose these two is that they have all good features new hardware which could help with the testing of a new (USB support, GUI, installers for Windows and Linux server OS, software etc. This version is again freeware. OS etc.). The first one is already used in both courses, the second one is its freeware alternative. 3.2 VirtualBox The second software discussed here is VirtualBox [6] - Name Installers for OS Licence see Figure 4 with VirtualBox with running Windows XP Bochs Win, Linux Free into host Kubuntu Linux. DosBox Win, Linux, Mac Free Virtual PC Win, Mac Free 2007 Shareware + VMWare Win, Linux, Mac Free VirtualBox Win, Linux, Mac Free Xen Linux Free Table 2 VM – installers and licence 3.1 VMWare The virtualization software VMWare [1] is provided in three main versions. The first VMWare Workstation provides all features – create and run multiple virtual machines, take snapshots and videos of virtual machines, clone virtual machines, USB 2.0 support etc. It could run on Windows and Linux hosts. The main disadvantage is that this version is Fig. 4 VirtualBox – Windows XP in host OS Kubuntu commercial but you can try it for 30 days for free. This Linux disadvantage could be overcome with the second version – VMWare player which is freeware but the main feature The program has only one version similar to is that you can only run VM which means that images of VMWare Workstation but the main advantage is that it is these VM must be previously created VMWare free. workstation. You can create and run several VM, use virtual USB Figure 3 shows running VMWare workstation with connection, shared folders to the host OS, Remote Slackware Linux in hosting Windows XP OS. Desktop Protocol etc. VirtualBox could be installed to the Windows, Linux, Mac OS, it has multilanguage GUI and Open-source edition is available too. 4 Accessing the virtual machines Of course, the virtual machines mentioned in the previous chapter must be available for users. From heart of the matter is obvious that the several concurrently running VMs cannot be accessed through standard I/O interface (keyboard, mouse, LCD ...) but some form of terminal approach must be used – see Fig.