Sei sulla pagina 1di 11

Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.

Global Open Versity


Virtualization Computing Hands-on Labs Training Manual

Step-By-Step Build & Deploy Xen Hypervisor Virtualization on


Linux OpenSUSE 11.3 Server
Kefa Rabah
Global Open Versity, Vancouver Canada
krabah@globalopenversity.org www.globalopenversity.org

Table of Contents Page No.

STEP-BY-STEP BUILD & DEPLOY XEN HYPERVISOR VIRTUALIZATION ON LINUX OPENSUSE 11.3
SERVER 2

Introduction 2

Hands-on Labs Sessions 3

Part 1: Installing and Configuring Xen Package 3


Step 1: Xen Virtualization Overview 3
Step 2: Install Xen Virtualization 4
Step 3: Using Command Line Tools 9

Part 2: Creating a Virtual Machine 12


Step 1: Preparing the System for virt-install 12
Step 2: Running virt-install to build the Xen Guest System 13
Step 3: Install & Configure a Fedora 13 VM 13
Step 4: Run the VM using Command-line 25
Step 5: Modify Firewall Configuration 26
5.1 Task: Disable / Turn off Linux Firewall (Red hat/CentOS/Fedora Core) 26
5.2 Task: Enable / Turn on Linux Firewall (Red hat/CentOS/Fedora Core) 26

Part 3: Installing Apache, PHP, MySQL 27


Step 1: Install LAMP 27
Step 2: Modify Hostname 28
Step 3: Manage your VM using Command-line 29

Part 4: Need More Training on Linux 29


Introduction to the Xen Hypervisor & Virtualization – VCC200 29
Linux Administration Training 30

Part 5: Hands-on Labs Assignments 30

A GOV Open Access Technical Academic Publications


Enhancing education & empowering people worldwide through eLearning in the 21st Century

1
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

Global Open Versity


Virtualization Computing Hands-on Labs Training Manual

Step-By-Step Build & Deploy Xen Hypervisor Virtualization on Linux


OpenSUSE 11.3 Server
By Kefa Rabah, krabah@globalopenversity.org Nov 22, 2010 GTS Institute

Introduction
In computing, Xen® hypervisor is a virtual-machine monitor for IA-32, x86-64, Itanium and PowerPC 970
architectures. It allows several guest operating systems to execute on the same computer hardware
concurrently. The University of Cambridge Computer Laboratory developed the first versions of Xen; as of
2010 the Xen community develops and maintains Xen as free software, licensed under the GNU General
Public License (GPLv2).

Xen systems have a structure with the Xen hypervisor as the lowest and most privileged layer. Above this
layer come one or more guest operating systems, which the hypervisor schedules across the physical
CPUs. The first guest operating system, called in Xen terminology "domain 0" (dom0), boots automatically
when the hypervisor boots and receives special management privileges and direct access to all physical
hardware by default. The system administrator can log into dom0 in order to manage any further guest
operating systems, called "domain U" (domU) in Xen terminology.

Xen is a free open source software virtual machine monitor for Intel / PowerPC architectures. It is software
that runs on a host operating system and allows several guest operating systems to be run on top of the
host on the same computer hardware at the same time (just like VMWare software). Luckily Installing and
managing XEN is quite easy under Linux openSUSE 11.3 Server.

The openSUSE project is a worldwide effort that promotes the use of Linux everywhere. OpenSUSE
creates one of the world's best Linux distributions, working together in an open, transparent and friendly
manner as part of the worldwide Free and Open Source Software community. The latest release,
openSUSE 11.3, features new and massively improved versions of all useful server and desktop
applications. It comes with more than 1,000 open source applications. The openSUSE distribution is a
stable, easy to use and complete multi-purpose distribution. It is aimed for users and developers working
on desktop or server. It's great for beginners, experienced users and ultra geeks, short it's perfect for
everybody! openSUSE is also the base for Novell's award-winning SUSE Linux Enterprise products.

Fedora is a Linux-based operating system that brings the latest in free and open source software to your
desktop, laptop and server, and gives you access to thousands of different open source applications. This
helpful, user-friendly operating system is built by people across the globe; who work together as a
community to create the Fedora Project. Fedora 13 (Goddard) is filled with improvements that make Linux
better than ever for all types of users. Here are a few of the new things you can expect to see when you
try out Fedora 13.

2
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

Hands-on Labs Sessions


In this hands-on lab you will learn how to install and configure Xen Hypervisor on Linux openSUSE 11.3.
It’s assumed that you know how to install and configure Linux openSUSE 11.3 Server. I’ll also show you
how to install & configure your first Fedora 13 virtual machine and use it to deploy a LAMP Server. Upon
completion of this hands-on lab session you should have gained a competency and skills necessary to
install Xen hypervisor with multiple guest machines to build a complete network infrastructure: DNS
server, messaging server etc.

Assumptions:
1. It’s assumed that you have a good understanding of Linux operating system and its working
environment. It’s also assumed that you know how to install and configure Linux openSUSE 11.3
server, if not go ahead and pop over to Docstoc.com and check out a good hands-on manual entitled
“Step-By-Step Install Guide Linux OpenSUSE 11.3 Server v1.1” to get you started.

2. It’s assumed that you have a good understanding of Linux operating system and its working
environment. It’s also assumed that you know how to install and configure Linux Fedora 13 server, if
not go ahead and pop over to Dosctoc.com and check out a good hands-on manual entitled “Step-By-
Step Install Guide Fedora 13 Server v1.0” to get you started.

Part 1: Installing and Configuring Xen Package

Step 1: Xen Virtualization Overview


Xen Virtualization with Novell openSUSE Linux Server 111.3 is quite easy. Virtualization has become the
buzz word of the industry, with people looking at consolidation of multiple servers onto a single server.
Many reasons for consolidation come to mind, including cost reduction, better utilization of hardware, and
better control of resources, more-so in the data center environment. This document will look at
virtualization using Xen on Novell’s open source openSUSE 11.3 servers.

Novell is committed to the propagation of Xen* virtualization technologies. These technologies are
included in the release of openSUSE 11.3 servers, the latest open source server operating system from
Novell. This unique opportunity for Novell to take a leading role in the shift to virtualization-based IT is due
to the convergence of commodity hardware and open source software i.e., Linux running on x86 and x86-
64 computers.

Currently, resource utilization, efficiency, scalability, availability, manageability and security, are today
what they key issues that keep data center managers awake late into the night. Virtualization technologies
can address these concerns and benefit the entire enterprise, but they haven’t been widely adopted, that
is, until recently.

What’s changed? Well, for starters, the data center. To-date, the numbers of physical servers has grown
to unmanageable proportions. Enterprises need virtualization technologies to compensate for the
inefficiencies of increasing server sprawl. Open source Linux has taken a more prominent role in
3
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

enterprises – handling everything from edge services (Web, firewall, DNS and DHCP) to middle-tier
application and middleware; from backend database, e-mail and file serving to commercial high-
performance cluster computing and enterprise grid deployments. More and more enterprises are also
turning to Linux to help address their multi-tier server consolidation issues – and it’s great in terms of ROI
as most of the implementation is from the open source. In addition, Intel and AMD have designed
virtualization functionality into the latest x86 and x86-64 processors – adding hardware support for server
consolidation by enabling strict fault and performance isolation. They’ve also added functionality that
enables unmodified operating systems to run concurrently on the same physical machine.

Step 2: Install Xen Virtualization


Virtualization cannot be that simpler than in openSUSE 11.3. In openSUSE 11.3, Xen Virtualization is pre-
built and all it takes is a few clicks away from up and running with Virtualization in no time. Xen is a virtual
machine monitor for x86 that supports execution of multiple guest operating systems with unprecedented
levels of performance and resource isolation. This package contains the Xen Hypervisor.

1. Login as the root user and then to install Xen Virtualization in openSUSE 11.3 perform the following
procedure:
1. Click Computer Æ YaST. From YaST2 Control Center, click Virtualization Æ Install Hypervisor
Tools, as shown in Fig. 1

Fig. 1
4
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

2. From Fig. 2, Configuring the VM Server (domain 0), click on the Install button start the installation.

Fig. 2

3. From Fig. 3, this system will start downloading the Xen Virtualization packages and the modified
kernel for Xen virtualization. It’ll take several minutes so just relax or grab a cup of coffee.

5
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

Fig. 3

4. When done with the installation, it will prompt you to reboot and start the system by selecting the
openSUSE option with Xen kernel from the list, as shown in Fig. 4. Click on the OK button to reboot
the system.

6
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

Fig. 4

5. From Fig. 5, select Xen – openSUSE 1.3 – 2.6.34.7-0.5 option to boot your system. This will boot
openSUSE with the modified kernel which supports Xen virtualization and everything else should load
normally.

7
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

Fig. 5

6. Let’s install tightVNC for GUI installation of our VMs, run:

# yast –install tightvnc

7. Now, from the Computer icon Æ Applications – System Æ Virtualization and then click on
"Create Virtual Machines" to start creating virtual machines, as shown in Fig. 6.

Fig. 6

8
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

8. You’re now ready to create and install your cool VMs and use them for any application as desired.
You can click on the Forward button and proceed to install a VM. However, for this hands-on session
we’re going to use command-line option to install our VMs. Feel free to use the GUI option.

Fig. 7

9. In the next section I’ll show you that you how to use command-line to test and install your VMs.

Step 3: Using Command Line Tools


1. The system should now automatically boot the new Xen kernel. After the system has booted, we can
check that by running

uname -r

9
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization


Global Open Versity, HPC Cloud Labs Install Guide Xen Virtualization on Linux openSUSE v1.0

Note: well, we have now verified that the system is indeed using the new Xen kernel!

2. Next, run "xm list" to check if Xen has started. It should list "Domain-0" (dom0), see Fig. 4:

Fig. 4

3. Follow the link below to access the full document.

The full document has moved to Docstoc.com. You can access and download it from here:

• Step-By-Step Build and Deploy Xen Hypervisor Virtualization on Linux OpenSUSE 11.3 Server

OR

• http://www.docstoc.com/docs/64800860/Step-By-Step-Build-and-Deploy-Xen-Hypervisor-
Virtualization-on-Linux-OpenSUSE-113-Server

Introduction to the Xen Hypervisor & Virtualization – VCC200


You can now register and take our superb Introduction to the Xen Hypervisor Training course:

• VCC200 – Introduction to the Xen Hypervisor & Virtualization

Contact us today: Email: info@globalopenversity.org URL: www.globalopenversity.org

-----------------------------------------------
Kefa Rabah is the Founder of Global Technology Solutions Institute. Kefa is knowledgeable in several
fields of Science & Technology, Information Security Compliance and Project Management, and
Renewable Energy Systems. He is also the founder of Global Open Versity, a place to enhance your
educating and career goals using the latest innovations and technologies.

Fellow us on Twitter: Global Open Versity and Kefa Rabah


A GOV Open Access Technical Academic Publications
Enhancing education & empowering people worldwide through eLearning in the 21st Century

10
April 2007, Kefa Rabah, Global Open Versity, Vancouver Canada

www.globalopenversity.org VCC200 – Introduction to the Xen Hypervisor & Virtualization

Potrebbero piacerti anche