Virtual machine
A virtual machine (VM) is a software-based “digital twin” of a real computer that runs inside a physical device but has its own isolated virtual resources (processor, memory, disk) and an operating system.
Contents
- What is a virtual machine in simple words
- How a virtual machine works
- Main types of hypervisors
- What a virtual machine consists of
- Why virtual machines are needed
- 1. Running different operating systems
- 2. Safe experiments
- 3. Savings for business
- 4. Cloud technologies
- 5. Testing and development
- Popular programs for creating VMs
- Oracle VM VirtualBox
- VMware Workstation Pro
- Microsoft Hyper-V
- Parallels Desktop
- Virtual machine security
What is a virtual machine in simple words
A virtual machine (VM) is a program that works as a fully fledged separate computer. It creates a virtual copy of the “hardware” (processor, memory, disk), allowing you to run another operating system inside your main device (for example, Linux on Windows or vice versa).
Imagine that you have one physical computer, and several more “virtual” computers work inside it. Each of them has its own settings, files and even its own operating system, but all of them use the resources of one real device.
Virtual machines have become the foundation of cloud technologies. According to analytical agencies, more than 90% of all servers in data centers today are virtual. This allows companies to save billions of dollars on equipment and electricity.
In Russia, virtualization is actively used in government and corporate IT systems. Read about how virtual machines are used in cloud solutions in the article Cloud security.
How a virtual machine works
At the heart of a virtual machine is a hypervisor — a special program that distributes the computing resources of a physical computer (the host) between one or several virtual environments (guest systems).
Main types of hypervisors
- Type 1 hypervisor (Bare-Metal): Installed directly on the physical hardware (for example, VMware ESXi, Microsoft Hyper-V). It provides maximum performance and is used in server data centers.
- Type 2 hypervisor (Hosted): Runs as an ordinary application inside an already installed operating system (for example, VirtualBox, VMware Workstation). It is more often used on home computers and for testing.
The hypervisor manages the access of virtual machines to the processor, memory, disk and network resources, isolating them from each other. This allows several different systems to be safely run on one physical server.
What a virtual machine consists of
- Virtual resources: Virtual processors (vCPU), random access memory (RAM), a hard disk (virtual disk), network interfaces.
- Operating system: The guest OS (Windows, Linux, macOS) installed on the virtual disk.
- Applications: Programs and services running inside the guest OS.
- Configuration files: Files that store the virtual machine settings (number of vCPUs, amount of RAM, disk size).
Why virtual machines are needed
1. Running different operating systems
Virtual machines allow you to run Linux on a Windows computer, macOS on an ordinary PC or old versions of Windows for compatibility with legacy software. This is especially useful for developers and testers.
2. Safe experiments
If you download a dangerous file or a virus inside a virtual machine, it will not harm your main computer. The virtual machine is isolated from the host system, which makes it ideal for testing suspicious software.
3. Savings for business
Companies can run dozens of virtual servers on one powerful physical computer, saving on equipment, electricity and data center rental. This is called server consolidation.
4. Cloud technologies
Cloud providers (AWS, Google Cloud, Yandex Cloud) use virtual machines to offer servers for rent. The client receives a dedicated VM with its own resources and can manage it over the internet.
5. Testing and development
Developers use VMs to test programs in different environments and create isolated environments for developing and debugging applications.
Popular programs for creating VMs
Oracle VM VirtualBox
A free open-source program with a simple interface. An excellent choice for home use, learning and testing. Supports Windows, macOS, Linux and many guest operating systems.
VMware Workstation Pro
A powerful commercial solution for professionals. Provides high performance, good 3D graphics support and deep integration with the host system. Now available free of charge for personal use.
Microsoft Hyper-V
A built-in type 1 hypervisor in Windows 10/11 Pro and Enterprise. Provides high performance and integrates perfectly with the Windows ecosystem.
Parallels Desktop
The most convenient option for running virtual machines on Mac computers. Optimized for work with macOS and allows you to run Windows with almost no loss of performance.
Read about how to choose suitable virtualization for business in the article Infrastructure.
Virtual machine security
Virtual machines, like any other systems, can be vulnerable to attacks. The main risks:
- VM Escape: A virus uses a vulnerability in the hypervisor to move from the guest system to the host.
- Shared folders and clipboard: If file sharing is enabled, a virus can infect the main system.
- Network environment: A virtual machine can attack other devices on the network if it is connected in Bridged mode.
For safe work with virtual machines, it is recommended:
- To disable shared folders and the clipboard when working with suspicious software.
- To use isolated network modes (NAT or Host-Only).
- To regularly update the hypervisor to current versions.
- To create snapshots for quick recovery.
Read about how to protect data in virtual environments in the article Cloud security.
Frequently asked questions
What is a virtual machine in simple words?
A virtual machine is a “computer inside a computer”. It is a program that creates a virtual computer with its own processor, memory and disk but uses the resources of your real PC. You can install another operating system on it and work in it as on a separate device. Read about how this is used in the cloud in the article Cloud security.
How is VirtualBox different from VMware?
VirtualBox is a free open-source program, ideal for home use and beginners. VMware is a powerful commercial solution that provides higher performance and works better with 3D graphics. VMware Workstation Pro is now free for personal use. Choose VirtualBox for simple tasks, VMware for professional work. Read about choosing tools in the article Infrastructure.
Can I catch a virus through a virtual machine?
Yes, but this requires certain conditions. A virus can infect the main system through shared folders, the clipboard or vulnerabilities in the hypervisor itself (VM Escape). To protect yourself: disable shared folders, do not use the clipboard, set up an isolated network. Read about protection from viruses in the article Antivirus software.
What types of virtual machines are there?
Virtual machines are divided by hypervisor type: type 1 (Bare-Metal) — installed directly on the hardware (VMware ESXi, Hyper-V), type 2 (hosted) — run inside an operating system (VirtualBox, VMware Workstation). They also differ by purpose: server VMs, desktop VMs, containers and emulators.
Which virtual machine is best for Windows?
For Windows, the best choice is VMware Workstation Pro (high performance) or VirtualBox (free and simple). If you have Windows Pro, you can use the built-in Hyper-V. For home use I recommend VirtualBox, for professional work — VMware. Read about choosing business solutions in the article Low-code.
How to create a virtual machine on a computer?
Download and install VirtualBox or VMware. Click “Create”, choose a name and OS type, allocate RAM (2-4 GB), create a virtual disk (20-50 GB). Then specify the ISO image of the operating system and run the installation as on an ordinary computer. Read more about configuration in the article Infrastructure.
How much RAM is needed for a virtual machine?
At a minimum — 2 GB for lightweight Linux systems, 4 GB for Windows 10/11. For comfortable work, 8-16 GB is recommended on the host system to allocate 4-8 GB to the virtual machine. The more tasks you plan to perform in the VM, the more RAM you will need. Read about system requirements in the article Operating system.
Other terms in «Infrastructure»
Was this information helpful?
Build reliable IT infrastructure
Build a modern, fault-tolerant IT infrastructure. Design, equipment supply, installation and maintenance turnkey.