Virtualization is like an emulator. An emulator tries to mimic a specific HW.
For example there are many game emulators that emulate old HW, like Super Nintento, Atari, Commodore 64 and so on.
If you want to play the old 8-bits games you download the emulator and then you download the ROM files which are the games and then you play them.
There is a similar approach for OS. This means that instead of installing games you install OSs.
You create a virtual machine and then you install an OS on it.
You can create many virtual machines and install different OSs on them on your computer as long as you have enough RAM, disk space and CPU.
To achieve this you need a special application that emulate a real computer with it's own RAM, disk, CPU and Ethernet interface.
You will use VirtualBox.
Virtualization software, also called a hypervisor, emulates computer hardware allowing multiple operating systems to run on a single physical computer host.
Each guest operating system appears to have the host’s processor, memory, and other resources all to itself.
The hypervisor, however, is actually controlling the host processor and resources and allocates what is needed to each operating system, making sure that the guest operating systems (called virtual machines) cannot disrupt each other.
Two type of virtualization
There are two types of x86 virtualization: bare-metal and hosted. Sometimes these types are referred to as Type-1 and Type-2 hypervisors respectively.
Bare-metal means the virtualization layer (hypervisor) installs directly onto a server without the need for a traditional operating system like Windows or Linux to be installed first.
“Hosted” means that an operating system must first be installed on a server, and the virtualization layer is installed afterwards, just like an application.
Bare-metal hypervisors include VMware ESX, Citrix XenServer and Microsoft Hyper-V Server.
Hosted hypervisors include VMware Workstation, Fusion, VMware Player and VMware Server, Oracles’s VirtualBox. Some of the differences between hosted and bare-metal hypervisors are listed below.
- Requires a host operating system (Windows/Linux/Mac), installs like an application.
- Virtual machines can use all the hardware resources that the host can see.
- Maximum hardware compatibility as the operating system supplies all the hardware device drivers.
- Overhead of a full general-purpose operating system between the virtual machines and the physical hardware results in performance 70-90% of native.
- Installs right on the bare metal and therefore offers higher performance and scalability but runs on a narrower range of hardware.
- Many advanced features for resource management, high availability and security.
- Supports more VMs per physical CPU then hosted products.
- Because there is no overhead from a full host operating system performance is 83-98% of native. There is a small bit of overhead from the virtualization layer of the hypervisor
Why is virtualization such a great thing? Because most computers do not fully utilize the resources (memory, CPU, disk, network) that they have which is very wasteful.
Would you rather have 10 computers that are all using less then 20% of their total resources, or three computers that are using 70% of their resources?
You might think you could avoid this by simply installing more applications on one computer but this is often a bad idea as the applications may conflict with each other and cause problems, and a single OS crash will take down all your applications.
Virtualization solves this by allowing the applications to run on the same physical computer, but separates them by allowing each one to have its own isolated guest operating system.
So those are the basics on what virtualization is. Now on to an analogy.
Imagine computers as cars on the road in motion. Each car has its own resources, such as fuel, heat/cooling, radio, etc. Most cars are never filled to capacity, and many have only one person in them which is wasteful.
Imagine virtualization as a bus, instead of many people driving in many cars you now have many people being moved around by a few buses.
A person may only ride one bus at a time, but if a bus becomes inoperable due to a flat tire or an engine problem, the people may simply get off and transfer to another bus that has unused seats.
In virtualization, this “transfer” happens because of features like High Availability (HA).
A person may also hop from one bus to another if it becomes too crowded while it is moving. In virtualization, this is called VMotion, if you’re using VMware, or Live Migration if you’re using Hyper-V.
By utilizing buses that hold more people instead of cars, fewer resources are wasted, while all the people still get where they are going. Buying and operating one bus instead of 10 cars is a lot cheaper and more efficient.
Question: What type of hypervisor uses VirtualBox, type1 or type2?