Final CC LAB - Merged
Final CC LAB - Merged
REGISTER NO:
20CSPL602-CLOUDCOMPUTINGLABORATORY
DEPARTMENT OF
M.TECH
COMPUTER SCIENCE AND ENGINEERING
(5 YEAR INTEGRATED)
Register No.:
EXP PAGE
S/NO DATE TITLEOFTHEEXPERIMENT SIGNATURE
NO NO
INSTALLACCOMPILERINTHEVIRTUAL
2 2 MACHINECREATEDUSINGVIRTUALBOX
AND EXECUTE SIMPLE MACHINE
USEGAELAUNCHERTOLAUNCHWEB
4 4
APPLICATIONS
STUDYONCLOUDSIMISASIMULATION
5 5
TOOLKIT
FINDAPROCEDURETOLAUNCHVIRTUAL
7 7
MACHINE USING TRYSTACK
INSTALLATIONOFHADOOP-ONENODE
8A
CLUSTER
8
WORDCOUNTPROGRAM-USINGMAPAND
8B
REDUCE TASK
Ex. No.: 1 INSTALL VIRTUALBOX WITH DIFFERENT FLAVORS OF LINUX
ON TOP OF WINDOWS 7
Date:
Introduction
Virtualization:
Virtualization is the creation of virtual servers, infrastructures, devices and computing resources.
Virtualization changes the hardware-software relations and is one of the foundational elements
of cloud computing technology that helps utilize the capabilities of cloud computing to the full.
Virtualization techniques allow companies to turn virtual their networks, storage, servers, data,
desktops and applications.
Types of Virtualization
Operating-system-level virtualization - is a server-virtualization method where the kernel of an
operating system allows for multiple isolated user- space instances, instead of just one. Such
instances (sometimes called containers, software containers,[1] virtualization engines (VE),
virtual private servers (VPS), or jails) may look and feel like a realserver from the point of view
of its owners and users Platform / Hardware virtualization -Hardware virtualization or platform
virtualization refers to the creation of a virtual machine that acts like a real computer with an
operating system. Software executed on these virtual machines is separated from the underlying
hardware resources. For example, a computer that is running Microsoft Windows may host a
virtual machine that looks like a computer with the Ubuntu Linux operating system; Ubuntu-
based software can be run on the virtual machine.
In hardware virtualization, the host machine is the actual machine on which the virtualization
takes place, and the guest machine is the virtual machine. The words host and guest are used to
distinguish the software that runs on the physical machine from the software that runs on the
virtual machine. Different types of hardware virtualization include:
o Full virtualization: Almost complete simulation of the actual hardware to allow software,
which typically consists of a guest operating system, to run unmodified.
o Partial virtualization: Some but not all of the target environment is simulated. Some guest
programs, therefore, may need modifications to run in this virtual environment.
o Para virtualization: A hardware environment is not simulated; however, the guest programs are
executed in their own isolated domains, as if they are running on a separate system.
Application virtualization is software technology that encapsulates computer programs from the
underlying operating system on which it is executed. A fully virtualized application is not
installed in the traditional sense, although it is still executed as if it were.
Oracle Virtualbox
o VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop
and embedded use.Each virtual machine can execute its own operating system, including
versions of Microsoft Windows, Linux, BSD, and MS-DOS. VMware Workstation is developed
and sold by VMware, Inc., a division ofEMCCorporation
Ubuntu
o Ubuntu is an operating system like any other and it is free & open source. It means that we can
download it freely and install it on as many computers as we like. By the term open source it
means that we can actually see its code. To provide a more secure environment, the ―SUDO‖
tool is used to assign temporary privileges for performing administrative tasks. Ubuntu comes
installed with a wide range of Software that includes Libre Office ,Firefox, Thunderbird
AIM:
To install Virtualbox with different flavors of linux or windows OS on top of windows host
operating system.
PROCEDURE:
3. Click “Windows host” to download the binary version for windows host.
4. The installer file downloaded will have the file name format like VirtualBox VersionNumber-
BuildNumber-Win.exe. Example: VirtualBox-6.1.12-139181- Win.exe.
5. Double click on the installer to launchthesetupWizard. Click onNext to continue.
6. Custom setup dialog box will be opened. Accept the default settings and clicknext.
7. Select the way you want the features to be installed. You can accept the default and clicknext.
8. A dialog box opens with Network Interfaces warning. Click Yes to proceed.
9. Click install to begin the installation process.
10. When prompted with a message to install (Trust) Oracle Universal Serial Bus, click Install to
continue.
11. After the installation completes, click finish to exit the setup wizard.12. Launch the Oracle
VMVirtualBox.
4. Select the amount of RAM to use(eg: 1000 MB). The ideal amount of RAM will
automatically be selected. Do not increase the RAM into the red section of the slider; keep
the slider in the greensection.
5. Accept the default 'Create a virtual hard drive now' and click the 'Create' button.
6. Choose the hard disk filetypeasVMDK(VirtualBoxDisk).ClickNext.
7. Click Next to accept the default option„ Dynamically allocated‟ for storage on a physical
harddrive.
8. Select the size of the virtual hard disk(eg:8.0 GB) and click create.
9. The newly created virtual machine will be displayed in the dashboard.
10. Download the ISO file [Ubuntu disk image file]. Latest version of Ubuntu iso file can be
downloaded from the link https://ubuntu.com/download/desktop.
11. For previous versions, gotohttp://releases.ubuntu.com. Choose the preferred version of
Ubuntu and download the isofile.
12. To setup the Ubuntu disk image file (iso file) goto settings.
13. Click Storage. Under „Storage Devices‟ section click„Empty‟.
14. In the Attributes section, click the disk image and then "Choose Virtual Optical Disk
File".
15. Browse and select the downloaded iso file. Clickok.
16. Select the newly created virtual machine in the dashboard and click the start button.
23. The Ubuntu OS is ready to use. Login with the username and password.
20. Choose the default and click continue.
21. Setup up your profile by creating username and password.
22. After installation is complete, click 'Restart Now' button and follow the instructions.
23. The Ubuntu OS is ready to use. Login with the username andpassword.
RESULT:
The Virtualbox installation is completed and the Virtual machine is created on top of the
Windows host operating system.
Ex. No.: 2 INSTALL A C COMPILER IN THE VIRTUAL MACHINE
CREATED USING VIRTUAL BOX AND EXECUTE SIMPLE
Date: MACHINE
AIM:
PROCEDURE:
[or]
OUTPUT :
RESULT:
Thus the execution of sample C program using Ubuntu virtual machine is successfully
completed
Ex. No.: 3 INSTALL GOOGLE APP ENGINE. CREATE A HELLO WORLD APP
AND OTHER SIMPLE WEB APPLICATIONS USING PYTHON/JAVA
Date:
Aim:
To install Google App Engine. Create a hello world app and other simple web applications using Python or
Java
Procedure
Result
Thus the installation of Google App Engine, create a hello world app and other simple web applications
using Python
Ex. No.: 4 Use GAE Launcher to launch the web applications
Date:
Aim:
Procedure
Step 8 :And create the files and folder in the following manner
Result
Thus the creation of Google App Engine launcher to launch web applications has been dine successfully and
its output is verified.
Ex. No.: 5 SIMULATE A CLOUD SCENARIO WITH CLOUDSIM AND RUN A
SCHEDULING ALGORITHM
Date:
AIM:
To simulate a cloud scenario using CloudSim and run a scheduling algorithm that is not present in
CloudSim.
PROCEDURE
1. Download NetBeans and Install it.
2. Download CloudSim and unzip it.
3. Once Netbeans IDE is installed, start creating a new Project via File > New Project. Choose
“Java” under Categories and “Java Application” under Projects.
RESULT:
Thus a Cloud Scenario using CloudSim has been generated and a scheduling algorithm that
was not present on it has been run successfully
Ex. No.: 6 Find a procedure to transfer files from one virtual machine to
another virtual machine
Date:
AIM:
To install Virtualbox with different flavors of linux or windows OS on top of windows host
operating system.
PROCEDURE:
3. Enter a name for the new virtual machine. Choose the Type and Version. Note that VirtualBox
automatically changes 'Type' to Linux and 'Version' to 'Ubuntu (64 bit)' if the name is given as
„Ubuntu‟. Click Next.
3. Select the amount of RAM to use(eg: 1000 MB). The ideal amount of RAM will
automatically be selected. Do not increase the RAM into the red section of the slider; keep
the slider in the greensection.
4. Accept the default 'Create a virtual hard drive now' and click the 'Create' button.
5. Choose the hard disk filetypeasVMDK(VirtualBoxDisk).ClickNext.
6. Click Next to accept the default option„ Dynamically allocated‟ for storage on a physical
hard drive.
7. Select the size of the virtual hard disk(eg:8.0 GB) and click create.
8. The newly created virtual machine will be displayed in the dashboard.
9. Download the ISO file [Ubuntu disk image file]. The latest version of Ubuntu iso file can
be downloaded from the link https://ubuntu.com/download/desktop
10. For previous versions, gotohttp://releases.ubuntu.com. Choose the preferred version of
Ubuntu and download the iso file.
Setup ubuntu:
1. To set up the Ubuntu disk image file (iso file) go to settings.
2. Click Storage. Under the „Storage Devices‟ section click„Empty‟.
3. In the Attributes section, click the disk image and then "Choose Virtual Optical Disk
File".
4. Browse and select the downloaded iso file. Click ok.
5. Select the newly created virtual machine in the dashboard and click the start button.
6. In the welcome screen, click the “Install Ubuntu” button
12. The Ubuntu OS is ready to use. Login with the username and password.
13. Choose the default and click continue.
14. Setup up your profile by creating username and password.
15. After installation is complete, click 'Restart Now' button and follow the instructions.
20. The Ubuntu OS is ready to use. Login with the username andpassword.
TRANSFERING FILES FROM ONE VM TO ANOTHER VM:
Step 1: Creating virtual machines in Oracle VirtualBox with Ubuntu and another OS establishes separate
environments for file transfer. Virtualization ensures isolation and allows experimentation without affecting
the host system.
Step 2: Editing the wired connections in Ubuntu facilitates network configuration. Adjusting settings
ensures proper communication between virtual machines and the host system, crucial for file sharing.
Step 3: Using the command prompt to execute "ipconfig" retrieves essential network information. This
command provides IP addresses required for establishing connections between the virtual machines.
Step 4: Copying and pasting IP address, DNS address, NAT gateway, and subnet mask into IPv4 settings
configures network parameters accurately. This step ensures proper addressing and routing for
communication between the virtual machines.
Step 5: Changing NAT gateway to bridge adapter in network settings enables direct communication between
the virtual machines and the external network. Bridge adapter mode facilitates seamless data transfer
without network address translation.
Step 6: Connecting to the server from one virtual machine to another using the IP address initiates the file
transfer process. This step establishes a network connection, essential for accessing files stored on the
second virtual machine.
Step 7: Providing the username and password for authentication ensures secure access to files on the second
virtual machine. Authentication prevents unauthorized users from accessing sensitive data during file
transfer.
Step 8: Granting access to specific files on the second virtual machine and selecting them for sharing limits
the scope of data transfer. This step ensures that only necessary files are accessible, enhancing security and
privacy during the file transfer process.
RESULT:
The Virtualbox installation is completed and the Virtual machine is created on top of the Windows
host operating system.
Ex.no:7 Find a procedure to launch virtual machine using trystack.
Date:
Aim:
To Find a procedure to launch virtual machine using trystack.
Open trystack.org and Login.
Result:
Thus the VirtualMachineis Launched using Trystack.
Ex. No.: 8 A HADOOP INSTALLATION - ONE NODE HADOOP CLUSTER
Date:
AIM:
To install hadoop environment in ubuntu.
PROCEDURE:
1. Unzip the files jdk and hadoop.
2. Set the path of jdk and hadoop in /etc/profile file
3. Check the updation of file by source command.
4. Update 5 files as soon in the below command.
5. Format the path.
6. Start the dfs and check the no. of nodes running.
7. Start the yarn and check the no. of nodes running.
8. Open the browser and check whether the hadoop is installed correctly.
9. Add a file and check whether we can view the file.
10. After completing the process stop dfs and yarn properly.
COMMANDS:
1. cloud@ubuntu:~$ ls
Desktop Downloads exp2.odt oddeven Public Videos
Documents exp1.odt Music Pictures Templates VirtualBox VMs
2. cloud@ubuntu:~$ cd Downloads
3. cloud@ubuntu:~/Downloads$ tar zxvf jdk-8u60-linux-x64.gz
4. cloud@ubuntu:~/Downloads$ cd jdk1.8.0_60/
5. cloud@ubuntu:~/Downloads/jdk1.8.0_60$ pwd
/home/cloud/Downloads/jdk1.8.0_60 - COPY THE PATH
6. cloud@ubuntu:~/Downloads/jdk1.8.0_60$ sudo nano /etc/profile
A file opens and after the below two lines add in last lines
7. cloud@ubuntu:~/Downloads/jdk1.8.0_60$ source /etc/profile
9. cloud@ubuntu:~/Downloads/jdk1.8.0_60$ ssh-keygen
Press enter key, no need to type enter key.
11. cloud@ubuntu:~/Downloads/jdk1.8.0_60$ cd ..
A file opens and after the below two lines added in last line
25. cloud@ubuntu:~/Downloads/hadoop-2.7.0/etc/hadoop$ cd ..
26. cloud@ubuntu:~/Downloads/hadoop-2.7.0/etc$ cd ..
27. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ bin/hadoop namenode -format
28. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ sbin/start-dfs.sh
29. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ jps
5632 DataNode
5428 NameNode
5979 Jps
5851 SecondaryNameNode
cloud@ubuntu:~/Downloads/hadoop-2.7.0$ cd ..
cloud@ubuntu:~/Downloads$ tar zxvf mrsampledata.tar.gz
file1.txt
file2.txt
file3.txt
file4.txt
file5.txt
36. After completing all the process, stop the dfs and yarn as follows:
cloud@ubuntu:~/Downloads/hadoop-2.7.0$ sbin/stop- yarn.sh
cloud@ubuntu:~/Downloads/hadoop-2.7.0$ sbin/stop- dfs.sh
RESULT:
Thus hadoop is installed in the physical machine and executed successfully.
Ex. No.: 8 B WORD COUNT PROGRAM - USING MAP AND REDUCE TASK
Date:
AIM:
To execute wordcount program using map and reduce task
PROCEDURE:
1. Format the path.
2. Start the dfs and check the no. of nodes running.
3. Start the yarn and check the no. of nodes running.
4. Open the browser and check whether the hadoop is installed correctly.
5. Add a file and check whether we can view the file.
6. Implement the grep command for the file added and see the result.
7. Implement the wordcount command for the file added and see the result.
8. After completing the process stop dfs and yarn properly.
COMMANDS:
1. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ bin/hadoop namenode -format
2. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ sbin/start-dfs.sh
3. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ jps
5632 DataNode
5428 NameNode
5979 Jps
5851 SecondaryNameNode
4. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ sbin/start-yarn.sh
5. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ jps
5632 DataNode
6209 NodeManager
6050 ResourceManager
5428 NameNode
6522 Jps
5851 SecondaryNameNode
6. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ sbin/stop-dfs.sh
7. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ sbin/stop-yarn.sh
8. Open a browser and type as: http:\\localhost:50070
Choose DataNode. U can see a single node created in it
U can see the folder created inside utilities tab.
9. cloud@ubuntu:~/Downloads/hadoop-2.7.0$ bin/hdfs dfs -mkdir /user1
2) output1
Inside Browser Directory
output --> part-r-00000 --> Click Download
RESULT:
Thus the wordcount program using map and reduce task is executed successfully.