Have you ever used a virtual machine?

No readers like this yet.
No readers like this yet.
Rocks stacked

Tony Smith via Flickr (CC BY 2.0)

Most people who use computers understand at least the basics of how they work. There's the hardware, that actually does the computing; an operating system, that sits on top and serves as an interface between the computer hardware and the programs run by users, and then the actual applications we use which sit on top of that.

Sometimes, though, it's a little more complex than that simple abstraction.

You can also run an operating system inside of a special program called a virtual machine. A virtual machine essentially emulates the functions normally provided by hardware, such that you can essentially run an entire computer system (or multiple computer systems) on top of your existing operating system. For the end user, this might let you try out a new operating system easily without giving up your old one (or worrying about accidentally messing something up by trying to set your computer up to dual-boot). Or it might let you finally make the switch to an open source operating system like Linux by knowing you can still access a must-have application that's Windows- or Mac-only in a virtual environment.

Of course, for people who work in information technology fields, this is old news.

The entire cloud computing paradigm depends on virtual machines, and many if not most of the websites and online applications you use every day are running inside of a virtual machine. Cloud computing platforms like OpenStack are designed to make it easy to spin up new virtual machines, allocate virtual machines between many owners, and handle the virtual connections between them, all while abstracting the hardware beneath from the operating systems on top. This brings many advantages, from simplifying management, to making best use of available resources, to ensuring that workloads can move easily from one location to another.

Developers regularly use virtual machines as well, for testing out applications in environments that more closely match the machine where the application will actually be deployed in production. Tools like Vagrant make it easy to create virtual machine environments which closely match actual production environments, and the code which defines the environment can be backed up and managed under version control to make sure they stay consistent.

So how about you? Are virtual machines old news to you, something you use from time to time or even every day in your job? Or have you even ever tried one out? Take our poll, and let us know in the comment below.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.
576 votes tallied
Yes, to run other operating systems on my local machine.
45% (257 votes)
Yes, to run things in the cloud.
2% (10 votes)
Yes, to run programs in an isolated environment.
4% (23 votes)
Yes, for many different reasons.
40% (231 votes)
No, why would I do that?
1% (5 votes)
No, but I'm interested in trying it out.
9% (50 votes)

Results

Comments

11 Comments

I've experimented with Vagrant so I'm a newbie there. I've used VMware ESX and
Fusion. I also like Virtualbox and have used it with students in a lab situation.

I use virtual machines every day for a number of reasons.

I do a lot of scripting, primarily of scripts designed to do post-installation configuration of computers using multiple Linux distributions. So testing these scripts after making changes is essential. Using multiple VMs to perform a new CentOS or Fedora installation, and then install the RPM in which the script is delivered and then to test the script is essential.

When I had an iPhone, I used a WinXP VM to sync my iPhone and install new apps. But my church still uses a church accounting system that runs only in Windows, so I have set that up to run in a VM on a Fedora host.

I have one Linux game, Railroad Tycoon, that is no longer supported on any current versions of Fedora, CentOS or Red Hat due to library incompatibilities.I run a VM with Fedora Core 5 so I can still play that game. (RIP Loki)

I always - well almost - test new releases of Fedora and CentOS in VMs before I install them on production hardware. I am now testing Mint to determine whether I want to use it on a couple desktops.

As a writer, it is sometimes useful to know how certain distro releases vary from others, and when those changes were introduced. So I have a large number of old VMs for CentOS and Fedora that I keep on hand in order to perform that type of research.

There are lots of reasons to use VMs. These are just a few.

Wow David, you are the VM ninja! I loved Fedora Core 4 & 5. I've virtuallized Fedora, Centos, and Free BSD to test them out. I've also used Virtualbox to with Turnkey Linux images to help students learn how to setup Moodle, Drupal and Wordpress. I think Windows runs best when it's virtualized.

First VM I ever used would have been IBM's VM/370 back in 1977.

I crashed the COBOL compiler...

Firs tried out VMware almost 20 years ago when a student of mine told me about it. For many years the only time I ever ran Windows was inside a VMWare VM at tax time, but now I let my accountant do the work...

I use a VM daily to run LXLE linux for doing VPN stuff and accessing the BBC iPlayer from Canada, thus still using the "proper" nameservers for my main work.

I use them primarily for device driver coding. I can boot into an isolated environment, load the manufacturers closed source drivers, widows out Linux, and sniff the I2C bus to see what they are actually doing :) works great.

UDL

Yes, I use them all of the time at work and home. For home I have one for my daily email and web use (e.g. banks, etc), another for general surfing and social media (youtube and face boo) and a third for my business. I also use them for testing firewalls, etc. At work I use one as my Linux desktop inside my windoze desktop.

At work we use VMware for our development environment including a copy of the FreeBSD web server.

I would love to use them at home but I am not sure any of my systems are powerful enough to run more than 1 instance (which kinda defeats the purpose some). If I get a CPU with enough "oomph" then I would love to consolidate my servers onto one single box and carve out VMs for each use.

I've used Qemu with KVM for custom Android builds http://psachin.github.io/blog/qemu

In my home I use Virtualbox over Debian as host, running VM with Whonix and Kali at the same time to 'test' several others VM as W7 and WindowsXP. I use a VM with LXLE for development, also and old copy of WindowsXP sp3 for a particular development which still uses MS Access connection, and a clean and always updated VM with W7 installation just as bridge to my VPN work to use the remote desktop feature.
Also I use Xen over Open Suse host and 3 VM with Open Suse for my Salt Stack funny-local-testing environment.
At work I have w7 as host and I use a VM with Debian as an development environment using Virtualbox.

There was a time when I really needed to run Windows from home, where everything is Linux. That's when I first used VirtualBox for the purpose. After I nuked the Windows on my PC to install Linux, I had a Win7 installation disk. Although the EULA that came with it tells me I have the right to install it as a VM on the original computer, I still get "This Windows is not genuine" messages, which I ignore.
What I am left with now as the more or less essential uses for the VM are doing my taxes, and to remote into my Windows desktop at work, which is rarely necessary. It's a little tricky to get data from my VM to the Fedora host (I don't like only having just a single copy of my tax info), but what seems to be the most efficient is to SSH/SFTP from the VM to Fedora.

A virtual machine does not always just emulate hardware. Indeed they almost always emulate some combination of hardware and library or kernel software that the runtime they support is built to rely on. It is a bit of a misnomer that those who work in OS virtualization have adopted this term and presented it in the former more narrowed sense. When you consider the term proper then you'll note that every Java programmer has used a virtual machine. That is what they employ whenever they compile or run their code using the javac or java programs. And yes the analogy is reasonable: the Java Virtual Machine takes over responsibilty for tasks normally performed by an operating system such as managing memory, scheduling execution and even JIT compiling code to optimize use of the available processors and memory system. It uses some of the underlying OS capabilities to achieve some of those tasks but also bypasses some of them in certain cases. This wider application of virtualization has a long and interesting history, especially if you look back to the Lisp and Smalltalk (or even Forth) machines of the 1980s which provided a complete, self-contained language runtime environment that implemented everything right down to the bare metal.