0% found this document useful (0 votes)
9 views

Cloud Computing Lab - Removed

Uploaded by

jaimahad4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Cloud Computing Lab - Removed

Uploaded by

jaimahad4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

25

26
27
28
29
30
NOW OUR TASK IS TO RUN OUR OWN PAGE. TO DO THIS SOME MORE
STEPS OR COMMANDS ARE REQUIRED.

Commands are:

(a) Pwd: to check our present working directory as we need to change it.
(b) cd ..
(c) cd ..
(d) ls: for listing the elements present.
(e) cd var
(f) ls
(g) cd www
(h) ls
(i) sudo chmod 777 html (This command is very important to as it
provides full authority to make changes in the file or directory. Either
you are using CLI or FileZilla)

32
33
34
IMAGES OF THE EXAMPLE PROVIDED

36
37
38
39
40
Experiment 3

Implementation of para-virtualization using vm ware workstation or


oracle virtual box and guest Os.

41
Note that a bare-metal hypervisor, namely XEN is implemented in our installations.

a) Type 1 hypervisor

Figure 2.1. Type 1 Hypervisor cf.[5].

When we talk about Type 1 hypervisors we are talking about the bare-metal hypervisors. A bare-
metal virtual machine monitor is the hypervisor which is got installed directly onto the hardware.
Thus, a bare-metal virtualization hypervisor does not require us to install a server operating
system first. Bare-metal virtualization means the hypervisor has direct access to hardware
resources, which results in better performance, scalability and stability. A Type 1 hypervisor
provides better performance and greater flexibility because it operates as a thin layer designed to
expose hardware resources to virtual machines, reducing the overhead required to run the
hypervisor itself. The most popular examples of this kind are the following:

46
i. VMware ESX and ESXI
ii. Microsoft Hyper-V
iii. XEN

It is important to clarify at this point what “Domain-0 and Domain-U” mean also.

• Domain-0 / Privileged Domain: A Virtual Machine which has privileged access to


the hypervisor. It manages the hypervisor and the other domains.

• Domain-U / Guest Domains: Domains that are created by Domain-0.Sometimes


simply known as Guest or Dom-U.

b) Type 2 hypervisor

Figure 2.2. Type 2 Hypervisor cf[5].

Unlike the bare-metal virtualization hypervisor, a hosted hypervisor requires you to first install an
OS. These hypervisors are basically like applications that install on a guest OS. This approach
provides better hardware compatibility than bare-metal virtualization, because the OS is
responsible for the hardware drivers instead of the hypervisor.

But there are some drawbacks of this kind. Since a Type 2 hypervisor does not have direct access
to hardware and must go through the OS this process increases resource overhead and can
degrade virtual machine (VM) performance. Also, because there are typically many services and
applications running on the host OS, the hypervisor often steals resources from the VMs running
on it.

While Bare-metal virtualization technology fits well for enterprise data centers, hosted
hypervisors are common for desktops, because they allow you to run multiple operating systems.
These virtualization hypervisor types are also popular for developers, to maintain application
compatibility on modern operating systems. The most popular hosted virtualization hypervisors a
47
The Installation will then run for a few more minutes and then restarted. This time, you do not
need to press the installer key to select that the PC should boot from the Ubuntu Installer disk.
You can just leave it to automatically boot from the CPU’s hard disk. The PC then boots up to
the Ubuntu desktop layout and perhaps some congratulatory message to tell you that your
installation was successful.

Figure 3.1 First step in setting up Ubuntu installation.

55
Figure 3.2 second step in Ubuntu installation

56
Figure 3.3 third step in Ubuntu installation

57
Figure 3.4 Sample existing Hard disk partitioning.

c) Partitioning the hard disk


Partitioning the hard disk could be tricky at times; this could be in some cases as a result of
the available hard disk spaces and also how the hard disk configuration in the CPU is
installed. Some CPUs have more than one Hard disk and this can be confusing. I will advise
you to take a look at figure 4.5 before continuing to read further.
If there are 2 hard disks in the CPU, we are most likely to see 2 sets of free spaces when the
disk partition pages boots. The most common being “sda1” and “sdb1”, and can have default
partitioning configurations. Erase the existing partitions if there is any and then create the new
partitions yourself to suit your configuration plan. Existing partitions can be in form of default
swap partition and UEFI partition. To erase an existing partition, simply click on the partition
and then click on “-”, This is can be seen in Figure 3.4. To create a new partition, click on the
free space and then click on “+”, this will then prompt you to choose what type of partition
you wish to create. According to our table, we want to create 4 partitions, one for the UEFI
file system, one for the swap space, one for the main Ubuntu operating system the system will
run on and finally, one for which all the virtual machine files are stored. Each of these has
different configurations in nature, and therefore be created a primary partition. For instance,
on the prompt of what type of partition we want to create when creating the UEFI file system
partition, we first type in the size we want the partition to hold then we should select

58
“primary”, for “type of the partition” and “beginning of space” for “Location for the new
partition” This is basically telling the partition system to be created from the next immediate
block in the hard disk. Then finally select “EFI boot partition” at the point “use as”. That is
where we specify what type of partition we wish to create.
We can follow the steps below in Figure 3.5 to create the partitioning table we desire.
Please note that Partitions for the Ubuntu OS and that of which will hold the Virtual machines
should be created as an EXT2 file system. The EXT2 file system is the default for Ubuntu
Operating systems. cf.[1][2][8]. After which the table should look like figure 3.6

Figure 3.5 Sample Ubuntu partitioning for para-virtualization.

59
Figure 3.6 Sample partition table for para-virtualization.

d) Install synaptic package installer


Synaptic package installer is a graphical package management software for “apt” which is a
feature in Ubuntu when installing 3rd party software. There are various other package installer,
which works with “apt”, but in our experiment, we use Synaptic which in my opinion is easier
and convenient to search and install Ubuntu 3rd party software.
To Install Synaptic package installer, click on “software center” in the application menu to the
left of the Ubuntu desktop. Then at the search bar, type “Synaptic package installer”. You
will immediately identify the synaptic package installer in the results (it is most likely the first
displayed in the list). Double click on it and follow the prompts thereafter to install it. See
figure 3.7 below for reference.

60
Figure 3.7 Installing Synaptic package manager.

e) Install xen, xen tools, bridge utils and lvm2, with synaptic.
Just like the title of this subsection, we will use Synaptic package installer to install the above
mentioned software packages. To open synaptic, click on applications, it is to the top-left of
the start-up menu of the Ubuntu desktop. At synaptic, click on the search bar and search for
XEN. A list of results will be displayed. Select “XEN-hypervisor-4.3-amd64” and click on the
radio button by the side to mark it for installation. As at the time of this experiment, it is the
latest version of XEN hypervisor software release. You may need to scroll down a bit to find
it in the list of results displayed by synaptic package installer. Figure 3.8 shows how you can
search for a package with “synaptic package installer” while Figure 3.9 gives a glimpse of
how a sample result could look like. In the same way, search for the other packages listed
above i.e. “xen- tools”, “bridge-utils” and “Lvm2”. Please note that in some cases, “xen-
tools” can be included in the xen 4.3 packages. If this is the case, you can ignore installing
“xen-tools”. You can know this be seeing the result from “xen-tools” search highlighted in
green, which means that it has been installed. For best performance, please install the
packages in the order in which they are listed.

61
Figure 3.8 Sample Synaptic search.

Figure 3.9 Sample Synaptic results.

In the next chapter, we’ll look at how we configure these installed software packages with
terminal console.

62
CHAPTER 4
CONFIGURING XEN AND THE XEN NETWORK BRIDGE
1. INTRODUCTORY CONCEPTS
In the previous chapter, we learnt how to install the components necessary for para-virtualization.
In this chapter, we’ll learn how to configure the different component to support para-
virtualization. Most of which will be done using the Command Line interface (CLI).

a) The CLI (command line interface): Just like its name, “Command Line Interface”, a text
is written in a terminal and the written text (or command) executes the function of a
particular script in the CPU. In other words, it is an interacting program from which the
user interacts with a computer program or a scripting language in form of successive line
of texts. Figure 4.1 below shows how a sample CLI interface when it is being run.

Figure 4.1. Sample command line interface

b) Scripting language: It is a programming language that supports other programs made for
special run time applications that can interpret task executions that could also be
executed a human operator. Xen, Xen-tools, bridge-utils, lvm2 and a host of many other
software applications can be executed with a scripting language.

63
testing system uses it to for installing Debian-derived Operating system test VMs and it
can also be run from Command line. Ubuntu itself is a distribution based on Debian. cf.
[10]

c) LVM2 (logical volume manager distribution 2)


A logical volume manager is a software layer on top of hard disk and partitions, which
creates ease of use of the CPU’s hard disk management such as re-partitioning and back
up. cf. [11]

d) Bridge-Utils (bridge utility)


Bridge-Utils is a software layer on top of the CPU’s Ethernet card, which creates ease of use
of the CPU’s Ethernet interface for network sharing among the VMs. Without a network
bridge; we cannot connect the VM to the physical Ethernet interface. And that's the beauty
of virtualization, (resource sharing). Each VM needs an IP address to connect to the Internet
and to be able to achieve that; there should be a virtual bridge, which manages the
connection between the Ethernet interface and the VMs. With bridge-utils, we can be able to
achieve that. The bridge utility or simply bridge-utils package contains a utility needed to
create and manage network bridge devices. This is useful in setting up networks for a guest
virtual machine. It can be verified whether or not the PC has this packet through the
Software Center. When you type the name in the Software Center, if it pops up ticked then
that means that it is already installed. To be able to understand how a network bridge works,
we’ll introduce you to the concept of routing, network address translation and dynamic host
configuration protocol (DHCP). cf. [12]

Private ip addres #1 Public ip address Private ip address #2

Router 1 Router 2

Figure 4.2 Concept of routing.

• Routing: it is the process of selecting the best path for a network during
communication. All network devices must have a routing address called the “IP
Address”. In network bridging, VMs are assigned IP addresses to be able to use
the network through a network address translation protocol. All these
functionalities are embedded in the bridge-utils. cf. [12]. Figure 4.2 above gives us

64
• Network Address Translation (NAT): It is a networking protocol used in IPv4
addressing which allows multiple devices to connect to a public network at the
same time, utilizing the same public IPv4 address. With a virtual network bridge,
we can be able to connect to the Internet from the virtual machines through NAT.
cf. [12]. Figure 4.3 gives us an overview of how the NAT is deployed in routing of
packets.

• Dynamic Host Configuration Protocol (DHCP):


This is a standardized networking protocol utilized on IP networks. It dynamically
assigns IP addresses and other information that a device needs for Internet
communication. All devices on a DHCP network can receive IP address
automatically from the central DHCP server, this reduces the need for a network
administrator or a user to configure these settings manually. cf. [12].

ET T
PRIVATE INTERN
PUBLIC
INTERNET NAT switc

Figure 4.3 Connecting to the Internet via NAT.

2. OPENING THE CLI (Terminal)


To begin configurations of xen, we need to open the CLI (terminal) program and start writing
the configurations command into the computer. Unlike the other times where you just have to
click on buttons and the computer will execute a command, this time, the command will be
given in form of texts.
To open CLI, click on “applications” it is to the top left of your desktop menu in Ubuntu, then
click on the search bar and type “terminal”, then click on the displayed result.

3. ENABLE ROOT LOGIN AND SU (SUPER USER)


In Linux, there is a Super User named Root. By default it has access to all commands and files
running on the operating system. Among root's powers is the ability to modify the system in
any way desired and provide access permissions. Thus first thing to be done is to make it
enabled.
Choose root password by typing the command below in the CLI:

sudo passwd

You will be prompted to enter the current administrative password, which was created by the
65
4. LOGIN AS ROOT USER (super user):
• After creating the root password, login as the root user (super user) with the command
below
su –

− You will be prompted to type in the root password after entering the above
command. Enter the password, which you created in step “3” above. These steps can
be seen in figure 4.4 below.

Figure 4.4 Enabling the SU (root / super user).

5. FIX SOME ISSUES IN UBUNTU 13.04 (Not required in Ubuntu 13.10 and later)
If you are installing a later version of Ubuntu i.e. “Ubuntu 13.10”, you do not need to do this
step. Gnome is a free-open source desktop environment and graphical user interface that runs
on top of a computer operating system. Enable the start-up of Firefox by assigning the right
permissions to gnome:
cd/home/<user>;
sudo chown –R <user>:<user> /home/<user>

6. ENABLE THE BOOTING OF UBUNTU WITH XEN IN THE GRUB BOOT LOADER
A boot loader is the first software program that runs when a computer starts. When the PC is
turned on, the operating system is loaded into memory by a special program called a “boot

66
100
Controller node: This node is responsible for providing most of the OpenStack services such as
identity, image store, dashboard, etc.

Compute node (Nova): This is responsible for managing and automating compute
instances (VMs) in the OpenStack environment.

Networking (Neutron): This enables networking connectivity and IP addresses for


users.

Block storage node (Cinder): This node is used to provide persistent storage for the instances
running at OpenStack.

Object storage (Swift): This is used for ensuring redundant, scalable, and fault-
tolerant storage in the server cluster.

Minimum hardware requirements to set up OpenStack

The minimum hardware requirements for installing OpenStack may vary depending on the
specific components and services you want to deploy, as well as the scale of your intended.

deployment. However, a general guideline for the minimum hardware requirements for an
OpenStack deployment is given in Table 1.

103
Install the OpenStack packages: Give the following command to install these packages:

$ sudo apt install -y software-properties-common

$ sudo add-apt-repository cloud-archive:wallaby

$ sudo apt update

$ sudo apt install -y openstack-dashboard

Configure networking: You may need to configure your networking settings based on your
OpenStack deployment requirements. This involves setting up network bridges, configuring
network interfaces, or other network-related settings. The following command is executed for
configuration:

$ sudo dpkg-reconfigure openstack-dashboard

The networking configurtion of our deployed Op

enStack
architecture is shown in Figure 2.

105

Configure authentication: OpenStack uses authentication mechanisms such as


Creating a virtual machine on the deployed OpenStack
setup

Create router with the required parameters: After logging into the
OpenStack dashboard, click on network> routers>create a router. As
shown in Figure 4, provide the router name (OSFY Testing Gateway) and
select the external network.

107
109
Figure 4: Create a router and an external network at OpenStack

Configure the network: In this step, configure the network, subnet, and IP address
for the deployed VM instance. In the subnet tab, provide a subnet name, network
address, and gateway IP.

Launch instance: Finally, from the compute->instance option, launch the


instance. After some time, the deployed instance will start running, as shown
in Figure 5.

Figure 5: Final launch of virtual machine instance at the OpenStack

OpenStack is a popular choice for building private clouds due to


its open source nature, flexibility, and modular architecture. It is
widely used by organisations and cloud service providers to build
and manage private, pu
110

You might also like