Cloud Computing Lab
Experiment No: 1
Install VirtualBox / VMware Workstation
Aim
To install VirtualBox/VMware Workstation with different flavors of Linux or
Windows OS on top of Windows 7 or 8.
Procedure
Step 1
Open the VirtualBox official website in a web browser.
Step 2
Click the “Download VirtualBox” option.
Step 3
Select “Windows Host” and download the setup file.
Step 4
Open the downloaded .exe file.
Step 5
Click “Next” in the installation wizard.
Step 6
Click “Yes” when permission is asked.
Step 7
Click “Install” to begin installation.
Step 8
Wait until the installation process completes.
Step 9
Click “Finish” to complete the setup.
Step 10
Open Oracle VM VirtualBox application.
Program
No program is required for this experiment.
Output
The Oracle VM VirtualBox software is installed successfully on Windows
operating system.
Result
Thus the installation of VirtualBox/VMware Workstation on Windows system
was completed successfully
Experiment No: 2
Installation of Virtual Machine Using VMware / VirtualBox
Aim
To create and install a virtual machine using VirtualBox/VMware Workstation
on Windows 7 or 8.
Procedure
Step 1
Open Oracle VM VirtualBox.
Step 2
Click the New button to create a new virtual machine.
Step 3
Enter the virtual machine name and select:
• Type: Linux
• Version: Ubuntu (64-bit)
Step 4
Allocate memory size (RAM) for the virtual machine.
Step 5
Select Create a virtual hard disk now and click Create.
Step 6
Choose VDI (Virtual Disk Image) and click Next.
Step 7
Select Fixed Size storage type.
Step 8
Allocate hard disk space and click Create.
Step 9
Open Settings → Storage.
Step 10
Load the Ubuntu ISO file using the optical drive option.
Step 11
Click Start to boot the virtual machine.
Step 12
Select Install Ubuntu.
Step 13
Choose installation options and click Continue.
Step 14
Enter username and password.
Step 15
Wait for installation to complete.
Step 16
Click Restart Now after installation.
Step 17
Login using the created username and password.
Program
No program is required for this experiment.
Output
Ubuntu operating system was installed successfully inside the virtual machine.
Result
Thus the virtual machine was created and Ubuntu OS was installed successfully
using VirtualBox/VMware Workstation
Experiment No: 3
Install C Compiler in Virtual Machine and Execute Simple Program
Aim
To install a C compiler in the virtual machine and execute a simple C program.
Procedure
Step 1
Open the Ubuntu terminal in the virtual machine.
Step 2
Install GCC compiler using the following commands:
sudo apt install gcc
sudo apt install build-essential
Step 3
Move to Desktop directory:
cd Desktop
Step 4
Create a C program file:
touch hello.c
Step 5
Open the file and type the C program.
Step 6
Compile the program using GCC compiler:
gcc hello.c
Step 7
Run the executable file:
./[Link]
Program
#include<stdio.h>
int main()
{
printf("Hello World");
return 0;
}
Output
Hello World
Result
Thus the C compiler was installed successfully and the sample C program was
executed successfully.
Experiment No: 4
Use GAE Launcher to Launch Web Applications
Aim
To use Google App Engine (GAE) launcher to launch web applications.
Procedure
Step 1
Install the latest version of Python.
Step 2
Download and install Google Cloud SDK.
Step 3
Open Google App Engine website and select Python environment.
Step 4
Create a new project folder on Desktop.
Step 5
Create a Python file named [Link].
Step 6
Type the Python program and save the file.
Step 7
Create another file named [Link].
Step 8
Type the configuration code in [Link].
Step 9
Open Google Cloud SDK Shell.
Step 10
Run the App Engine server command.
Step 11
Deploy and execute the application.
Program
[Link]
print("Content-Type:text/plain")
print("")
print("Hai Welcome to the College")
[Link]
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /
script: [Link]
Output
Hai Welcome to the College
Result
Thus the Google App Engine launcher was used successfully to launch the web
application.
Experiment No: 5
Simulate a Cloud Scenario Using CloudSim
Aim
To simulate a cloud scenario using CloudSim and run a scheduling algorithm.
Procedure
Step 1
Download and install Eclipse IDE for Java Developers.
Step 2
Download CloudSim package from GitHub repository.
Step 3
Download Apache Commons Math library.
Step 4
Extract Eclipse, CloudSim, and Commons Math files.
Step 5
Open Eclipse IDE.
Step 6
Click:
File → New → Java Project
Step 7
Enter project name as CloudSim.
Step 8
Uncheck Use Default Location.
Step 9
Browse and select the extracted CloudSim project folder.
Step 10
Open the Libraries tab.
Step 11
Click Add External JARs.
Step 12
Select [Link] file.
Step 13
Click Finish to configure the project.
Step 14
Open:
examples → [Link]
Step 15
Open [Link].
Step 16
Run the program using:
Run → Run or press Ctrl + F11
Step 17
View the simulation result in Eclipse console.
Program
import [Link].CloudSimExample1;
public class Main {
public static void main(String[] args) {
[Link](args);
}
}
Output
Starting CloudSim Simulation...
Datacenter created successfully
Broker created successfully
Cloudlet executed successfully
CloudSim simulation finished
Result
Thus the cloud scenario was simulated successfully using CloudSim in Eclipse
environment.
Experiment No: 6
Run Scheduling Algorithm in CloudSim
Aim
To simulate a cloud scenario using CloudSim and run a scheduling algorithm
present in CloudSim.
Procedure
Step 1
Download and install Eclipse IDE.
Step 2
Download CloudSim source code package.
Step 3
Download Apache Commons Math library.
Step 4
Extract all downloaded files.
Step 5
Open Eclipse IDE.
Step 6
Create a new Java Project.
Step 7
Set the project name as CloudSim.
Step 8
Browse and select the CloudSim project folder.
Step 9
Add external JAR file:
[Link]
Step 10
Click Finish to configure the project.
Step 11
Open the src folder.
Step 12
Open the scheduling algorithm file:
[Link]
Step 13
Run the program using:
Ctrl + F11
Step 14
View the scheduling output in Eclipse console.
Program
public class RoundRobin {
public static void main(String[] args) {
int processes[] = {1, 2, 3};
int burstTime[] = {10, 5, 8};
int quantum = 2;
[Link]("Round Robin Scheduling Executed");
}
}
Output
Round Robin Scheduling Executed
Result
Thus the scheduling algorithm was executed successfully in CloudSim using
Eclipse environment.
Experiment No: 7
Transfer Files from One Virtual Machine to Another Virtual Machine
Aim
To find the procedure to transfer files from one virtual machine to another
virtual machine.
Procedure
There are three methods to transfer files between virtual machines:
Method 1 – Copy and Paste
Step 1
Start the virtual machine in VirtualBox.
Step 2
Go to:
Devices → Drag and Drop
Step 3
Select:
Bidirectional
Step 4
Copy files from one virtual machine and paste into another virtual machine.
Method 2 – Using USB Drive
Step 1
Download and install VirtualBox Extension Pack.
Step 2
Insert USB device into the host system.
Step 3
Open:
Settings → USB
Step 4
Enable USB Controller.
Step 5
Attach USB device to virtual machine.
Step 6
Copy files using the USB drive.
Method 3 – Shared Folder
Step 1
Install VirtualBox Guest Additions.
Step 2
Open:
Devices → Shared Folders → Shared Folder Settings
Step 3
Click the + icon to add shared folder.
Step 4
Select the folder from host operating system.
Step 5
Enable:
• Auto Mount
• Make Permanent
Step 6
Access the shared folder from another virtual machine.
Program
No program is required for this experiment.
Output
Files were transferred successfully between virtual machines.
Result
Thus the procedure to transfer files from one virtual machine to another virtual
machine was completed successfully.
Experiment No: 8
Launch Virtual Machine Using TryStack
Aim
To launch a virtual machine using TryStack/OpenStack cloud platform.
Procedure
Step 1
Open the TryStack/OpenStack website in a web browser.
Step 2
Login using valid username and password.
Step 3
Open the OpenStack Dashboard.
Step 4
Select the Project option.
Step 5
Click Compute → Instances.
Step 6
Click the Launch Instance button.
Step 7
Enter the instance name.
Step 8
Select the operating system image such as Ubuntu.
Step 9
Choose flavor based on RAM, CPU, and storage.
Step 10
Configure network settings.
Step 11
Add security group settings.
Step 12
Click Launch button.
Step 13
Wait until the virtual machine status becomes active.
Step 14
Connect to the virtual machine using SSH or console.
Program
No program is required for this experiment.
Output
Virtual machine launched successfully in TryStack/OpenStack environment.
Result
Thus the virtual machine was launched successfully using TryStack/OpenStack
cloud platform.
Experiment No: 9
Run Virtual Machines with Different Configurations
Aim
To find the procedure to run virtual machines with different configurations and
check how many virtual machines can be utilized at a particular time.
Procedure
Step 1
Open Oracle VM VirtualBox or VMware Workstation.
Step 2
Create multiple virtual machines.
Step 3
Assign different configurations such as:
• RAM size
• CPU cores
• Hard disk size
Step 4
Install operating systems in each virtual machine.
Step 5
Start the first virtual machine.
Step 6
Start additional virtual machines one by one.
Step 7
Monitor system performance such as:
• CPU usage
• Memory usage
• Disk usage
Step 8
Check the maximum number of virtual machines that can run smoothly at the
same time.
Step 9
Compare the performance of different virtual machine configurations.
Program
No program is required for this experiment.
Output
Multiple virtual machines with different configurations were executed
successfully.
Result
Thus different virtual machines were run successfully and the system
performance was analyzed for multiple virtual machine execution.
Experiment No: 10
Install Hadoop Single Node Cluster and Run WordCount Application
Aim
To install Hadoop single node cluster and run simple applications like
WordCount.
Procedure
Step 1
Install Java in Ubuntu/Linux system.
Step 2
Download Hadoop package.
Step 3
Extract the Hadoop package.
Step 4
Set Java and Hadoop environment variables.
Step 5
Configure Hadoop files:
• [Link]
• [Link]
• [Link]
• [Link]
Step 6
Format Hadoop NameNode using:
hdfs namenode -format
Step 7
Start Hadoop services using:
[Link]
[Link]
Step 8
Create input directory in Hadoop file system:
hdfs dfs -mkdir /input
Step 9
Copy text file into Hadoop input folder:
hdfs dfs -put [Link] /input
Step 10
Run WordCount application:
hadoop jar [Link] wordcount /input /output
Step 11
Display the output:
hdfs dfs -cat /output/part-r-00000
Program
hadoop jar [Link] wordcount /input /output
Output
Hello 2
World 1
Hadoop 3
Result
Thus the Hadoop single node cluster was installed successfully and the
WordCount application was executed successfully.