Experimentation is part of the human nature. Experimenting with the operating system, though, can cost us time and money. With a virtual machine, we can try shady applications and wreck the virtual OS, with no consequences whatsoever. Oh, and virtual machines also power a significant part of the Internet.
Unblock any international website, browse anonymously, and download movies and Mp3 with complete safety with CyberGhost, just for $2.75 per month:
What is a Virtual Machine
A virtual machine is the emulation of a computer system within our physical PC. It functions exactly as a physical PC would. It powers up, boots, shuts down, and reboots. We can hook up peripheral devices, from USB Flash drives to printers and scanners. The virtual machine even has a BIOS or UEFI of its own, and it needs drivers for the emulated GPU and soundcard.
As with any PC, we must install an operating system to use a virtual machine. If it is a Windows version, we need to activate it with a legitimate product key. If there is a problem, the virtual machine can and will crash, and even produce a blue screen in Windows. We can also infect it with malware, by mistake or on purpose.
The use of a virtual machine can unlock exciting opportunities within our computer. From testing alternative operating systems and less than trustworthy apps to extreme multitasking, our imagination is the limit. And the resources of our physical PC, of course.
How are virtual machines used
Even if you've never heard of a virtual machine, you've used at least one, without realizing it. In fact, you are using a virtual machine this moment, just by reading these lines. More on that later.
The most common use of virtual machines is server virtualization.
Server virtualization
Have you heard of VPS hosting? VPS stands for "Virtual Private Server", which is a fancier name for a "virtual machine".
It works like this: the web hosting company uses a powerful physical server. It could have eight Intel Xeon processors, fifteen cores each, 12TB of RAM. Or even more of everything.
When we order a VPS package, the company creates a virtual machine for us within this enormous server. Each VPS has an operating system - usually Linux - with a complete web server. And it runs on the CPU cores and RAM we are paying for.
Many of the websites that you visit are on a VPS, including the one you are reading now.
Apart from web servers, virtualization works with other types of server: mail servers, file servers, domain controllers, etc. Virtualization allows for better usage of the hardware resources. Separate servers would have separate mainboards, cooling systems, power supply units, physical enclosures. Having a single large server with virtualization is cost and space efficient.
Of course, this has the drawback of reduced redundancy. If the server's motherboard fails, all the separate virtual machines go down. It's an all-eggs-in-one-basket scenario.
This is great for the corporate world, but none of us has or needs a $50,000 server at home. And we definitely don't need to run two dozen virtual servers all at once. So, what's the use of a virtual machine at home?
Virtualization at home - the greatest testing environment
Let's say we've never tried a Linux distribution, and we want to see what the fuss is all about. One option is to dual-boot Windows and Linux on our PC.
Dual boot is a commitment, though. We need to reboot to change operating systems. And if we don't like Linux, we need to jump through a few hoops to remove it.
With a virtual machine, we can have a full Linux installation within Windows. Changing the operating system is as simple as switching between open windows. If we get bored with it, we just delete the virtual machine, and Linux is gone. Just like that.
It works the other way around too. We can have a full Windows installation running within our Linux distribution. This way, if we need a Windows-only application, we can run it on the virtual machine. Or we can operate the scanner for which there are no Linux drivers.
Even within the same family of operating systems, we can use a virtual machine. Microsoft itself had added the "Windows XP Mode" to the professional Windows 7 versions. It was nothing more than a virtualization platform specialized for XP. It's always useful to have access to previous OS, in case of incompatible hardware and software.
A virtual machine is also great for testing unstable and experimental operating systems. It is the best way to install e.g. Windows 10 Technical Preview, or the alpha of the next Ubuntu Version. This way, we can give it a try, without having to put up with the instability.
Also, it's important to remember that a virtual environment is separate from our primary operating system. If we try a shady program, and it infects the virtual system, the malware will not spread.
Most of the virtual machine applications can also create "snapshots" with the exact condition of the operating system. No matter how much we wreck the virtual OS, we just restore an earlier snapshot. We will have a 100% functional virtual system in no time flat.
The fact is, if you get used to working with virtual machines, it's hard to do without them.
Can we play games on a virtual machine?
Virtual machines aren't any good for gaming. Not with anything more exciting than browser and flash games.
The primary inhibiting factor is that a virtual machine doesn't use the system's GPU. Instead, it creates a virtual GPU to draw on-screen.
You see, a virtual machine shares the system's processor with the primary OS. But it can't do the same with the GPU. There is no way, so far, to split a GPU's horsepower between the physical and virtual PC.
For a virtual machine to use the system's GPU, it needs a "VGA passthrough". A passthrough would give the virtual system complete control over the GPU. But then the primary system can't use the GPU.
There is a way to do a VGA passthrough with some specific virtual machines (such as QEMU or Xen). But we need a Linux host, two GPUs installed, and the knowledge of how to tinker with the Linux Kernel. As you imagine, the procedure it is more than a bit complicated.
Can any PC run a virtual machine?
A virtual machine borrows CPU power and RAM from the physical system. Both the virtual OS and the main OS run together. That means we must have enough CPU and RAM to go around.
Of course, we can choose how many CPU cores and how much RAM the virtual machine will use.
But it all depends on the virtual operating system we plan to install. And the applications we intend to run.
That means that if we have a PC with 2GB of RAM, we theoretically can run a 32-bit Windows 8 virtual machine, which requires 1GB RAM. But not 64-bit Windows. We can't allocate all the system's RAM to the virtual machine.
For a decent virtual experience, we would recommend at least a dual-core CPU and 4GB RAM. With an i7 and 16GB RAM, we can run multiple virtual machines simultaneously.
We also need a CPU and motherboard that support IOMMU (input/output/memory management unit). It is what allows the system to split up the CPU power and RAM between the main and the virtual OS.
For Intel CPUs, we will find IOMMU as VT-d. AMD refers to it as AMD-V.
To be continued: How to create a virtual machine
There are many platforms to create virtual machines. The two best known for home use are VirtualBox and VMware. VirtualBox is available for free, and mostly open source. VMware has the free VMware Player, and some advanced paid solutions.
In following posts, we will see in detail how to create a virtual machine in Windows and Linux, and even how to install Mac OS X on a Windows/Linux virtual machine.
Support PCsteps
Do you want to support PCsteps, so we can post high quality articles throughout the week?
You can like our Facebook page, share this post with your friends, and select our affiliate links for your purchases on Amazon.com or Newegg.
If you prefer your purchases from China, we are affiliated with the largest international e-shops:
Μιλτιάδης Σαχινίδης says
Nice explanation of what a virtual machine is, we wait to see the steps of creation and use of the virtual machine.
Angelos Kyritsis says
Thank you, Miltiades. Good things come to those who wait ;-)
Good luck on the new effort to support the international version of the pcsteps :)
I am sure that you will offer state-of-the art advice to technologically illitarate people like me!
This is a very nice and clear article. Look forward for the next part (How to create a virtual machine).
For months, I have been thinking (but I hesitate) to start using internet banking services.
If I build a virtual machine on my computer, with only purpose to use it for e-banking would it be the safest solution?
A virtual machine will not help if the main system has a keylogger. The safest solution is a Linux boot USB. You can check this Greek guide on the subject: https://www.pcsteps.gr/49050-e-banking-%CE%BC%CE%B5-%CE%B1%CF%83%CF%86%CE%AC%CE%BB%CE%B5%CE%B9%CE%B1-linux-mint-live-usb-%CE%BC%CE%B5-persistence/
A Linux boot USB flash driver is safe even in "extreme conditions", for example, I can use it without any concerns with a laptop which has only pirate software, the firewall off, without any antivirus, with a screen bliking every second from the viruses and the malware? ( a typical laptop of a teenage boy :P )
Cause I was discussig it with one of my colleagues and he claimed that even then, usig the Linux flash drive would be safe.
Yes, the linux flash doesn't care what you have installed in Windows. You could have every malware known to man, and it wouldn't make a difference.
Don't forget that Linux is running from the flash drive. You could take the Windows hard drive off, and it wouldn't make a difference.