Virtualization is a concept to simulate software and hardware virtually so that we can use system resources effectively. The main reason people are moving to virtualization is effective utilization of resources. Lets try to understand this concept by going in to history and then in Linux way to understand it better.
When computers started growing people start to realized that resources of one computer should be effectively used. One classic example is sharing resources of a computer to other computer. How to share them? They came with a concept of “Networking” to connect machines so that resources of one machine can be shared across different machines. For example if we take Printer which is not used frequently by a single machine but in the network there is a chance that other machines require this resource. If we can share printer across network we can utilize it’s capabilities to maximum. Another example is sharing files across the network. We can buy a server which have TB’s of space and we can share across the network for thin clients. This will save us many dollars. Virtualization concept came in to picture with this type of requirements. We are able to use one system resources like HDD, printer etc by other machines effectively, why not Processor and RAM?. To understand this we will take one example in Linux.
I believe we all Linux users know how to mount an ISO image in Linux. ISO image is actually a file, it’s not a hardware CD-ROM or DVD-ROM. In Linux hardware CD/DVD-ROM can be simulated by using loop device file located in /dev folder. So that when ever we want to access an ISO image we have to inform /dev/loop hardware file to simulate CD-ROM device. Once /dev/loop device simulate CD-ROM by mounting ISO file on virtual drive we can access CD/DVD-ROM content.
Here we are forced to use /dev/loop to simulate a hardware CD/DVD drive. Similarly These days we have plenty of resources available in our systems/servers which are never used up to their extent. For example if we take i3 core to duo with 3Ghz, 16GB RAM and HDD of 1.5TB we rarely use these resources. Most of the capabilities are rarely used. Suppose If we take the processor which is 3Ghz with core to duo which means 3Ghz X 4 which is equal to 12Ghz processing CPU. In our desktop environment we never use this much CPU resources, maximum we can go up to 6Ghz or around that mark. Remaining 6Ghz we are totally wasting by keeping them ideal. This is applicable for RAM and HDD too.
To use these resources effectively the concept of Virtualization came in to existence. With the help of Virtualization we can simulate entire HW and pretend to OS that all the hardware it sees exists. With virtualization we can simulate each and every hardware.
Below are some of the devices helps implementation of Virtualization in Linux(Specifically KVM Virtualization).
CD/DVD-ROMS: loop device
HDD: loop device
RAM: VirtIO frame work, /dev/kvm
Processor: VirtIO frame work, /dev/kvm
VGA: VirtIO frame work, /dev/kvm
Ethernet device: VirtIO frame work, /dev/kvm
In next post we will see different types of Virtualization.
Latest posts by Surendra Anne (see all)
- FREE: JOIN OUR DEVOPS TELEGRAM GROUPS - August 2, 2019
- Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) - August 27, 2018
- How to use ohai/chef-shell to get node attributes - July 19, 2018
- wget download a file to a directory in Linux/Unix - June 4, 2018
- GIT: How to compare two GIT branches? - June 3, 2018