{"id":64848,"date":"2022-06-28T13:00:00","date_gmt":"2022-06-28T17:00:00","guid":{"rendered":"https:\/\/jumpcloud.com\/?p=64848"},"modified":"2023-01-06T12:49:57","modified_gmt":"2023-01-06T17:49:57","slug":"what-is-a-virtual-machine","status":"publish","type":"post","link":"https:\/\/jumpcloud.com\/blog\/what-is-a-virtual-machine","title":{"rendered":"What is a Virtual Machine (VM)?"},"content":{"rendered":"\n

While the IT sector\u2019s focus on virtualization technologies has significantly increased over the past couple of years, the concept has been with us for much longer. As early as the 1960s, IBM was already using virtualization to develop robust time-sharing applications. In recent times, however, organizations are increasingly using the technology to enhance IT agility while creating significant cost savings. <\/p>\n\n\n\n

Increased performance, greater workload mobility, and automated operations are some of the benefits that virtual machines (VMs) provide, making IT simpler to manage and less costly to operate. In this post, we\u2019ll explore what a VM is, how VMs work, their advantages and disadvantages, and other terminology associated with virtualization.<\/p>\n\n\n\n

Definition of a Virtual Machine<\/h2>\n\n\n\n

A VM is a computer file that behaves like an actual physical personal computer (PC). It has its own CPU, memory, storage, and network interface card (NIC) \u2014 created from a physical server \u2014 that allows it to run its own operating system (OS) and application environment separate from the dedicated hardware.<\/p>\n\n\n\n

While the parts (CPU, memory, storage, and NICs) that make up your PC are physical and tangible, VMs are software-defined computers or virtualized computers within physical hosts, existing only as code. Since VMs are abstracted from the rest of dedicated hardware, many of them can exist on a single piece of hardware. You can also move them easily between host servers depending on demand and efficiently use the dedicated hardware\u2019s resources. <\/p>\n\n\n\n

VMs also allow multiple different OSes to run simultaneously on a single hardware system. For example, you can run Windows, Linux, and macOS on the same PC, and each OS runs precisely as it would on the host hardware. As such, the end-user experience emulated within a VM is nearly identical to that you\u2019d expect on a physical machine.<\/p>\n\n\n\n

How Does a Virtual Machine Work?<\/h2>\n\n\n\n

VMs are created through a process called virtualization<\/a>, which uses software \u2014 also known as a hypervisor (explained next) \u2014 to separate the physical hardware resources from the virtual environment. Think of a virtual environment as the IT services that need to use the physical hardware\u2019s resources. <\/p>\n\n\n\n

You can install the hypervisor on top of an OS or directly onto the hardware. When installed, the hypervisor takes charge of the computing resources and divides them up to be used in multiple VMs.<\/p>\n\n\n\n

Because the VMs operate much like physical computers, you can run multiple OSes on a single machine (also called the host). During these operations, the hypervisor allocates hardware resources to each VM on an as-needed basis. The flexible resource allocation and mobility of the VMs simplify IT operations, making them efficient and cost-effective. These are also the reasons that have made virtualization the foundation for cloud computing.<\/p>\n\n\n\n

To illustrate further how virtualization enhances efficiency and cost-effectiveness, consider the following scenario:<\/p>\n\n\n\n

A company has three servers: server A (supports email), server B (supports web traffic), and server C (supports line-of-business applications). Because the company only uses each server for a dedicated purpose, it can\u2019t optimize its computing capacity. For example, although the company pays 100% of the servers\u2019 maintenance costs, it may only be utilizing a third of its capacities.<\/p>\n\n\n\n

With virtualization, the company could split one of the three servers into three VMs and reduce maintenance costs by 66%. For example, it could split server A into three VMs to handle email, web traffic, and line-of-business applications. The company could then retire servers B and C to save on maintenance costs or repurpose them for other IT services.<\/p>\n\n\n\n

The following diagram shows a side-by-side comparison between traditional and virtualized architecture as described in the scenario above.<\/p>\n\n\n\n

\"Virtualized<\/figure>\n\n\n\n

What Is a Hypervisor?<\/h2>\n\n\n\n

A hypervisor is an application that isolates virtual environments from the underlying physical hardware. This isolation allows the underlying hardware resources to operate multiple VMs as guests, enabling them to share the system\u2019s computing resources effectively. There are two principal types of hypervisors:<\/p>\n\n\n\n

Type 1 hypervisors<\/h3>\n\n\n\n

A type 1 hypervisor \u2014 also called a bare-metal hypervisor \u2014 runs directly on the underlying server. Type 1 hypervisors operate much like a typical OS running VMs, albeit with minimal functionalities. These hypervisors are highly efficient when used in server environments because they have direct access to the host\u2019s resources. Examples of type 1 hypervisors include Microsoft Hyper-V, VMware ESXi, and Kernel-based Virtual Machine (KVM).<\/p>\n\n\n\n

Type 2 hypervisors<\/h3>\n\n\n\n

Type 2 hypervisors \u2014 also called hosted hypervisors \u2014 don\u2019t run directly atop the underlying server. Instead, they run as applications in an OS. Type 2 hypervisors are suitable for individual users that want to run multiple OSes on their PCs. Examples of such hypervisors include VirtualBox, Parallels Desktop for Mac, and VMware Workstation Player.<\/p>\n\n\n\n

Advantages of Virtual Machines<\/h2>\n\n\n\n

VMs have several benefits. Below are a few of them:<\/p>\n\n\n\n