Virtualization Technology (or how my Windows computer gave birth to a bunch of Linux computers)
The purpose of this document is to walk you through creating a Linux Virtual Machine (a guest Operating System) running inside your Windows System (the host Operating System). Note that this is not the only possible combination of guest/host Operating Systems. One can create a Windows Virtual Machine inside a Linux System or a Windows Virtual Machine inside a Windows System, etc. In particular we will discuss using VirtualBox, an open source product, to create guest OS instances in a host OS. What makes this possible is a technology called “Virtualization”, which was invented by IBM for mainframe about 25 years ago. Recently, Virtualization on Intel chips became popular in the computer industry. The main players are VMware and Xen Source, the latter is an open source product. KVM and VirtualBox are the other players.
Virtualization is like car pooling for computers: instead of one Operating System (OS) image running on one physical machine, multiple OS instances run on the same physical host at the same time sharing the physical resources of the single machine. The OS instances do not have to be of the same type. One can have a mixture of OS images running at the same time on a single machine. What makes this possible is a
sophisticated piece of software called “hypervisor”. One can picture a hypervisor as an Operating System of Operating Systems: just like an Operating System scheduling the various processes running on it onto physical processor(s), a hypervisor schedules the Operating Systems onto physical processor(s).
This document does not discuss an enterprise style deployment of virtualization in the sense that hypervisor is first installed on top of bare metal, and then, one creates virtual machines. Rather, we discuss how we can create one or more Virtual Machines inside a host OS. In particular we will choose a Windows host system and will walk through creating a Linux guest System to run inside the Windows host system. The Linux distribution we will use is Ubuntu. (It should be emphasized that one can choose any other Linux distribution to install as a guest OS.)
What you need to download?
• Download VirtualBox software from the following location: http://virtualbox.org/wiki/Downloads
You will need x86 version if you are running a 32-bit Windows OS, which must be the most likely case. If not, then you will need the AMD64 version. The size of the download is about 20 MB. Also, download the User Manual. It has a lot more detail than the discussion in this document.
• Download Ubuntu version 7.10 from the following location: http://www.ubuntu.com/getubuntu/download
Major Steps
• You will first install the VirtualBox software. Just click on the executable you downloaded from VirtualBox site and follow the instructions. Not much to talk about here.
• Start the VirtualBox tool. It has a simple UI that allows you to create virtual machines. We will walk through this step at length below.
• Install the so-called guest additions for additional improvements to your virtual machine like better screen resolution. We will discuss this step below as well. Creating an Ubuntu Linux Virtual Machine to run inside Windows XP
Download VirtualBox and the iso image of Ubuntu 7.10. Install VirtualBox.
Next step is to boot your virtual machine from an OS installation disk. Choose
GUEST ADDITIONS
One issue is screen resolution. By default it is 800X600, which will not be enough for most users. We will need to install guest additions to increase resolution. This will also make navigation in and out of the virtual machine easier as we discussed below.
Do the following in the terminal:
• Change to user root as “ su - root”. You will be prompted the root password. • Then, change directory to “/cdrom”.
STOPPING A VIRTUAL MACHINE
Once you stop your virtual machine, you can see its state and properties in VirtualBox UI as in the snapshot below. Note that you can use the “Discard” button to delete a virtual machine. This will not remove the virtual disk, though. Virtual disks can be deleted by following the link “File -> Virtual Disk Manager” on VirtualBox UI.
Some Links
• VMware is the major company in the Intel Virtualization space. Their WEB site has a lot of good reading on the technology: http://vmware.com/virtualization/ • XEN source is the up-and-coming competitor to VMware. It is open source.
There are some good papers on the technology here: http://xen.org/
• KVM is another open source hypervisor. It is essentially Linux acting as a hypervisor. Another up-and-coming hypervisor: