Vi Lab
Vi Lab
Regulation: 2021
LAB MANUAL
CCS372 VIRTUALIZATIONLABORATORY
Prepared By Approved By
Ms. B.REVATHI (AP/AD) Ms.P. Mallika (HOD / AD)
JAI SHRIRAM ENGINEERING COLLEGE
TIRUPPUR – 638 660
Approved by AICTE, New Delhi & Affiliated to Anna University, Chennai
Recognized by UGC & Accredited by NAAC and NBA (CSE and ECE)
VISION
To impart quality education and create center of excellence in the field of
AI & DS to produce industry ready engineers
MISSION
M1: Developing professionals with sound understandings in AI.
CCS372 VIRTUALIZATIONLABORATORY
SYLLABUS
PRACTICAL EXERCISES:
1. Create type 2 virtualization in VMWARE or any equivalent Open Source Tool. Allocate
memory and storage space as per requirement. Install Guest OS on that VMWARE.
CCS372 VIRTUALIZATIONLABORATORY
Course Outcome
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3
C314.1 1 3 1 3 2 - - - 1 1 3 1 2 3 2
C314.2 3 2 2 1 2 - - - 1 2 2 3 3 2 1
C314.3 3 2 1 3 1 - - - 2 2 1 3 3 3 2
C314.4 1 1 2 3 3 - - - 3 3 1 1 3 2 2
C314.5 1 3 2 3 1 - - - 2 1 3 3 1 1 2
C314 1.8 2.2 1.6 2.6 1.8 - - - 1.8 1.8 2 2.2 2.4 2.2 1.8
INDEX
CO PO
Ex.No Name of the Experiment Mapped
1, 2, 3, 4, 9, 10, 11,
Create RAID 5 volume CO4
3 12
1, 2, 3, 4, 9, 10, 11,
Create a VLAN in CISCO packet tracer CO3
7 12
1, 2, 3, 4, 9, 10, 11,
Install KVM in Linux CO2
8 12
1, 2, 3, 4, 9, 10, 11,
Create Nested Virtual Machine(VM under another CO5 12
9
VM)
Ex.no :1
Create type 2 virtualization in VMWARE or any equivalent
Date: Open Source Tool.
Aim
To create type 2 virtualization in vmware.
Steps:
1. Under Specify Disk Capacity adjust Maximum disk size if required (the default should be
enough)
2. Select Split virtual disk into multiple files as this makes moving the VM to a new PC easy
3. Click Next then confirm the details on the next screen
4. If anything seems wrong click Back, otherwise click Finish
Result
Thus the operating system like Linux using VMware was installed and Virtual machine created
sussessfuly.
Ex.no :2
shrink virtual hard disks in Hyper-V and How to compact
Date: virtual hard disks in Hyper-V
Aim:
In Hyper-V environment, you can shrink, convert, expand, merge, reconnect or compact a virtual hard
disk by editing the corresponding file using either the GUI or CLI tools.
PROCEDURE
.
3. Right-click the disk volume you would like to shrink, and select the Shrink Volume option
4. The next step is to enter the amount of space you wish to shrink in MB.
As you fill out this property, the Total size after shrink in MB value will change automatically, thus showing you
what the disk storage capacity will be after the shrink operation is complete.
5. Click Shrink to start shrinking the disk volume. As a result, you will have roughly 25 GB of
unallocated disk space.
11. The next step is to configure the new size of the virtual hard disk.
12. In the Summary section, you can look through the changes you are about to
implement. Click Finish to complete the action and close the wizard.
13. Click Inspect to verify that the disk size has actually changed and you have successfully
shrunk the virtual hard disk.
As you can see, the maximum disk size has been successfully reduced to 115 GB.
How to compact virtual hard disks in Hyper-V
Unlike shrinking, the compact operation doesn’t reduce the storage capacity of the virtual hard disk. This
action reduces the file size of a virtual hard disk by removing empty blocks from the file. Note that you
cannot compact fixed virtual hard disks.
Before compacting or shrinking a virtual hard disk, it is recommended that you empty the Recycle Bin,
defragment the disk, and then create its backup to protect critical data in case of disk failure.
Remember that the VM using the disk needs to be turned off for the compact operation to work
3. Click Hard Drive to get access to the virtual hard disk attached to this VM.
4. Click Edit to launch the Edit Virtual Hard Disk Wizard.
5. Skip the Locate Disk step as you have already selected the required virtual hard disk file,
and click Next.
6. In the Summary section, you can verify the changes that are about to be made to the virtual
hard disk. Click Finish to complete the action and close the wizard.
7. Click Inspect to verify that the disk file size has been actually reduced.
Result:
Thus shrink virtual hard disks in Hyper-V and How to compact virtual hard disks in Hyper-V was executed
successfully.
Ex.no :3
RAID 0, RAID 1, RAID 5, RAID 10 Explained with Diagrams
Date:
On most situations you will be using one of the following four levels of RAIDs.
RAID 0
RAID 1
RAID 5
RAID 10 (also known as RAID 1+0)
This article explains the main difference between these raid levels along with an easy to understand
diagram.
RAID LEVEL 0
Following are the key points to remember for RAID level 0.
Minimum 2 disks.
Excellent performance ( as blocks are striped ).
No redundancy ( no mirror, no parity ).
Don’t use this for any critical system.
RAID LEVEL 1
Minimum 2 disks.
Good performance ( no striping. no parity ).
Excellent redundancy ( as blocks are mirrored ).
RAID LEVEL 5
RAID LEVEL 5
Following are the key points to remember for RAID level 5.
Minimum 3 disks.
Good performance ( as blocks are striped ).
Good redundancy ( distributed parity ).
Best cost effective option providing both performance and redundancy. Use this for DB that is
heavily read oriented. Write operations will be slow.
RAID LEVEL 10
Following are the key points to remember for RAID level 10.
Minimum 4 disks.
This is also called as “stripe of mirrors”
Excellent redundancy ( as blocks are mirrored )
Excellent performance ( as blocks are striped )
If you can afford the dollar, this is the BEST option for any mission critical applications (especially
databases).
Ex.No: 3 Desktop Virtualization using VNC and Chrome remote Desktop
Date:
Open MobaXterm and click on the Start local terminal button, as highlighted in the
image below.
ssh your_username@host_name
Replace your_username with your MCECS username and replace host_name with
the address of the MCECS Linux machine or server you want to connect with (for
example, mo.ece.pdx.edu or rita.cecs.pdx.edu).
Enter your MCECS account password when prompted, and log in to the host system.
You will also be prompted to enter a view-only password, which can be used by other people to observe
your VNC session. If you are unsure about this feature, enter n for “no” and avoid creating one.
NOTE: It is possible you may not see a password prompt. If you have previously used VNC, the new
process will sometimes use your previous session password. If you have forgotten your previous session
password, run the command vnc passwd to change it.
Your VNC session has been created, and you should see a message similar to the
sample output below
The number that appears after the host address is the display number (it is underlined in red
in the image above). By adding this number to 5900, this will give you the port number
used to connect your VNC viewer to the VNC session.
For example, if your display number is 4, your port number is 5904. If your display
number is 12, your port number is 5912.
NOTE: Your display number may not be the same as the sample image above. Make sure to
read the output message in your terminal and look for the number after the semicolon for your
true display number.
The VNC session is now running on the remote Linux host system and is ready to connect
with your VNC viewing software. You can exit and close this terminal if you want, as the
VNC session will continue to run in the background. Be aware that the CAT will kill any
VNC session that has been idle for more than 48 hours.
In MobaXterm, click on the Session button in the upper left hand corner
In the window that pops up, look for the VNC icon in the top row and click on it
In the lower area, click on the Network Settings tab, and then click on the SSH gateway
(jumphost) button. The button is highlighted in the blue box in the image above.
In the Gateway host box, enter the address of the host machine that
your VNC session is running on (e.g. ada.cs.pdx.edu, mo.ece.pdx.edu,
etc).
In the Username box, enter your MCECS username.
In Port, leave it set at 22
Do not check off the box for Use SSH key.
Afterwards, click the OK button with the green checkmark to save these settings and
close this configuration window.
When you return to the previous menu, click the OK button again and connect MobaXterm’s VNC
Viewer with the remote VNC session
Step 4 – VNC password guid
When you see the following window asking for the password for MCECS username on the host address,
enter your MCECS login password. This window may or may not appear, depending on how recently you
used MobaXterm to view a VNC session previously.
When you see the following window asking for the password for localhost, enter your VNC
session password.
A new tab should now appear in MobaXterm with a Linux graphical interface.
Congratulations! You are now remotely connected with a Linux system via VNC.
Be aware that on CAT-supported systems, VNC sessions are terminated if they have been idle for more
than 48 hours.
If you want to kill the VNC session, you can use the Log Off or Shutdown option in the
Linux graphical interface. The location of these options will vary depending on the version
of Linux on the host system and your personal settings.
Alternatively, you can kill VNC sessions using the command vncserver -kill :X, where X is
replaced with your session’s Display Number.
Checking for existing VNC sessions
If you want to check for existing VNC sessions or find its display number,
run the command vncserver -list
If there are no sessions running, you will see the following output
Topology Diagram
Addressing Table
Device
(Hostname) Interface IP Address Subnet Mask Default Gateway
Step 2: Clear any existing configurations on the switches, and initialize all ports in the shutdown state.
If necessary, refer to Lab 2.5.1, Appendix 1, for the procedure to clear switch configurations.
It is a good practice to disable any unused ports on the switches by putting them in shutdown. Disable all ports
on the switches:
Switch#config term Switch(config)#interface range faO/1-24 Switch(config-if-range)#shutdown
Switch(config-if-range)#interface range giO/1-2
Switch(config-if-range)#shutdown
1 default active FaO/1, FaO/2, FaO/4, FaO/5 FaO/6, FaO/7, FaO/8, FaO/9
FaO/1O, FaO/11, FaO/12, FaO/13 FaO/14, FaO/15, FaO/16, FaO/17
FaO/18, FaO/19, FaO/2O, FaO/21
FaO/22, FaO/23, FaO/24, GiO/1 GiO/2
1O faculty/staff active
2O students active
3O guest active
99 management active
Step 3: Configure and name VLANs on switches S2 and S3.
Create and name VLANs 10, 20, 30, and 99 on S2 and S3 using the commands from Step 1. Verify the correct
configuration with the show vlan brief command.
What ports are currently assigned to the four VLANs you have created?
Note: The show vlan name vlan-name displays the same output.
You can also view VLAN assignment information using the show interfaces interface switchport
command.
Port Vlans in spanning tree forwarding state and not pruned FaO/1 1,1O,2O,3O,99
FaO/2 1,1O,2O,3O,99
Ping from host PC2 to host PC1. Is the ping attempt successful?
Even though the ports used by PC1 and PC2 are in the same VLAN, they are still in different subnetworks, so
they cannot communicate directly.
Task 6: Clean Up
Erase the configurations and reload the switches. Disconnect and store the cabling. For PC hosts that are
normally connected to other networks (such as the school LAN or to the Internet), reconnect the appropriate
cabling and restore the TCP/IP settings.
Ex.No:6
Date: Installation and Configuration of virtualization using KVM
4. Hardware / Software Required: Ubuntu operating system, open source software KVM,
Internet.
Procedure:
Installation Steps :
#sudo grep -c "svm\|vmx" /proc/cpuinfo
#sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
#sudoadduserrait
#sudoadduserraitlibvirtd
After running this command, log out and log back in as rait
Run following command after logging back in as rait and you should see an empty list
of virtual machines. This indicates that everything is working correctly.
#virsh -c qemu:///system list
Open Virtual Machine Manager application and Create Virtual Machine #virt-
manager
Result:
SNAPSHOTS
Step 1 : #sudo grep -c "svm\|vmx" /proc/cpuinfo
Step 4 : #sudoadduserraitlibvirtd
After running this command, log out and log back in as rait
6. Conclusion:
Installation and configuration of KVM have been done successfully onto Ubantu and
users added. Like this we can create as many virtual machines as possible on OS and can
install any windows onto it
Ex.No:
Date: Create Nested Virtual Machine(VM under another VM)
Aim:
Enable Nested Virtualization
Hyper-V is the built-in hypervisor that comes free in Windows and Windows Server. It is used to run on
Windows. Virtualization is also used for other features, like Virtualization-Based Security (VBS), Windows
Sandbox, and Windows Defender Application Guard (WDAG). Developers sometimes use virtualization with
Visual Studio to run device emulators.
Microsoft introduced support for nested virtualization in Windows Server 2016. Nested virtualization lets you
turn on . So, you can think of it like a VM running inside a VM.
There are a few prerequisites that you need to meet before you can use nested virtualization. The VM
configuration must be version 8.0 or higher. And nested virtualization is only supported on Intel CPUs with
virtualization (VT-x) and Extended Page Tables (EPT).