Virtualization is the way of emulating hardware in software. If this sentence was find tricky to understand, so try this- using virtualization you can run an operating system on top of the other. It is achieved with help of virtualization software. It is a program that allows to run operating system while not using the available hardware directly.
How Virtualization works?
Virtualization software is a program that fools operating system into believing that it is using the computer’s hardware but it isn’t the case. The software actually creates an environment where in it emulates various hardware components of the computer.
When anyone tries to launch(or install) an operating system, the virtual software will inform the operating system being run about the hardware that it emulated rather than about the actual hardware installed on the computer. This technique is called “Sandboxing“.
When you create a virtual environment for the operating system, you need to tell the virtualization software about the hardware resources allocated for it….
The amount of ram you want to allocate to that operating system, is the amount of memory reserved by software from the real RAM of same system.
The Number of cores you want to allocate to the operating system. Some software allows to allocate more than the actual number of cores by emulating the extra cores.
Hard disk size of virtual machine will have access to space available to the particular operating system. It varies with different operating system. But you can create more than one hard disk, emulating more than one hard disk.
Network Address Translation(NAT) mechanism used to provide the internet access to the virtual machines.
Also depending on the different types of virtualization software,there are more customizing options available, like
- Number of removable devices.
- Virtual machine having access to the real drives, USB devices and can play audio in real system.
Virtualization depends on the hardware actual installed on the computer.without a powerful PCs, virtualization can be a big pain.
When virtualization running on top of another,many things are happening inside it……
- The Real operating system is running and managing several applications and services.
- One of those application is Virtualization software.
- It might running more than one operating system(Guest Operating systems).
- Load created by the Guest operating system is being sent to the real hardware through host operating system.
As there is ring structure of operating system, in which the core system is running on the processor in a “privileged mode”, while the rest is running on a “non-privilege mode”. Also the virtualization software is running on non-privilege mode, but it will try to emulate the privilege and non privilege modes of the processor to the guest operating system. If guest operating system tries for disk read request i.e non privilege process is trying to execute privilege code. It will require a plenty processing power to do such process of switching to and from privilege and non-privilege modes for the guest while asking for the host operating system for the resources.
Hence to make virtualization easy, Intel and AMD has developed hardware assisted virtualization technologies name as VT-x and AMD-V by each company respectively. Depending on the make of your processor, if it support one of these features, virtualization will be smoother and faster.