A Virtual Machine is a virtual computer that works just lika a physical computer with its own CPU, RAM, disk storage, network interfaces, without being a physical computer. Virtual machines are called Guests and run within the physical computer called Host. A software called hypervisor allocates some resources of the physical computer such as CPU, RAM, etc. to virtual machines.
For example, if your CPU has eight cores, you can create two virtual machines on a computer and give them two cores. If you have 16 GB RAM then you can give 4-6 GB or more RAM to virtual machines. Virtual machines provide an environment that is isolated from the rest of the system, so whatever is running inside the virtual machine does not interfere with the hardware and software of the Host.
You can run more than one virtual machines on a computer. You can also transfer virtual machines from one computer to another. Virtual machines use files for hard disks. Within the virtual machine, that virtual disk file appears as a hard disk. The operating system and all the data of the virtual machine are written to the same virtual disk file. But that virtual hard disk from the host machine is appears as file. And whenever you need to move your virtual machine on different host, copy and move the virtual disk file on different host.
5 Key Benefits of Virtual Machines
1. Trying Linux distributions without dual booting
With the help of virtual machines you can try many operating systems without dual booting. You do not have to create any partition on the hard disk. This will not cause any harm to your host operating system.
2. Running Windows software on Linux or running Windows software on Mac
You are using a Linux or Mac operating system, but if you want to use some software that runs only on Windows, then you can run that software by installing Windows in a virtual machine.
3. Running software which only runs on an older version of Windows/Linux
If you want to run an old software that runs on an old Windows or an older Linux distribution, you can install that version of Windows or Linux in a virtual machine and run that software inside it.
4. Getting dedicated server features with the help of virtual servers at low cost
The advantage of a dedicated server is that we can install the software in it according to our wish. We have complete control over its configuration. But they are very expensive. If several virtual machines are installed in a dedicated server, then its resources can be shared among the virtual machines. But each virtual server will have its own separate operating system. For example, you can create multiple virtual machines of 4-4 GB RAM in a dedicated server of 32 GB RAM. That’s why hosting costs in virtual servers are less. But we also get complete control over the operating system.
5. Virtual machines can be easily recovered from failures
Backing up virtual machines is extremely easy because all you have to do is copy the virtual hard drive file. Various virtual machine software also provide the facility to create snapshots. Due to which, the machine can be brought back to the previous state in case of any failure. For example, if you want to install a software update, if you take a snapshot of the virtual machine before installing updates, then if somethings goes wrong during software update, then you can restore virtual machine to snapshot.
3 best virtual machine software
1. Virtual Box
Virtual Box is available for all major operating systems (Windows, Mac and Linux). In the virtual box, you can run all operating systems except ARM based operating systems. You can run all Linux distributions, all versions of Windows and Mac OS in virtual boxes.
QEMU is the best choice for running ARM based operating systems. The full form of QEMU is Quick Emulator. But this is actually a hypervisor. Through QEMU you can run Raspbian OS, Android etc. You can install QEMU from the command line.
sudo apt install qemu qemu-kvm libvirt-bin
Running QEMU on the command line can be difficult for newbies. The GUI apps are also available QEMU.
3. VMware Workstation Player
VMware is a market leader in virtualization. It has thousands of corporate customers. Fortunately its free version is also available. It supports over 200 operating systems with all Linux distributions. However, it cannot run an ARM based operating system.
Download: VMware Workstation Player