0% found this document useful (0 votes)
46 views7 pages

Virtualization Lab: Install & Configure VMs

The document outlines a hands-on lab for a Cloud Computing course focused on virtualization using VirtualBox. It includes objectives such as installing VirtualBox, creating and managing virtual machines, configuring network settings, and establishing SSH connections. The lab is structured in steps that guide students through the installation, configuration, and networking of virtual machines using Lubuntu OS.
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)
46 views7 pages

Virtualization Lab: Install & Configure VMs

The document outlines a hands-on lab for a Cloud Computing course focused on virtualization using VirtualBox. It includes objectives such as installing VirtualBox, creating and managing virtual machines, configuring network settings, and establishing SSH connections. The lab is structured in steps that guide students through the installation, configuration, and networking of virtual machines using Lubuntu OS.
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

Hands-on Labs 01: Initiation to Virtualization

Cloud Computing Course

March 3, 2025

Objectives
This lab aims to introduce students to virtualization concepts by installing and con-
figuring virtual machines (VMs) in VirtualBox. By the end of this session, students
should be able to:

• Install and configure VirtualBox.

• Create and manage virtual machines (e.g., using Lubuntu OS).

• Configure network settings for communication between VMs and the host.

• Establish SSH connections within and across virtual machines.

Student Name
Guedouar islam abdelkader
.

1
Cloud Computing: Engineer-3 (2024/2025)
Initiation to Virtualization Babaghayou Messaoud

Step 1: Installing VirtualBox


1. Install VirtualBox on your host machine.

2. Verify that CPU virtualization is enabled.

Question 1: What did you do to verify that CPU virtualization is enabled?

A1 -Steps to check it
i’m i macos user so that the virtulization is enable par default and i cheack that by using this
command “sysctl -a | grep machdep.cpu.features”
and the output will be “machdep.cpu.features: FPU VME DE PSE TSC MSR VMX PAE MCE
CX HTT TM PBEND F16C ex …..” and the VMX mean that it’s enable
1

Step 2: Setting Up Lubuntu VM


1. Download the Lubuntu ISO image from the official website.

2. Create a new VM in VirtualBox and name it Lubuntu-01.

Question 2: What did you give it as resources?

A2 -Computational resources given to the VM


i want to give it 2GB RAM 1CPU CORE and 32GB STORAGE

3. Set the hostname to Lubuntu-01 during installation.

4. Use your family name as the username.

2
Cloud Computing: Engineer-3 (2024/2025)
Initiation to Virtualization Babaghayou Messaoud

Step 3: Configuring Network and SSH


1. Ensure the network is set to NAT mode.

2. Install OpenSSH inside the VM. Hint:

sudo apt update && sudo apt install openssh-server

3. Verify SSH is running and accessible from within the VM. Hint:

systemctl status ssh


ssh localhost

Question 3: What is the output that let you know your SSH server is both
running and working?

A3 -Checking Output
i find that the SSH is inactive i use this command to make it active “sudo systemctl start ssh”

now i get ( active : active (running))

when i use the ssh localhost command i switched to the localhost with a deffrent ip address from
the VM so that mean its working

3
Cloud Computing: Engineer-3 (2024/2025)
Initiation to Virtualization Babaghayou Messaoud

Step 4: Exporting and Importing the VM


1. Power off the VM.

2. Export the VM as an OVA file.

3. Import the OVA file to create a second VM, rename it: Lubuntu-02.

4. Verify that Lubuntu-02 is operational, then, rename its hostname (VM name
from the inside) to Lubuntu-02.
Question 4: How did you rename it to Lubuntu-02 from the inside?

A4 -Steps to rename the hostname


i have to change the hostname in the files “etc/hostname etc/hosts” i use this commands
respectively
sudo nano etc/hostname / sudo nano etc/hosts
and i have to reboot the VM
or run this command wihout rebooting sudo hostnamectl set-hostname “islam-2 VM’s”

Step 5: Adjusting Networking Settings


1. Power off both VMs.

2. Add a second network interface to Lubuntu-01 and set it to Bridged mode.

3. Set the first network interface of both VMs to Internal mode.


Hint: if the VM is running and you changed the network interface to ”Internal”,
the VM might not take it instantly. To accelerate this you can run:

sudo systemctl restart NetworkManager

4. Power on both VMs.

4
Cloud Computing: Engineer-3 (2024/2025)
Initiation to Virtualization Babaghayou Messaoud

5. Check the assigned IP addresses. Hint:

ip a

Question 5: What are the network addresses for both Lubuntu-01 and
Lubuntu-02 VMs?

A5.1 -IP parameters fo Lubuntu-01


the network address of the L1 : 192.168.1.0/24
IP address : 192.168.1.40/24

A5.2 -IP parameters fo Lubuntu-02


here there is not ipv4 addrees assigned to any network because the network mode is internal
i have to create private one for it to use it later in the question 9

IP address : 10.10.10.10

5
Cloud Computing: Engineer-3 (2024/2025)
Initiation to Virtualization Babaghayou Messaoud

Step 6: Establishing Network Connectivity


1. From the host machine, ping the bridged interface of Lubuntu-01.
Question 6: What is the used command and output?

A6.1 -Used Command


ping 192.169.1.40
6

A6.2 -Obtained output


pc@PCs-MacBook-Pro ~ % ping 192.168.1.40
PING 192.168.1.40 (192.168.1.40): 56 data bytes
64 bytes from 192.168.1.40: icmp_seq=0 ttl=64 time=0.825 ms
64 bytes from 192.168.1.40: icmp_seq=1 ttl=64 time=0.377 ms
64 bytes from 192.168.1.40: icmp_seq=2 ttl=64 time=0.345 ms
64 bytes from 192.168.1.40: icmp_seq=3 ttl=64 time=0.322 ms
64 bytes from 192.168.1.40: icmp_seq=4 ttl=64 time=0.646 ms
64 bytes from 192.168.1.40: icmp_seq=5 ttl=64 time=0.378 ms
^C
--- 192.168.1.40 ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
; round-trip min/avg/max/stddev = 0.322/0.482/0.825/0.187 ms

2. SSH from the host machine to Lubuntu-01.


Question 7: What is the used command and output?

A7.1 -Used Command


ssh [email protected]
7

6
Cloud Computing: Engineer-3 (2024/2025)
Initiation to Virtualization Babaghayou Messaoud

A7.2 -Obtained output


now from the termical i have full control from the host to the vm

pc@PCs-MacBook-Pro ~ % ssh [email protected]


The authenticity of host '192.168.1.40 (192.168.1.40)' can't be established.
ED25519 key fingerprint is SHA256:oa1D6NMIG2LGMz5/iOcx7AXKDPqfqMIk7VQWZriq2YE.
[email protected]'s password:
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.11.0-17-generic x86_64)
islam@islam-virtualbox:~$ ls
Desktop Documents Downloads Music Pictures Public Templates Videos snap
islam@islam-virtualbox:~$ cd Desktop/

Question 8: How to check you are really logged into Lubuntu-01 via SSH?

A8.1 -Used Command


hostname OR whoami OR hostname -I
8

A8.2 -Obtained output


respectively
islam-virtualbox / islam / 192.168.1.40
all indicate to the L1 vm

3. From Lubuntu-01, SSH into Lubuntu-02.


Question 9: Confirm you are logged into Lubuntu-02 via SSH (only the
confirmation/obtained output)

A9 -Obtained output
islam@islam-virtualbox:~/Desktop$ ssh [email protected]
[email protected]'s password:
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.11.0-17-generic x86_64)
islam@islam2--VM:~$ hostname
9

You might also like