Ccs372-Virtualization Lab Manual.docx (1)
Ccs372-Virtualization Lab Manual.docx (1)
LAB MANUAL
CCS372 – VIRTUALIZATION
REGULATION – 2021
SEMESTER-V
2023-2024(Odd)
INSTITUTE VISION
INSTITUTE MISSION
❖ To cultivate a vibrant learning environment where students delve into the
frontiers of technical knowledge, hone their problem-solving skills, and
embrace innovation to transform ideas into solutions that address global
challenges.
DEPARTMENT MISSION
5. Modern tool usage: Create, select, and apply appropriate techniques, resources,and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one‘s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and
ability to engage in independent and life-long learning in the broadest context of
technological change.
Program Educational Objectives (PEOs)
PEO1:
PEO2:
PEO3:
PSO1:
PSO2:
PSO3:
Have
executed the
Executed the Executed the
system in an
system with system with Incomplete
efficient way
less difficulty less system
& make
& has partial efficiency execution &
credible and
2 Assessment 3 judgements and has no lack of
unbiased
regarding the judgements judgments
judgments
overall regarding regarding the
regarding the
system. the system. system. (<1)
conduct of the
experiments. (2) (1)
(3)
Followed
Followed all
Followed all some of the Trying to follow
the
the instructions the instructions
instructions
instructions given in the given in the
given in the
given in the procedure& procedure &
3 Submission 4 procedure and
procedure late in late in
submitted the
with some submission submission of
observation
assisting of note note books.
books in time.
(3) books. (<1)
(4)
(2)
COURSE OBJECTIVES
• Understand the architecture and types of virtualization (Type 1 vs Type 2).
• Learn installation, configuration, and management of virtual machines using various tools.
• Gain hands-on experience with disk management, snapshots, and volume management.
• Understand and apply desktop virtualization techniques using VNC and Chrome Remote Desktop.
• Develop skills to implement and manage nested virtualization and open-source hypervisors.
COURSE OUTCOMES
CO1: Create and manage virtual machines using Type 2 hypervisors (e.g., VMware, VirtualBox).
CO2: Configure virtual disks, perform shrink/extend operations, and use snapshots effectively.
CO3: Design and implement spanned, mirrored, striped, and RAID volumes for data management.
CO4: Demonstrate desktop virtualization using tools like VNC and Chrome Remote Desktop.
CO5: Set up and manage nested virtualization and open-source solutions like KVM.
CO6: Configure VLANs using Cisco Packet Tracer and understand network virtualization basics.
lOMoARcPSD|6877995
CONTENTS
AIM:
How to install operating system like linux using vmware.
Steps:
With the operating system selected and configured, it's time to build the virtual machine.
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
lOMoARcPSD|6877995
lOMoARcPSD|6877995
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.
1. In Hyper-V Manager, connect to the VM
2. After logging into the VM, launch the Disk Management utility by typing msc in the search bar.
lOMoARcPSD|6877995
3. Right-click the disk volume you would like to shrink, and select the Shrink Volume option.
lOMoARcPSD|6877995
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.
lOMoARcPSD|6877995
5. Click Shrink to start shrinking the disk volume. As a result, you will have roughly 25 GB of
unallocated disk space.
8. In the Hardware section, click Hard Drive to get access to the virtual hard disk settings.
9. You can skip the Locate Disk step, as you have already selected which disk you would like to shrink.
Click Next.
lOMoARcPSD|6877995
10. In the Choose Action section, select Shrink and click Next.
lOMoARcPSD|6877995
11. The next step is to configure the new size of the virtual hard disk.
As you may notice, the difference between the current disk size and the minimum size is equal to the
amount of extra disk space we have previously created inside the VM.
lOMoARcPSD|6877995
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.
lOMoARcPSD|6877995
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.
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.
lOMoARcPSD|6877995
3. Click Hard Drive to get access to the virtual hard disk attached to this VM.
lOMoARcPSD|6877995
5. Skip the Locate Disk step as you have already selected the required virtual hard disk file, and
click Next.
lOMoARcPSD|6877995
7. 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.
8. Click Inspect to verify that the disk file size has been actually reduced.
Wrapping Up
So, why do you need to shrink or compact virtual hard disks? The answer is simple. The size of the
virtual hard disk can be reduced only manually. If you decide to simply delete content, you will clear
up space on the virtual hard disk, and not on the physical disk. To free up physical disk space, you
need to either shrink or compact virtual hard disks, depending on your needs.
Before you can start with shrinking or compacting the virtual hard disk, it is always better to prepare
for the worst-case scenario. An unexpected system error or bug can make your infrastructure entirely
inaccessible. For this purpose, you need to ensure that data stored on the disk is securely protected and
can be successfully recovered in case of disk failure.
NAKIVO Backup & Replication is a simple, yet powerful data protection solution, which can help you
protect your VMware, Hyper-V, Nutanix, and AWS EC2 environments from anywhere and at any
time.
lOMoARcPSD|6877995
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
lOMoARcPSD|6877995
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
lOMoARcPSD|6877995
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).
lOMoARcPSD|6877995
Introduction:
It’s like remote controlling an application: the client computer’s keystrokes or mouse
clicks are transmitted over the network to the remote computer. VNC also allows
clipboard sharing between both computers. If you come from a Microsoft Windows
server background, VNC is much like the Remote Desktop Service, except it’s also
available for OS X, Linux, and other operating systems.
Like everything else in the networking world, VNC is based on the client server model:
VNC server runs on a remote computer — your Droplet — which serves incoming client
requests.
Goals:
In this tutorial we will learn how to install and configure a VNC server on CentOS
7. We will install the TigerVNC server which is freely available from the TigerVNC
GitHub repository.
To demonstrate how VNC works, we will also install the GNOME desktop on your
CentOS server. We will create two user accounts and configure VNC access for them.
We will then test their connectivity to the remote desktop, and finally, learn how to
secure the remote connection through an SSH tunnel.
The commands, packages, and files shown in this tutorial were tested on a minimal
installation of CentOS 7. We would recommend the following:
First, we will create two user accounts. These accounts will remotely connect to our
CentOS 7 server from VNC clients.
joevnc
janevnc
Run the following command to add a user account for joevnc:
lOMoARcPSD|6877995
The output will ask us for new password. Once supplied, the account will be ready for
login:
Now we will install GNOME desktop. GNOME is a collaborative effort: it’s a collection of
free and open source software that makes up a very popular desktop environment.
There are other desktop environments like KDE, but GNOME is more popular. Our VNC
users will use GNOME to interact with the server from its desktop:
Depending on the speed of your network, this can take a few minutes.
sudo reboot
Depending on how your server has been set up, when the machine starts up it may
remain in the boot phase showing a message like this:
To get past this, press 1 (license read), then 2 (accept licence), and then C (to
continue). You may have to press C two or more times. The image below shows this:
If you don’t see this error and the boot process is smooth, all the better – you can move
on to the next step.
Step3:
TigerVNC is the software that will allow us to make a remote desktop connection.
. . .
Running transaction
Installing : tigervnc-server-1.2.80-0.30.20130314svn5065.el7.x86_64
1/1
lOMoARcPSD|6877995
Verifying : tigervnc-server-1.2.80-0.30.20130314svn5065.el7.x86_64
1/1
Installed:
tigervnc-server.x86_64 0:1.2.80-0.30.20130314svn5065.el7
Complete!
Now we have VNC server and the GNOME desktop installed. We have also created two
user accounts for connecting through VNC.
VNC server doesn’t start automatically when it’s first installed. To check this, run the
following command:
disabled
Note:
So why is it disabled? That’s because each user will start a separate instance of
the VNC service daemon. In other words, VNC doesn’t run as one single process
that serves every user request. Each user connecting via VNC will have to start a
new instance of the daemon (or the system administrator can automate this).
CentOS 7 uses the systemd daemon to initiate other services. Each service that
natively runs under systemd has a service unit file that’s placed under
the /lib/systemd/system directory by the yum installer. Processes that get
started automatically at boot time have a link to this service unit file placed in
the /etc/systemd/system/ directory.
lOMoARcPSD|6877995
sudo ls -l /lib/systemd/system/vnc*
sudo ls -l /etc/systemd/system/*.wants/vnc*
So, the first step is to start two new instances of VNC server for our two users.
To do this, we will need to make two copies of the generic VNC service unit file
under /etc/system/system. In the code snippet below, you’re making two
copies with two different names:
sudo cp /lib/systemd/system/[email protected]
/etc/systemd/system/vncserver@:4.service
sudo cp /lib/systemd/system/[email protected]
/etc/systemd/system/vncserver@:5.service
So why did we add two numbers (along with the colon) in the copied file names?
Again, that comes back to the concept of individual VNC services. VNC by itself runs on
port 5900. Since each user will run their own VNC server, each user will have to
connect via a separate port. The addition of a number in the file name tells VNC to run
that service as a sub-port of 5900. So in our case, joevnc’s VNC service will run on
port 5904 (5900 + 4) and janevnc’s will run on 5905 (5900 + 5).
Next edit the service unit file for each client. Open
the /etc/systemd/system/vncserver@:4.service file with the vi editor:
sudo vi /etc/systemd/system/vncserver@:4.service
lOMoARcPSD|6877995
A look at the “Quick HowTo” section tells us we have already completed the first step.
Now we need to go through the remaining steps. The comments also tell us that VNC is
a non-trusted connection. We will talk about this later.
For now, edit the [Service] section of the file, replacing instances
of <USER> with joevnc. Also, add the -geometry 1280x1024 clause at the end of
the ExecStart parameter. This just tells VNC the screen size it should start in. You will
modify two lines in total. Here’s what the edited file should look like (note that the entire
file is not shown):
# The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@:<display>.service
# 2. Edit <USER> and vncserver parameters appropriately
# ("runuser -l <USER> -c /usr/bin/vncserver %i -arg1 -arg2")
# 3. Run `systemctl daemon-reload`
# 4. Run `systemctl enable vncserver@:<display>.service`
#
. . .
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 ||
:'
ExecStart=/sbin/runuser -l joevnc -c "/usr/bin/vncserver %i -geometry
1280x1024"
PIDFile=/home/joevnc/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 ||
:'
ExecStart=/sbin/runuser -l janevnc -c "/usr/bin/vncserver %i -geometry
1280x1024"
PIDFile=/home/janevnc/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
Next, run the following commands to reload the systemd daemon and also to make sure
VNC starts up for two users at boot time.
Output:
ln -s '/etc/systemd/system/vncserver@:4.service'
'/etc/systemd/system/multi-user.target.wants/vncserver@:4.service'
Output:
ln -s '/etc/systemd/system/vncserver@:5.service'
'/etc/systemd/system/multi-user.target.wants/vncserver@:5.service'
Next, we will need to configure the firewall to allow VNC traffic through
ports 5904 and 5905 only. CentOS 7 uses Dynamic Firewall through
the firewalld daemon; the service doesn’t need to restart for changes to take effect.
The firewalld service should start automatically at system boot time, but it’s always good
to check:
running
If the state is “not running” for any reason, execute the following command to make sure
it’s running:
Output:
success
Output:
success
Step6
We are one step away from seeing VNC in action. In this step, the users will
need to set their VNC passwords. These are not the users’ Linux passwords,
but the passwords to log in to the VNC sessions.
Open another terminal connection to the CentOS 7 server, and this time log in
as joevnc.
ssh joevnc@your_server_ip
lOMoARcPSD|6877995
vncserver
As shown in the output below, the server will ask joevnc to set up a VNC
password. After typing in the password, the program also shows a number of
files being created in the user’s home directory:
Password:
Verify:
xauth: file /home/joevnc/.Xauthority does not exist
You should see similar output showing that janevnc’s session will run on display 2.
Finally, reload the services from the main terminal session:
sudo systemctl daemon-reload
sudo systemctl restart vncserver@:4.service
sudo systemctl restart vncserver@:5.service
lOMoARcPSD|6877995
Ex.No 3 B.
Step1:
For this tutorial, we will assume users joevnc and janevnc are trying to connect
to the CentOS 7 server from their Windows computers.
They will each need a VNC client for Windows to log into the remote desktop.
This client is just like a terminal client like PuTTY, except it shows graphical
output. There are various VNC client available, but the one we will use is
RealVNC, available here. VNC Viewer for Mac OS X is available for download on
the same page, and the Mac version is fairly similar to the Windows one.
In the VNC Server field, add the IP address of your CentOS 7 server. Specify the port
number 5904 after the server’s IP, separate by a colon (:). We used 5904 because
that’s the VNC service port for joevnc.
We have also decided to let VNC Viewer choose the encryption method. This option will
only encrypt the password sent across the network. Any subsequent communication
with the server will be unencrypted. (We’ll set up a secure SSH tunnel in the final step.)
lOMoARcPSD|6877995
A new window opens showing the GNOME desktop for our remote CentOS server:
lOMoARcPSD|6877995
Now joevnc can start a graphical tool like the GNOME calculator:
lOMoARcPSD|6877995
lOMoARcPSD|6877995
Now janevnc can also start another VNC session with the CentOS server. The
IP address is the same, and the port is 5905:
When janevnc logs in via VNC Viewer, an empty desktop with a welcome
message is shown, just like it was shown for joevnc. In other words, the two
users are not sharing the desktop instances. joevnc’s desktop should still be
showing the calculator.
To close the remote desktop session, simply closing the window will do.
However, this doesn’t stop the user’s VNC service in the background on the
server. If the service is not stopped or restarted and the machine had no reboots,
the same desktop session would be presented at the next logon.
Close the VNC Viewer windows for joevnc and janevnc. Close their terminal
sessions, too. From the main terminal window, check to see if the VNC services
are still running:
sudo systemctl status vncserver@:4.service
. . .
Check the second service:
. . .
If you wanted to log back into joevnc’s desktop at this point, you’d see the same
calculator app open.
This presents some interesting challenges for system administrators. If you have a
number of users connecting to the server via VNC, you may want to devise some way
to stop their VNC services when no longer needed. This may save some valuable
system resources.
As you test and play around with VNC, you may sometimes find the service has
crashed and is unrecoverable. When you try to check the status:
sudo rm -i /tmp/.X11-unix/X4
Output:
General Troubleshooting
Although relatively rare, you may encounter other errors when working with VNC.
For example, your remote desktop screen can go blank or hang, the session
might crash with a cryptic error message, VNC Viewer may not connect properly
or transmit commands to the GUI to launch applications, etc.
System resources can also be a culprit; you may have to add extra RAM to your
Droplet, etc.
Step 2:
So far both joevnc and janevnc have been accessing their remote desktops
through unencrypted channels. As we saw before, VNC Viewer warns us about
this at connection time; only the password is encrypted as the sessions begins.
Any subsequent network traffic and data transfer is open for anyone to intercept
in the middle.
With port forwarding, we can set our local VNC client to connect to port 5900 on the
local client computer, and this can be mapped to port 5905 on the remote server. This is
example is for janevnc’s connection, but you could easily follow the same steps for any
other clients.
When the VNC client application starts, it can be pointed to port 5900 on localhost, and
our port forwarding will transparently transport it to port 5905 on the remote server.
Note: You’ll have to start an SSH section each time to make the connection secure.
OS X
On your Mac, open Terminal.
Enter the following connection information, being sure to replace your_server_ip with your
remote server’s IP address:
Windows
For securing janevnc’s VNC session, we will assume the local Windows computer has
PuTTY installed. PuTTY is free and can be downloaded from here.
If janevnc’s VNC and terminal sessions are not closed already, close them now.
Start PuTTY. In the session screen, ensure you specify the server IP address and give
a descriptive name to the connection, then click the Save button to save the connection
details. Note how we have specified username@your_server_ip in the Hostname field:
Next, expand the SSH menu item in the left navigation pane, and select the X11 item. This
shows the X11 forwarding properties for the session. Ensure the checkbox for Enable X11
forwarding is checked. This ensures that SSH encrypts X Windows traffic that flows between
the server and client:
lOMoARcPSD|6877995
Finally, select SSH > Tunnels. Type 5900 in the Source port field. In
the Destination field, specify your server’s name or IP address, followed by a
colon and the VNC port number for the intended user. In our case, we have
specified your_server_ip:5905.
Alternately, you could use port 5902. The 2 in this case would be the display
number for janevnc (remember the message displayed when janevnc ran
the vncserver command).
Click the Add button and the mapping will be added under Forwarded ports.
This is where we are adding port forwarding for the SSH session; when the user
connects to localhost at port 5900, the connection will be automatically tunnelled
through SSH to the remote server’s port 5905.
lOMoARcPSD|6877995
Go back to the Sessions items and save the session for janevnc. Click the Open button and a
new terminal session will open for janevnc. Log in as janevnc with the appropriate UNIX
password:
lOMoARcPSD|6877995
VNC Viewer
Next start VNC Viewer again. This time, in the VNC Server address, type <^> and let
VNC server choose the encryption method:
You will still get the dialogue box warning you about an unencrypted session, but this
time you can safely ignore it. VNC Viewer doesn’t know about the port it’s being
forwarded to (this was set in the SSH session just started) and assumes you are trying
to connect to the local machine.
Accepting this warning will show the familiar password prompt. Enter janevnc’s VNC
password to access the remote desktop.
So how do you know the session was encrypted? If you think about it, we had set port
forwarding in the SSH session. If an SSH session wasn’t established, port forwarding
wouldn’t have worked. In fact, if you close the terminal window and log out of the PuTTY
lOMoARcPSD|6877995
session then try to connect with VNC Viewer alone, a connection attempt
to localhost:5900 would show the following error message:
So, if the localhost:5900 connection works, you can be confident that the
connection is encrypted.
Remember that you will want to establish the SSH connection first every time you
use VNC, to make sure your connection is always encrypted.
Conclusion
Accessing your CentOS Linux system from a GUI front end can make system
administration much simpler. You can connect from any client operating system and
don’t have to depend on web-based hosting control panels. VNC has a much smaller
footprint compared to most control panels.
Although we have shown how two ordinary users can connect with their VNC clients,
that’s hardly practical in serious production environments. In reality, users will have
customized applications or browsers for accessing the server. Running a number of
VNC services for each user also creates an unnecessary burden on system resources,
not to mention the inherent risks associated with it.
If you decide to install and run VNC on your production Linux server, we strongly
recommend using it for administrative purposes only.
lOMoARcPSD|6877995
OR
3A&B
Important Terminology
Here are some key terms to remember when connecting with VNC
VNC session password – this password is used only with VNC. This is not tied to your
MCECS login. Because the encryption on this password is extremely weak, do not use a
password that you want to keep private as your session password.
Display Number – when you start a VNC session, it will be assigned a number between 1
and 99 that will identify it on the Linux system you are remotely connected to.
Port Number – This is equal to your Display Number plus 5900. This number is used by the
VNC viewer software to remotely connect with the VNC session running on MCECS Linux
systems.
Host Address – this is the full domain name of the system you want to remotely connect
with. This is usually in the form of somecomputer.cs.pdx.edu, somecomputer.ece.pdx.edu, or
somecomputer.cecs.pdx.edu
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.
NOTE: If you see the following message after entering vncserver, this means you have a VNC
session already running on this system. Go to the end of this article for more information on how
to check for existing VNC sessions and also how to terminate them.
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 vncpasswd to change it.
lOMoARcPSD|6877995
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 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
lOMoARcPSD|6877995
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.
lOMoARcPSD|6877995
Be aware that on CAT-supported systems, VNC sessions are terminated if they have been idle for
more than 48 hours.
lOMoARcPSD|6877995
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.
lOMoARcPSD|6877995
If there are no sessions running, you will see the following output
Ex No:4
Product Description
VMware ESXi is a complete, scalable and robust virtualization platform.
Designed to reduce capital and operation costs. Maximize IT efficiency
while giving you agility through automation and the freedom to choose
applications, SUSE® Linux Enterprise OS and hardware.
Tested Configuration:
Computer Type: Virtual Machine
Mother Board Intel 440 BX Desktop Reference Platform /
Revision: Motherboard Rev B0
BIOS/uEFI: BIOS: 6.00 (04/05/2016)
CPU: 8 Intel Xeon® Processor E7-8890 v2 2.80 GHz
RAM: Host platform: 6 TB, multiple 64-bit VM guests:
3000 GB, 32-bit guests: 16 GB, single max VM
guest: 6128 GB
Ports and Bus Serial
Types: Parallel Port
3 PCI-ISA
4 32-Bit PCI
lOMoARcPSD|6877995
PCI Express X8
Video Adapter: VMware® VMware SVGA II
Host Bus Adapter: VMware® Paravirtual SCSI (PVSCSI) adapter ,
SCSI
VMware® Virtual IDE Device for SUSE Linux ,
IDE
Hard Disk Drive: VMware® Virtual Hard Disk rev:1.0 (SCSI) ,
SCSI
CD/DVD: VMware® Virtual IDE CDR10 , IDE
Test Kit: System Certification Kit 7.6.0-44.1
Config Notes
1. VMware recommends to install deployPkg with open-vm-tools if
creating a Template http://kb.vmware.com/kb/2075048.
2. Virtual machine guest: System certification testing was performed
with a virtual machine configured with up to 6128 GB of memory
on a SLES 11 SP4 x86-64 guest.
3. Virtual machine guest: System certification testing was performed
with a SLES 11 SP4 64-bit virtual machine configured with up to
128 CPUs.
4. VMware recommends using the Open VM Tools redistributed by
the operating system vendors. For additional information, see
knowledge base article 2073803 at
http://kb.vmware.com/kb/2073803. VMware guest OS installation
information can be found
at:http://partnerweb.vmware.com/GOSIG/SLE_11.html
5. The VMware Memory Ballooning driver included in SLES 11
SP4 is auto loaded to improve the virtual machine memory
performance.
2015
Driver Version: 11.0.3
Driver Type: Video
Driver Name: vmware_drv.so
Driver
Driver Date: 17-Jun-
Driver Size: 10560
2015
Driver Version: 11.0.3
VMware® VMXNET3 Ethernet Adapter
Driver Type: LAN
Driver Name: vmxnet3.ko
Driver
Driver Date: 24-Jun-
Driver Size: 77407
2015
Driver Version: 1.1.30.0-k
Driver Type: LAN
Driver Name: vmxnet3.ko
Driver
Driver Date: 24-Jun-
Driver Size: 58587
2015
Driver Version: 1.1.30.0-k
VMware® Paravirtual SCSI (PVSCSI) adapter
Driver Type: HBA
Driver Name: vmw_pvscsi.ko
Driver
Driver Date: 24-Jun-
Driver Size: 39527
2015
Driver Version: 1.0.1.0-k
Driver Type: HBA
Driver Name: vmw_pvscsi.ko
Driver
Driver Date: 24-Jun-
Driver Size: 28699
2015
Driver Version: 1.0.1.0-k
VMware® Virtual IDE Device for SUSE Linux
Driver Type: HBA
Driver Name: ata_piix.ko
Driver
Driver Date: 24-Jun-
Driver Size: 51119
2015
Driver Version: 2.13
Driver Type: HBA Driver Name: ata_generic.ko
lOMoARcPSD|6877995
Driver
Driver Date: 24-Jun-
Driver Size: 13383
2015
Driver Version: 0.2.15
Driver Type: HBA
Driver Name: ata_generic.ko
Driver
Driver Date: 24-Jun-
Driver Size: 10087
2015
Driver Version: 0.2.15
Driver Type: HBA
Driver Name: ata_piix.ko
Driver
Driver Date: 24-Jun-
Driver Size: 39751
2015
Driver Version: 2.13
Microsoft Azure
Amazon Web Service ( AWS) EC2
Amazon WorkSpaces
lOMoARcPSD|6877995
OR
lOMoARcPSD|6877995
Addressing Table
lOMoARcPSD|6877995
Switch(S0,S1,S2)
lOMoARcPSD|6877995
lOMoARcPSD|6877995
lOMoARcPSD|6877995
lOMoARcPSD|6877995
lOMoARcPSD|6877995
Topology Diagram
Addressing Table
Device
(Hostname) Interface IP Address Subnet Mask Default Gateway
Step 1: Cable a network that is similar to the one in the topology diagram.
You can use any current switch in your lab as long as it has the required interfaces shown in the topology.
Note: If you use 2900 or 2950 switches, the outputs may appear different. Also, certain commands may be
different or unavailable.
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 fa0/1-24
Switch(config-if-range)#shutdown
Switch(config-if-range)#interface range gi0/1-2
Switch(config-if-range)#shutdown
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 2 of 11
lOMoARcPSD|6877995
Step 7: Configure trunking and the native VLAN for the trunking ports on all switches.
Trunks are connections between the switches that allow the switches to exchange information for all VLANS.
By default, a trunk port belongs to all VLANs, as opposed to an access port, which can only belong to a
single VLAN. If the switch supports both ISL and 802.1Q VLAN encapsulation, the trunks must specify which
method is being used. Because the 2960 switch only supports 802.1Q trunking, it is not specified in this lab.
A native VLAN is assigned to an 802.1Q trunk port. In the topology, the native VLAN is VLAN 99. An 802.1Q
trunk port supports traffic coming from many VLANs (tagged traffic) as well as traffic that does not come
from a VLAN (untagged traffic). The 802.1Q trunk port places untagged traffic on the native VLAN.
Untagged traffic is generated by a computer attached to a switch port that is configured with the native
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 4 of 11
lOMoARcPSD|6877995
VLAN. One of the IEEE 802.1Q specifications for Native VLANs is to maintain backward compatibility with
untagged traffic common to legacy LAN scenarios. For the purposes of this lab, a native VLAN serves as a
common identifier on opposing ends of a trunk link. It is a best practice to use a VLAN other than VLAN 1 as
the native VLAN.
Use the interface range command in global configuration mode to simplify configuring trunking.
S1(config)#interface range fa0/1-5
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#switchport trunk native vlan 99
S1(config-if-range)#no shutdown
S1(config-if-range)#end
S2(config)# interface range fa0/1-5
S2(config-if-range)#switchport mode trunk
S2(config-if-range)#switchport trunk native vlan 99
S2(config-if-range)#no shutdown
S2(config-if-range)#end
S3(config)# interface range fa0/1-5
S3(config-if-range)#switchport mode trunk
S3(config-if-range)#switchport trunk native vlan 99
S3(config-if-range)#no shutdown
S3(config-if-range)#end
Verify that the trunks have been configured with the show interface trunk command.
S1#show interface trunk
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 5 of 11
lOMoARcPSD|6877995
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.
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 6 of 11
lOMoARcPSD|6877995
! interface FastEthernet0/3
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk native vlan 99
switchport mode trunk
! interface FastEthernet0/5
switchport trunk native vlan 99
switchport mode trunk !
interface FastEthernet0/6
shutdown
!
<all remaining FastEthernet and GigabitEthernet interface are shutdown>
!
interface Vlan1
no ip address no
ip route-cache
! interface
Vlan99
ip address 172.17.99.11 255.255.255.0 no
ip route-cache
! line con 0 exec-
timeout 0 0
password cisco
logging synchronous
login line vty 0 4
exec-timeout 0 0
password cisco
logging synchronous
login line vty 5 15
exec-timeout 0 0
password cisco
logging synchronous
login ! end
S2
hostname S2 !
enable secret class no
ip domain-lookup
!
interface FastEthernet0/1
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/2
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/3
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk native vlan 99
switchport mode trunk
!
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 7 of 11
lOMoARcPSD|6877995
interface FastEthernet0/5
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/6
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 30
switchport mode access shutdown
!
interface FastEthernet0/8
switchport access vlan 30
switchport mode access shutdown
!
interface FastEthernet0/9
switchport access vlan 30
switchport mode access shutdown
!
interface FastEthernet0/10
switchport access vlan 30
switchport mode access shutdown
!
interface FastEthernet0/11
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/12
switchport access vlan 10
switchport mode access shutdown
!
interface FastEthernet0/13
switchport access vlan 10
switchport mode access shutdown
!
interface FastEthernet0/14
switchport access vlan 10
switchport mode access shutdown
!
interface FastEthernet0/15
switchport access vlan 10
switchport mode access shutdown
!
interface FastEthernet0/16
switchport access vlan 10
switchport mode access shutdown
!
interface FastEthernet0/17
switchport access vlan 10
switchport mode access shutdown
!
interface FastEthernet0/18
switchport access vlan 20
switchport mode access
!
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 8 of 11
lOMoARcPSD|6877995
interface FastEthernet0/19
switchport access vlan 20
switchport mode access shutdown
!
interface FastEthernet0/20
switchport access vlan 20
switchport mode access shutdown
!
interface FastEthernet0/21
switchport access vlan 20
switchport mode access shutdown
!
interface FastEthernet0/22
switchport access vlan 20
switchport mode access shutdown
!
interface FastEthernet0/23
switchport access vlan 20
switchport mode access shutdown
!
interface FastEthernet0/24
switchport access vlan 20
switchport mode access shutdown
! interface
GigabitEthernet0/1 shutdown
!
interface GigabitEthernet0/2
shutdown
!
interface Vlan1
no ip address no
ip route-cache
shutdown
!
interface Vlan99 ip address
172.17.99.12 255.255.255.0 no ip
route-cache !
ip http server !
control-plane
! !
line con 0 exec-
timeout 0 0
password cisco
logging synchronous
login line vty 0 4
exec-timeout 0 0
password cisco
logging synchronous
login
line vty 5 15 exec-
timeout 0 0
password cisco
logging synchronous
login ! ! end
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 9 of 11
lOMoARcPSD|6877995
S3 hostname S3 no ip
domain-lookup
enable secret class
!
interface FastEthernet0/1
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/2
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/3
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/4
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/5
switchport trunk native vlan 99
switchport mode trunk
!
interface FastEthernet0/6
switchport access vlan 30
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 30
!
interface FastEthernet0/8
switchport access vlan 30
!
interface FastEthernet0/9
switchport access vlan 30
!
interface FastEthernet0/10
switchport access vlan 30
!
interface FastEthernet0/11
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/12
switchport access vlan 10
!
interface FastEthernet0/13
switchport access vlan 10
!
interface FastEthernet0/14
switchport access vlan 10
!
interface FastEthernet0/15
switchport access vlan 10
!
interface FastEthernet0/16
switchport access vlan 10
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 10 of 11
lOMoARcPSD|6877995
!
interface FastEthernet0/17
switchport access vlan 10
!
interface FastEthernet0/18
switchport access vlan 20
switchport mode access
!
interface FastEthernet0/19
switchport access vlan 20
!
interface FastEthernet0/20
switchport access vlan 20
!
interface FastEthernet0/21
switchport access vlan 20
!
interface FastEthernet0/22
switchport access vlan 20
!
interface FastEthernet0/23
switchport access vlan 20
!
interface FastEthernet0/24
switchport access vlan 20
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address no
ip route-cache
shutdown
!
interface Vlan99 ip address
172.17.99.13 255.255.255.0 no ip
route-cache
!
line con 0
password cisco
login line vty
0 4 password
cisco login
line vty 5 15
password cisco
login ! end
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 11 of 11
lOMoARcPSD|6877995
Experiment No. 6
1. Aim: Installation and Configuration of virtualization using KVM
4. Hardware / Software Required: Ubuntu operating system, open source software KVM,
Internet.
6. Procedure:
Installation Steps :
1. #sudo grep -c "svm\|vmx" /proc/cpuinfo
2. #sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
3. #sudoadduserrait
#sudoadduserraitlibvirtd
After running this command, log out and log back in as rait
4. 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
5. Open Virtual Machine Manager application and Create Virtual Machine
#virt-manager
7. Result:
SNAPSHOTS____________________________
Step 1 : #sudo grep -c "svm\|vmx" /proc/cpuinfo
lOMoARcPSD|6877995
Step 3 : #sudoadduserrait
After running this command, log out and log back in as rait
Step 4 : #sudoadduserraitlibvirtd
After running this command, log out and log back in as rait
lOMoARcPSD|6877995
Step 5 : Open Virtual Machine Manager application and Create Virtual Machine
#virt-manager as shown below
8. 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
9. Viva Questions:
What is virtualization ?
What is the benefit of desktop virtualization?
What are the different virtual machines available?
lOMoARcPSD|6877995
10. References:
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).