eli5: What is a virtual machine?

109 views

eli5: What is a virtual machine?

In: 0

6 Answers

Anonymous 0 Comments

It’s a computer like any other but instead of having its own physical parts it borrows/uses the ones from the “host” computer (the one where the virtual machine is running). So instead of having a physical hard drive to store information or a CPU to process it a portion of the physical parts is allocated to the host and a portion goes to the virtual machine. The benefit is that you can “destroy” the virtual machine with viruses, delete it and create another one without damaging your own computer. In a nutshell it’s a computer but physical parts are virtual. The only downside is that if your computer (host) isn’t very powerful the virtual machine is likely to be laggy as the RAM (working memory) is shared betwen your computer and the vm so you can’t run that many programs in parallel.

Anonymous 0 Comments

The simplest way to put it is to relate it to old retro game emulation if you are familiar. You emulate/virtualize a system within a physical system. There are tons of reasons and advantages as well as cons to utilizing such a thing that imo are a lot for an ELI5.

Examples would be-

to provide an environment that may not be possible to do physically. Much like the reason we emulate old gaming hardware since it’s increasingly more difficult and costly to obtain the original hardware.

Or to provide several isolated OS environments to clients using a single machine rather than dedicated hardware for each user.

Scale servers on the fly and isolate any malicious content.

And the list can really just go on.

VM tech is extremely prevalent right now. I urge anyone getting into this type of technology to get familiar with it. I was stubborn about it for ages, but this is where we are at.

Anonymous 0 Comments

It’s a computer playing make-believe.

The virtual machine behaves as if it were a real computer. But whenever it’s software goes to interact with the make-believe hardware, the host intervenes. It takes the commands to the make-believe hardware, translates it, then sends it to the actual hardware to run.

And the opposite. When the actual hardware sends back data, the host translates it back, pretends it’s the make-believe hardware, and gives the data to the virtual machine.

Anonymous 0 Comments

Just like there are different ways to set up a restaurant, there are different ways to set up a computer. Some might have a big kitchen. Some have a small one. Some have hibachi grills.

If you take a worker trained work in one restaurants’ layout and tell him to do exactly what he normally does at a different restaurant, there are going to be problems. When he looks for plates where he normally finds them, he may find pots and pans. Sure a human could probably figure it out, but computer’s are designed to follow instructions exactly. If they don’t find what the need where they expect it, they just crash.

Building upon this analogy, a virtual machine is a bit like a restaurant with a second smaller kitchen connected to the first. This allows the restaurant to fill orders it’s first kitchen can’t normally fulfill because it isn’t set up to do so.

Anonymous 0 Comments

A virtual machine is a way to have many operating systems on your computer.

A virtual machine works by giving your second OS limited access to your computer’s resources.

Effectively, you can use virtual machines to install Linux on a Windows computer without replacing Windows. Or Windows on Linux or even Mac on Linux and so on.

Anonymous 0 Comments

We have a server room full of computers at work.

Back in the bad old days, each physical box had one job. One piece of hardware was a database server, one was a web server, one was an authentication server, one handled user logins, etc etc. Dozens of machines – some performing multiple jobs, but still tied to their specific hardware.

As a result, if one box went down, one *entire function* went down.

A drive fails or a power supply gives out?

You are *fucked*, matey. No database for you.

One of the biggest problems was granularity – if you had a dozen physical boxes with 16GB of RAM each, then each one got 16GB, no more, no less. If you had a server that only needed 2GB, then that’s 14GB completely wasted and unused. Another server could really use 24GB? Sucks to be you I guess.

The same with disk space and CPU capacity. A whole stack of little buckets of resources, and each server got one bucket, whether that was too much or too little, you just went with what you *thought* you’d probably need, then you had to live with it.

And backing up / restoring machines was a pain in the ass – if a disk died and you had to restore from backups, it meant going in there, plugging in a monitor and keyboard, getting the install disks and rebuilding the operating system from scratch before importing the data, or having to do horrible things fishing around inside to copy drives and plug them back in…

**Then along came virtual machines, and everything changed.**

Now we have a small handful of extremely grunty physical machines with a shitload of RAM and storage each – and each of our servers is just a *file* on those machines, sharing their resources between them.

You want to give the webserver more RAM? A bigger disk? Click. Done. All the servers get whatever share they need of one massive pool of resources, and take as much or as little as you care to give them.

One of the physical servers goes down? The VMs *automatically* get shunted onto the other physical machines. In some cases without even dropping a network packet. A drive dies? No big deal, everything’s highly redundant and the remaining drives can pick up the slack, we just take that drive out of service and put in a warranty call. When the replacement arrives, we just stick it back in and re-enable it; the capacity of the storage pool goes back up again.

You want to restore a machine from backups? Snapshot it so you can test out some changes, then roll back if it doesn’t work? That’s a few clicks in a web browser, from your desk. You want to build a new server? Again, all done in software.

It’s computers-as-a-service, it’s commodified all our computing resources as a whole and it made our lives indescribably better.