Virtualization is actually quite simple: virtualization is when you run a “virtual” version of a complete computer system on a software layer which is abstracted from the actual computer hardware. In the practical sense virtualization refers to the ability to run several computer operating systems all on one computer, simultaneously.
The applications running on a virtual machine experience their virtual machine just the same way they would experience a standard, dedicated machine. So, the OS and its libraries alongside all the other programs on the virtual machine are unique to the guest virtual system and are all unconnected to the operating system that acts as host below it.
virtualization is a very common tool in computing and people use it for a lot of different reasons. Users in desktop environments would usually use virtualization to enable them to run applications that are designed for an operating system other than the one they are using – and to do so without the need to reboot their computer into a different OS.
Server admins like virtualization because it allows them to run different operating systems, but there are more reasons for using virtualization as a sysadmin. For one. virtualization lets a sysadmin segment large server systems into smaller parts so that server hardware can be used more efficiently – particularly where many users and applications, all with diverse needs, are involved.
Furthermore, virtualization can assist with isolation of applications so that the individual programs running on a machine are kept safe from each other as virtualization means that each process takes place in a different virtual machine – when something goes wrong it does not affect every application on the host.
Explaining hypervisors
The program that is used to create and to run virtual machines is called a hypervisor. You get two types of hypervisors, one is a basic hypervisor which can run a guest virtual machine on a system – in effect, working as if it is an operating system. The other type of hypervisor is called a hosted hypervisor which is a bit more like a normal application – you can start and stop this kind of hypervisor just like you would start and stop a normal program.
Today the difference between the two types of hypervisors is not all that important in part because of systems such as kernel-based virtual machines, or KVMs. A KVM is part of the Linux kernel and it can run a virtual machine directly – but you can still use a system that runs KVM-based virtual machines as a normal computer too.
What is a virtual machine?
Simply put, virtual machines are an emulated version of a full computer system – running on top of a complete computer system. A virtual machine has access to typical computer resources including computer power itself – access is given on a hardware-assisted level, but there is limited access to the hosting machine’s processor and RAM. Virtual machines can access a single disk or several disks or even virtual storage – and indeed a physical network interface, or a virtual network interface.
Virtual machines can address USB devices, video cards and plenty of other types of hardware too. Where virtual machines are stored on virtual disks this can be referred to as a disk image. This image can contain files that enable the virtual machine to boot, it can also contain other files more in tune with specific storage needs.
The difference between virtual machines and containers
There is a concept a bit similar to virtual machines, but different in functionality. It is called Linux containers. Yes, containers and VMs both allow the running of applications in an environment which isolates the applications, but there is a key difference. Containers are not actually full machines that operate independently – instead, a container is a process that is isolated but which shares the Linux kernel of the host operating system, alongside libraries and other files needed to execute applications in the container. Containers share network interfaces too, just like VMs. However, a container is usually designed to run just a single application – whereas a virtual machine can often run as a multi-purpose server with full functionality.