0% found this document useful (0 votes)
12 views41 pages

Lab1 7

Uploaded by

guptaniraj2051
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views41 pages

Lab1 7

Uploaded by

guptaniraj2051
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

(Affiliated to Tribhuvan University

Lab Report

On
Installing Virtual Box and Ubuntu

..…………………………………………………………………

Lab Report 1

Submitted By: Submitted To:


Name: Saroj Bhandari Faculty Name: Diwakar Updhyaya
Faculty: BSc.CSIT Subject: Introduction to Cloud Computing
Batch: 2076 Submission Date:2024/04/01
Year: IV
Semester: VIII Signature of Faculty:
Lab 1: Installing Virtual Box and Ubuntu

Theory:
Virtual Machine Applications abstract the hardware of our personal computers such
as CPU, Disk Drives, Memory, NIC (Network Interface Card), etc, into many
different execution environments as per our requirements. Hence, gives us a feeling
that each execution environment is a single computer, for example, VirtualBox
Desktop Software.

Installing Ubuntu on VirtualBox is the need of the time. We can create the Ubuntu
Virtual Machine for several reasons. All of these are fundamentally related to the
ability to share the same basic hardware yet also support different execution
environments. For all of these reasons, many move to Ubuntu Download on
VirtualBox and use it.

Steps:

Step 1: Before we begin with the installation process, we need to Download ISO for
Ubuntu. For that, all the versions of Ubuntu are available on the Official Site.

Step 2: Open VirtualBox and click on the New button.

Step 3: Give a Name to your Virtual Machine and select the Location for it to install.
Step 4: Assign RAM Size to your Virtual Machine.

Step 5: Create a Virtual Hard Disk for the machine to store files.

Step 6: Select the type of Hard disk. Using VDI type is recommended.

Step 7: Either of the Physical Storage types can be selected. Using a Dynamically
Allocated Disk is by default recommended.

Step 8: Select Disk Size and provide the Destination Folder to install.

Step 9: After the Disk creation is done, boot the Virtual Machine and begin
installing Ubuntu.

Step 10: If the installation disk is not automatically detected. Browse the file location
and select the ISO file for Ubuntu.

Step 11: Proceed with the installation file and wait for further options.

Step 12: Click on the Install Ubuntu option, this might look different for other Ubuntu
versions.

Step 13: Select Keyboard Layout, if the defaults are compatible, just click on
the Continue button and proceed.
Step 14: Select Installation Type. By default, it is set to Normal Installation, which is
recommended, but it can also be changed to Minimal Installation if there is no need
for all Ubuntu features.

Step 15: Click on the Install Now button and carry on with the installation. Do not get
worried about the Erase disk option, it will only be effective inside the virtual
machine, and other system files outside the VirtualBox remain intact.

Step 16: Click on the Continue button, and proceed with writing changes on the disk.

Step 17: Select your Location to set the Time Zone.

Step 18: Choose a Name for your computer and set a Password to secure login info.

Step 19: Wait for the installation process to complete.

Step 20: Once the installation process is over, reboot your Virtual Machine.
Some of the basic commands in Ubuntu:
 Free Memory Usage: Check free memory with free -mh.
 Storage Information: Check storage with df -h and folder/file sizes with du -h.
 CPU/Processor Information: View CPU processes with top.
 Process and User Info: Get process and user info with ps -ef.
 Network Configuration:
o Change network types (e.g., NAT to bridge adapter) in virtual machine
settings.
o View IP configurations with ipconfig (Windows) or ip a (Linux).
o System Updates: Update system resources while in an idle state.
 Virtual Machine Operations:
o Access virtual machine settings through Machine -> Settings ->
System.
o Take and manage snapshots (Snapshot -> Take Snapshot, Snapshot ->
Manage Snapshots).
 Linux Commands:
o Change directory (cd /path/to/directory).
o Create files (touch filename), directories (mkdir dirname), and list files
(ls -ltr).
o Remove files/directories (rm -rf filename dirname).
o Shutdown: Shutdown the virtual machine (sudo shutdown).
Result and Conclusion:

Result: After following the installation process, Ubuntu should be successfully


installed and running within VirtualBox. You should be able to log in to the Ubuntu
desktop environment and explore its features and applications.

Conclusion: Installing Ubuntu in VirtualBox is a convenient way to experience the


Ubuntu operating system without affecting your main system. It's useful for testing
software, learning about Linux, or running Linux applications on a non-Linux host.
Overall, the process is relatively simple and can be completed by following online
guides or the official documentation.
(Affiliated to Tribhuvan University

Lab Report

On
Snapshot and Restoring Files using Virtual Machine

..…………………………………………………………………

Lab Report 2

Submitted By: Submitted To:


Name: Saroj Bhandari Faculty Name: Diwakar Updhyaya
Faculty: BSc.CSIT Subject: Introduction to Cloud Computing
Batch: 2076 Submission Date:2024/04/03
Year: IV
Semester: VIII Signature of Faculty:
Lab 2: Snapshots and Restoring Files using Virtual Machine

Theory:
 Snapshot Technology: Snapshots are based on a technology called "copy-on-
write," which means that when you take a snapshot, VirtualBox creates a read-
only image of the current state of the VM's disk. Any changes made to the VM
after taking the snapshot are written to a new, separate file, leaving the
original disk image unchanged.
 Delta Images: As you make changes to the VM after taking a snapshot,
VirtualBox creates "delta" images to store these changes. When you restore a
snapshot, VirtualBox merges these delta images back into the original disk
image to revert the VM to its previous state.
 Snapshot Chains: If you take multiple snapshots of a VM, VirtualBox creates
a chain of snapshots, where each snapshot depends on the previous one. When
you restore a snapshot, VirtualBox ensures that all subsequent snapshots in the
chain are discarded, bringing the VM back to the selected state.
 Snapshot Management: It's important to manage your snapshots carefully to
avoid using excessive disk space. Regularly delete snapshots that are no longer
needed, as each snapshot consumes additional disk space.

Steps:

Creating Snapshots:

1. Select the VM: In the VirtualBox Manager, select the VM you want to take a
snapshot of.
2. Take Snapshot: Click on the "Snapshot" button. You can also go to the
"Machine" menu and select "Take Snapshot."
3. Name the Snapshot: Give your snapshot a descriptive name to easily identify it
later.

4. Optional: You can also choose to take a snapshot of the VM's memory, which
allows you to restore the VM to an exact state, including the contents of its
memory.

Restoring Files using Snapshots:

1. Access Snapshot: In the VirtualBox Manager, select the VM and click on the
"Snapshots" tab. Here, you'll see a list of snapshots.
2. Restore Snapshot: To restore the VM to a previous state, select the snapshot
you want to restore to and click the "Restore" button. This will revert the VM's
state, including its disk and memory, to the selected snapshot.
Results and Conclusion

Result: After taking a snapshot of a virtual machine, you will have created a point-in-
time backup of the VM's state. This snapshot includes the VM's disk, memory, and
settings at the moment the snapshot was taken. You can continue to use the VM as
usual, making changes and testing different configurations. If at any point you need to
revert to the state captured in the snapshot, you can do so easily.

Conclusion: Hence we concluded that snapshots are a valuable feature in


virtualization environments, providing a quick and easy way to backup and restore
virtual machines. They are particularly useful for testing, development, and
troubleshooting purposes.
(Affiliated to Tribhuvan University

Lab Report

On
Virtual Machine and Azure Cloud

..…………………………………………………………………

Lab Report 4

Submitted By: Submitted To:


Name: Saroj Bhandari Faculty Name: Diwakar Updhyaya
Faculty: BSc.CSIT Subject: Introduction to Cloud Computing
Batch: 2076 Submission Date:2024/04/21
Year: IV
Semester: VIII Signature of Faculty:
Lab 4: Creating virtual machine in Azure and accessing using SSH
Theory:
Azure Cloud is a comprehensive cloud computing platform provided by Microsoft,
offering a wide range of services to help organizations build, deploy, and manage
applications and services through Microsoft-managed data centers. One of the
fundamental services offered by Azure is the ability to create and manage virtual
machines (VMs). A virtual machine in Azure is a scalable and flexible computing
resource that runs an operating system and applications. Creating a virtual machine in
Azure involves selecting the desired configuration, such as the operating system, size,
and region for the VM, and then deploying it within minutes. Azure provides various
tools and services to manage VMs, including automated backups, monitoring, and
scaling options, making it easy for organizations to create and manage their
infrastructure in the cloud.

Azure virtualization provides several benefits, including:

1. Resource Optimization: By running multiple virtual machines on a single


physical server, Azure can optimize resource usage and improve overall
efficiency.
2. Scalability: Azure allows you to easily scale your virtual machine resources
up or down based on your requirements, providing flexibility and cost savings.
3. Isolation: Each virtual machine in Azure is isolated from other virtual
machines on the same physical server, providing security and ensuring that
one virtual machine does not impact another.
4. High Availability: Azure offers features such as availability sets and virtual
machine scale sets to ensure that your applications remain available even if
one or more virtual machines fail.
5. Disaster Recovery: Azure Site Recovery enables you to replicate your virtual
machines to a secondary Azure region, providing a disaster recovery solution
in case of outages or failures.
Steps:
1) Create a virtual Machine in azure portal:
Step 2: Click Create after first step
Step 3: See your Virtual Machine
Step 4: Identify public ip address
Step 5: Add Port 80 and 443 and enable it using firewall
Step 6: Navigate to azure via public ip
Step 7: Access index.html file and create site

Step 8: Access contents via public ip and port number


Result and Conclusion
Result: In this Azure lab, we successfully created a virtual machine (VM) in the
Azure portal. We configured the VM with the desired specifications, including the
operating system, size, and region. We also connected to the VM using Remote
Desktop Protocol (RDP) to verify its functionality.

Conclusion: This lab provided a hands-on experience with Azure virtualization,


demonstrating how to create and configure a virtual machine in the Azure cloud
platform. By completing this lab, we gained practical skills in deploying and
managing VMs in Azure, which are essential for building scalable and flexible cloud-
based solutions. Overall, this lab was a valuable learning experience, showcasing the
power and flexibility of Azure virtualization for modern IT environments.
(Affiliated to Tribhuvan University

Lab Report

On
IIS setup in azure using windows server students

..…………………………………………………………………

Lab Report 5

Submitted By: Submitted To:


Name: Saroj Bhandari Faculty Name: Diwakar Updhyaya
Faculty: BSc.CSIT Subject: Introduction to Cloud Computing
Batch: 2076 Submission Date:2024/04/22
Year: IV
Semester: VIII Signature of Faculty:
Lab 5 : IIS Setup in azure using windows server Edition
Theory:
Setting up Internet Information Services (IIS) on Azure using Windows Server
involves the deployment of a virtual machine (VM) instance and the configuration of
IIS to host web applications. Some of the theoretical concepts are as following:

1) Azure Virtual Machine Provisioning: Begin by accessing the Azure portal and
creating a new virtual machine instance. Choose the appropriate Windows Server
edition based on your requirements.
2) Network Configuration: Configure networking settings for the virtual machine,
including IP address assignment, virtual network configuration, and subnet
settings. This ensures proper connectivity for the VM within the Azure
environment.
3) Storage Setup: Set up storage resources for the VM, selecting disk types and
sizes that meet the needs of your applications. Adequate storage provisioning is
essential for storing application files and system data.
4) Installation of Internet Information Services (IIS): After the VM is
provisioned, connect to it using Remote Desktop Protocol (RDP). Install the IIS
role through the Server Manager or PowerShell. This step enables the VM to act
as a web server, capable of hosting and serving web content.
5) IIS Configuration: Configure various aspects of IIS to suit your application
requirements. This includes setting up website bindings, configuring SSL
certificates for secure communication, defining authentication methods, and
implementing URL rewrite rules for redirecting and rewriting URLs.
6) Deployment of Web Applications: Upload your web application files to the VM.
This can be done manually via RDP or through deployment tools such as FTP or
Git. Ensure that the application files are placed in the appropriate directories
within the IIS web server's root folder.
7) Testing and Monitoring: Thoroughly test the deployed web applications to
ensure they function as expected. Implement monitoring and logging mechanisms
to track performance metrics and identify any potential issues that may arise
during operation.
Step1: Create a windows virtual machine in azure cloud
Step 2: Review and create the virtual machine
Step 3: Add Roles and Features

Step 4: Click on Add Feature check on IIS


Step5: Install the IIS Server

Step6: Now IIS option is shown in the Dashboard


Step 7: Connect to the IIS Server

Step 8: Type local host in your browser and check


Step 9: Create a html file in windows(C) > initpub > wwwroot > index.html

Step 10: Now you can access your website with the public ip outside of the
window from anywhere.
Result
By setting up Internet Information Services (IIS) in a virtualized environment using
Azure, we established a powerful platform for hosting web applications. This
involved creating a virtual machine instance on Azure, installing and configuring IIS
to serve web content, and deploying our web applications. We ensured that the
virtualized environment provided the necessary resources and flexibility for our web
hosting needs.

Conclusion

Virtualizing IIS on Azure offers a convenient and scalable solution for hosting
websites. Leveraging Azure's infrastructure allows us to easily manage and scale our
web applications while benefiting from the reliability and security of the cloud.
Overall, utilizing Azure for virtualized web hosting simplifies management tasks and
ensures optimal performance for our online presence.
(Affiliated to Tribhuvan University

Lab Report

On
Azure Blob Storage

..…………………………………………………………………

Lab Report 6

Submitted By: Submitted To:


Name: Saroj Bhandari Faculty Name: Diwakar Updhyaya
Faculty: BSc.CSIT Subject: Introduction to Cloud Computing
Batch: 2076 Submission Date:2024/04/29
Year: IV
Semester: VIII Signature of Faculty:
Lab 6 : Azure Blob Storage
Theory:
Azure Blob Storage is Microsoft's cloud storage solution for storing massive amounts
of unstructured data, such as text or binary data.

Some of the theory concepts are:

 Storage Account: A storage account provides a unique namespace in Azure for


your data. All objects (blobs, files, queues, tables) are associated with a storage
account.
 Blob: A blob is a file of any type and size. Blobs are stored in containers within
a storage account. There are three types of blobs: block blobs (for text and
binary data up to about 4.75 TB), append blobs (optimized for append
operations, such as logging), and page blobs (for random read/write operations,
typically used for VHD files).
 Container: A container organizes a set of blobs, similar to a directory in a file
system. Containers are created within a storage account.
 Shared Access Signature (SAS): A SAS provides secure delegated access to
resources in your storage account. You can create SAS tokens with specific
permissions and expiry times.
 Blob Storage Lifecycle Management: This feature allows you to define rules
to automatically transition blobs to a cooler storage tier (such as from hot to cool
or archive) to optimize costs based on access patterns.
 Blob Versioning: Blob versioning allows you to maintain and access previous
versions of blobs. This is useful for scenarios where you need to track changes
to blobs over time.
Step 1: Create an Azure Storage Account

Step 2: After successful creation following screen Appears


Step 3: Now connect it from vs code extension

Step 4: Deploy to web side via azure storage


Step 5: Create index.html file and add your content

Step 6: Now access the content via web browser


Result:

In this lab we performed steps such as creating a storage account, uploading blobs,
and creating a static blog website using azure storage concept.

Conclusion:

We learned using Azure Blob Storage effectively understanding Azure Blob Storage
and cloud storage concepts.
(Affiliated to Tribhuvan University

Lab Report

On
Nginx Instillation in Dockers using Azure virtual machine

..…………………………………………………………………

Lab Report 7

Submitted By: Submitted To:


Name: Saroj Bhandari Faculty Name: Diwakar Updhyaya
Faculty: BSc.CSIT Subject: Introduction to Cloud Computing
Batch: 2076 Submission Date: 2024/04/30
Year: IV
Semester: VIII Signature of Faculty:
Lab 7: Nginx Instillation in Dockers using Azure virtual machine

Theory:
Docker is a platform that allows you to package, distribute, and run applications in
containers. Containers are lightweight, portable, and self-sufficient environments that
contain everything needed to run an application, including the code, runtime, system
tools, libraries, and settings. Some of the theory concepts are:

 Azure Container Instances (ACI): ACI allows you to run containers without
managing the underlying infrastructure.
 Azure Container Registry (ACR): ACR is a private registry for storing and
managing container images. It provides secure access to your images,
integration with Azure services, and support for Docker CLI and other
container tools.
 Containerization: Containerization is a lightweight alternative to full
machine virtualization. It involves encapsulating an application in a container
with its own operating environment. Containers are isolated from each other
and from the underlying infrastructure, making them portable and consistent
across different environments.
 Images: Docker containers are created from images. An image is a read-only
template that contains the application code, runtime, libraries, and
dependencies needed to run the application. Images are used to create
containers.
 Containers: A container is a runtime instance of an image. It runs as a process
on the host machine's operating system and contains everything needed to run
the application, including the code, runtime, system tools, libraries, and
settings.
 Dockerfile: A Dockerfile is a text file that contains instructions for building a
Docker image. It specifies the base image to use, the dependencies to install,
and the commands to run to set up the environment for the application.
 Docker Engine: Docker Engine is the runtime environment for containers. It
includes the Docker daemon, which manages the containers, images,
networks, and volumes, and the Docker CLI, which is used to interact with the
Docker daemon.
Step 1: Connecting to Azure Instances via Terminal

Step 2: Installing docker in Ubuntu Machine


Step 3: Checking docker ps command

Step 4: Running Hello world in docker

Step 5: Executing the docker with id


Step 6: Using nginx container in docker

Step 7: Enabling port 8080 in Firewall


Step 7: After successful configuration you can access nginx via public ip and port
defined

Result:

Nginx was successfully installed in a Docker container on an Azure virtual machine,


allowing for efficient web server deployment and management.

Conclusion:

This setup provides a flexible, scalable, and resource-efficient solution for hosting
web applications, leveraging the benefits of Docker and Azure VMs.

You might also like