Benefits & Practicality of Virtual Machines [closed]

I have been living under a rock for the past 5 - 8 years, and am just now getting up to speed with virtualization, virtual machines and platforms like VMware or VirtualBox. I think I am starting to get them, but there are two concepts about VMs that I'm just choking on for some reason; one has to do with their intrinsic benefit to the enterprise, and the other has to do with their practicality when being used.

So I understand that you can have multiple VMs running on the same physical machine, all doing their own "thing" as if they were separate machines. So let's say I want to make a nice little virtual network of servers in my home office so I can have a big sandbox to play inside of for all my projects. I set up 2 physical machines as servers, and on each of them I have, say, 4 virtual machines running (1 might be an app server, another might be a RDBMS, another might be a message broker, etc.).

  1. Besides saving me money (as I only have to provide 2 physical machines instead of buying 8 servers), what instrinsic benefit/purpose do these VMs serve here? I don't care how clever virtual machines are, if my computer only has 8GB of RAM, and I have 4 VMs running on it, those VMs only get 8GB of RAM to share between them. Putting 4 VMs on my server doesn't endow it with 4 times that amount of RAM! So, as far as I see it, VMs save you money on hardware, but just end up bogging down that hardware as you have multiple machines competing over the same pool of resources. What am I missing here?

  2. Can VMs communicate with each other over your network using high-level protocols like TCP/IP, HTTP, FTP, etc.? Otherwise, it just doesn't make sense to implement all these VMs if you have to feed them separate and independent chunks of data/requests to process.


(1) Besides saving me money (as I only have to provide 2 physical machines instead of buying 8 servers), what instrinsic benefit/purpose do these VMs serve here?

Yes, they do share resources. Virtual Machines are usually allocated a specific amount of memory on startup. So that 8GB could be assigned in 2GB chunks each among 3 machines. (With the last 2GB left so the host OS has something to use.)

Other benefits include save states. Many if not all VMMs allow you to clone a virtual machine, even when "running". So you can clone the state immediately after bootup and should it crash, you can restore it, instead of booting off the crashed system. This can also be used in some cases to save bootup time, as the virtual machine can be restored to the running state.

Another advantage is the ability to swap running VMs between physical machines, allowing 100% uptime even if the host system needs to be taken offline for some reason.

(2) Can VMs communicate with each other over your network using high-level protocols like TCP/IP, HTTP, FTP, etc.?

This depends on the VMM you use, and its particular implementation of network emulation. But in general, yes. VirtualBox for example supports emulation of network cards in many ways, including pass-through or NAT.


One benefit of VMs is being able to run legacy operating systems on the latest hardware. Older operating systems (or older versions) may not have drivers available for current hardware. Virtualisation presents the guest OS with virtualised NICs, disk-controllers etc that the guest supports, regardless of the actual hardware.

Another is being able to test new operating systems or application releases separately from live without having to buy as much staging and deployment hardware.

Many of the other benefits boil down to flexibility. Virtual hardware can be resized at will to suit specific tasks whilst preserving the isolation from other applications that you previously got by having separate hardware - if your web database server crashes, it doesn't affect your accounting system.

All the VM systems I know of support networking in the hosted operating systems, there are several modes but for example, the guests can be allocated separate IP addresses in the same range as the host and appear no different to separate physical computers.