@brent I've been following this thread carefully. @WetGeek has done an excellent job of describing virtual machines.
I'm going to contribute a schematic and a bit of additional information about VM's to help you conceptualize how VM's work, because a few of the comments you've made suggest to me that additional information might be helpful.
First the diagram:
Now the additional information:
(1) HYPERVISOR
VM's create a software-based version of a computer, with dedicated CPU resources, memory and storage. VM's are created by a "Hypervisor", a software layer that allows the VM to interact with the host computer's hardware.
(2) HYPERVISOR TYPES
Two types of Hypervisors exists, commonly referred to as "Type 1" and "Type 2".
Type 1 hypervisors (or direct hypervisors) directly interface with the host computer's hardware, and are used in almost all enterprise VM hosting systems (Amazon, Google, Microsoft and so on). While the host computer's OS is needed to run the computer on which the hypervisor runs, the host computer's OS is not directly involved with the hypervisor or the way in which VM's created by the hypervisor interact with the host computer's hardware. Instead, the hypervisor directly interfaces with the host computer's hardware.
Type 2 hypervisors (or hosted hypervisors) run on the host computer's operating system, interface with the host computer's hardware indirectly "through" the host computer's OS, and are used in consumer and other smaller installations. In this thread, and in every other VM thread I've read on this forum, the discussion is focused on Type 2 hypervisors like VirtualBox, VMWare and Gnome Boxes.
I mention Type 1 hypervisors only because if you start looking around the web for information (and I know you will), you will find resources related to both types, and it is easy to get the two confused. Be aware of Type 1, but focus on Type 2.
The diagram shows the difference (in simple form) between Type 1 and Type 2. In Type 2 installations, the bare metal host OS is directly involved with the way the hypervisor runs and the VM's interface with the host computer's hardware.
For example, when I set up a Gnome Boxes VM, the Gnome Boxes hypervisor connects the VM OS to the internet through a "virtual ethernet" connection created between the VM and the bare metal host OS, which in turn connects to the internet through the wifi adapter used by the bare metal host OS. The situation is similar for almost all hardware interactions between the VM and the host computer's hardware. In very simple terms, the "whole works" in a VM is virtual.
I think that the best way to think about Type 2 hypervisors is the explanation that @WetGeek gave us. The hypervisor (VirtualBox, VMWare, Gnome Boxes) is a program/application running on the bare metal OS (the "Host OS"), which in turn creates and runs other OS's (in each case, a "Guest OS") running independently of the bare metal host OS.
Accordingly, if you think it through:
(1) The Guest OS running in a VM is isolated from the bare metal Host OS, and the Host OS will not be screwed up no matter what you do with the Guest OS.
(2) If the bare metal Host OS crashes and burns, the hypervisor will also crash and burn, as well all the Guest OS VM's created by the hypervisor.
(3) If the hypervisor crashes and burns but the Host OS does not, the Host OS will be unaffected but the Guest
OS VM's created by the hypervisor will almost certainly crash and burn.
(4) Because the Guest OS running in the VM does not directly interface with the host computer's hardware, VM's should not be used to evaluate whether
Be aware, as well, as others have pointed out, the hypervisor "borrows" the host computer's hardware resources -- CPU/GPU cycles, RAM, disk space -- to create and run a Guest OS VM. If the Guest OS requirements are 4 GB RAM and 30GB disk space, then the host computer will be running on whatever it has minus whatever is "borrowed" for the Guest OS (e.g. if the host computer has 8 GB RAM and you run a Guest OS with 4 GB RAM, the host computer will effectively be running on 4 GB).
Usually that's okay when you are running Linux VM's on a Linus Host OS (because both run fine on 4 GB), but keep in mind that the Host OS doesn't stop running when you run a VM, so your computer will need sufficient resources to accommodate both. What is true of RAM is also true of disk space and CPU/GPU. So keep resources in mind.