A virtual machine is a piece of software that emulates a real operating system. These days, there are many reasons why you might want to test out your website, app, or other digital product on several operating systems and using different browsers etc. While you could buy numerous products including dozens of mobile phones and several computers with different operating systems to test out your digital product, you can actually emulate many of them within just 1 computer. Popular virtual machines include Virtualbox, QEMU (my favorite), and others. This article will discuss 5 reasons to use a virtual machine.
1. Having the Ability To Test Out New Ideas Or Install Potentially Buggy Software Without Screwing Up Your Base System
There have been a few times where I installed buggy software on my base system, or times where the configuration was complicated, and my base system ended up getting messed up.
I prefer my base system to be safe and stable. But if I want to test out bleeding edge software or potentially buggy software, or various new ideas I have, I can test out them out in a virtual machine without worrying about messing up my own system. This can be especially helpful for really tech savvy people or system administrators who can’t afford to make major mistakes on their systems, but still need various things tested.
2. When You Have Very Few Reasons To Have Multiple Partitions With Different Operating Systems On Your Computer
While it isn’t very complicated to create two or more partitions on your computer with different operating systems, there may be a few disadvantages to doing this.
If, for example, your main system is Linux, but you need to use Windows to run a few pieces Windows software, but and only use those pieces of software very rarely, then it might not be worth creating a separate partition for Windows.
Once in a while I need to use Word 2007 for a file which was originally created in Word 2007, and I can’t afford for the formatting to be off. But, I usually can’t justify creating a separate partition just for using Word. I could use a virtual machine installed with Windows and install Office 2007 in it, or use office.com which can do most of what I want in a Word document.
Another reason not to use multiple partitions could be that if encryption is done well enough, you won’t be able to read the data on other partitions from any one partition, so each partition would would not be able to work with your entire hard drive. Each operating system on its corresponding partition then could only work with the amount of space that you explicitly gave its partition. If you just had 1 operating system installed on your computer, you could basically access all of your hard drive.
It may end up being the case that a specific virtual machine can’t emulate whatever operating system or use a piece of software well enough, that the virtual machine is too slow, or fully emulating the operating system with all the features that you need is too complicated, but at least you can test out some native software on the emulated operating system.
3. Having The Ability To Easily Delete And Recreate New Virtual Machines
With a virtual machine software like QEMU, you can create as many virtual machines as you want; you are just limited by your hard drive space. So, you could have a virtual machine image of Ubuntu, another of Debian, another of Fedora, one of Windows XP, one of Windows 7, and so on.
Likewise, deleting or destroying a virtual machine is literally as easy as just deleting the virtual machine’s image file. You could do this in 5 seconds or less probably. But, if you wanted to delete 1 or more partitions on your computer, it will probably take much longer.
4. Having The Ability To Test Out Software In The Environment(s) They Were Made For
Wine is a great software that can run many different Windows programs in a Linux or Unix environment, but by no means can it run all Windows software. There many many pieces of software which either doesn’t run at all or doesn’t run well in Linux using Wine.
While there are some pieces of software which I was able to (mostly) successfully emulate using Wine, such as Age of Empires II, there were also many other pieces of software which I couldn’t get to run at all in Wine.
But, if you use a virtual machine with Windows installed on it, it should be the case the the Windows software that you want to test works (almost) just as well as if you were running the software on a separate partition with Windows installed on it. This is because the software is being run in its native environment, albeit in a virtual environment.
5. Save Yourself Money
Using a virtual machine allows you to emulate an operating system without having to buy additional hardware (though Apple products may be an exception to this).
If you use Google’s Android Studio, which has an Android emulator included, you can test out different versions of Android on different virtual devices. You could test out what your app or website would look like in different versions of Android on a Google Nexus phone. Or you could test what the app or website would look like in a Samsung Galaxy S6 and many other mobile phones, tablets, and devices which support Android.
The same can be said of Linux and Windows. You wouldn’t necessarily need to buy a computer that only runs Windows, one that only runs Ubuntu, and one that only runs Debian. You would likely be able to run all of those operating on your base system using virtual machines.
If you want an example tutorial of how to actually setup a virtual machine, you can read our article here about how to run Debian in a QEMU KVM virtual machine.
Did you like this article? Do you have anything to add? Let’s discuss it in the comments below.