VMware ESXi and vSphere Cluster Management

What Is a Virtual Machine?

Learn what a virtual machine is, how Oracle VirtualBox works, and how host systems, guest operating systems, and virtual hardware fit together.

What Is a Virtual Machine?

A virtual machine (VM) is a software-defined computer environment. It behaves like an independent computer and can run an operating system and applications.

A physical computer contains real components such as a processor, RAM, storage, and a network adapter. A VM uses software to provide comparable computer functions through virtual hardware. The VM does not usually have its own separate physical processor or memory modules; instead, it receives controlled portions of the physical host's resources.

Host Systems and Oracle VirtualBox

The host is the physical computer on which virtualization software runs. The host supplies processor capacity, memory, disk space, and network access.

The host operating system is the operating system installed directly on that physical computer. For example, a Linux, Windows, or macOS installation on a laptop can be the host operating system.

Oracle VirtualBox is virtualization software used to create, configure, and run virtual machines. VirtualBox runs on the host operating system and presents virtual hardware to each VM. A VM then detects that virtual hardware and uses it as though it were the hardware of a physical computer.

The basic relationship

The layers can be understood from the outside inward:

  1. The physical computer is the host.
  2. The host operating system runs on the physical computer.
  3. Oracle VirtualBox runs as software on the host operating system.
  4. VirtualBox creates and operates one or more VMs.
  5. Each VM contains virtual hardware and a guest operating system.

Host and Guest Operating Systems

A guest operating system is the operating system installed and running inside a particular VM. It is called a guest because it uses resources provided by the host through VirtualBox.

The guest OS is separate from the host OS. You administer it much as you would an operating system installed directly on physical hardware: you can install applications, create users, change settings, manage files, and connect it to networks.

Aspect: Location

Host operating system: Installed directly on the physical computer.

Guest operating system: Installed inside a virtual machine.

Aspect: Hardware

Host operating system: Uses the physical computer's hardware through its normal device drivers.

Guest operating system: Uses virtual hardware presented by VirtualBox.

Aspect: Resources

Host operating system: Manages the physical computer's available CPU, RAM, storage, and networking.

Guest operating system: Receives configured portions of those resources.

Aspect: Administration

Host operating system: Controls the physical computer and runs VirtualBox.

Guest operating system: Is administered within its VM and does not directly control the host's hardware.

Virtual Hardware Inside a VM

When you create a VM, you configure a set of virtual devices. These devices give the guest OS the hardware interfaces it needs to start and operate.

Physical component: Processor

Virtual machine counterpart: Virtual CPU

Purpose for the guest OS: Provides processor capacity for running the guest OS and its applications.

Physical component: RAM

Virtual machine counterpart: Virtual memory

Purpose for the guest OS: Supplies host memory that the guest OS can use while programs are running.

Physical component: Hard disk or solid-state drive

Virtual machine counterpart: Virtual hard disk

Purpose for the guest OS: Stores the guest OS, applications, configuration, and user files.

Physical component: Network interface card

Virtual machine counterpart: Virtual network interface card (NIC)

Purpose for the guest OS: Provides a network adapter through which the VM can communicate with the host, other systems, or the internet, depending on its network configuration.

Physical component: Optical drive

Virtual machine counterpart: Virtual optical drive

Purpose for the guest OS: Reads installation media from a physical CD/DVD drive or an ISO image.

Virtual CPU

A virtual CPU is a processor allocation presented to the guest OS. In VirtualBox, you choose how many virtual processors the VM can use. The physical host still supplies the actual processing capacity, so assigning more virtual CPUs does not create more physical CPU power.

Virtual memory

Virtual memory, in this context, means host RAM allocated for use by a VM. If you assign 4 GB of memory to a VM, VirtualBox makes that amount available to the guest while the VM is running. The host must retain enough memory for its own operating system and other applications.

Virtual hard disk

A virtual hard disk is a virtualized storage device used by the VM. It is commonly represented by one or more files on the host's physical storage. The guest OS sees a disk device and creates partitions and filesystems on it, while the host sees the underlying virtual-disk file or storage allocation.

Virtual network interface card

A virtual network interface card (NIC) is a software-provided network adapter. VirtualBox connects this adapter according to the VM's network settings. Depending on the selected mode, the VM may communicate with the host, other VMs, the local network, or the internet.

Running Multiple VMs on One Host

One physical host can run more than one VM. For example, a host running VirtualBox could contain:

  • One VM with a Linux guest operating system.
  • A second VM with a different guest operating system.
  • A third VM used for testing software or learning system administration.

Each VM has its own configured virtual CPU, virtual memory, virtual hard disk, and virtual network adapter. The VMs are logically separate: software running in one VM does not normally use the files or applications of another VM directly.

However, the VMs share the host's finite resources. The physical host must provide enough processor capacity, RAM, disk space, and network access for VirtualBox, the host OS, and all running guests. Starting too many resource-intensive VMs can make the host and its guests slow.

Example resource allocation

Suppose a host has 8 physical CPU cores, 16 GB of RAM, and 500 GB of available storage. You might configure one VM with 2 virtual CPUs and 4 GB of memory, and another with 2 virtual CPUs and 4 GB of memory. The remaining resources are needed by the host and other activities. The exact allocation depends on the requirements of each guest OS and the capacity of the host.

Installing an Operating System in a VM

A new VM normally needs installation media before it can run a guest operating system. Installation media contains the operating system setup files. It may be a physical CD or DVD, or an ISO image.

An ISO image is a disk-image file that commonly contains bootable operating-system installation media. VirtualBox can make an ISO appear to the VM as though it were inserted into a virtual optical drive.

High-level installation process

  1. Create a new VM and select the operating system family and version that best match the intended guest.
  2. Assign suitable virtual CPU and memory resources.
  3. Create or attach a virtual hard disk for the guest OS.
  4. Attach installation media, such as a physical CD/DVD drive or an ISO image.
  5. Configure the VM to boot from the virtual optical device before the empty virtual hard disk.
  6. Start the VM and follow the guest operating system's installer.
  7. After setup completes, restart the VM and boot the installed guest OS from its virtual hard disk.

The installer runs inside the VM much like it would on a physical computer. It detects the virtual disk, virtual CPU, virtual memory, and other virtual devices exposed by VirtualBox.

VirtualBox Configuration Concepts

When creating or modifying a VM in VirtualBox, the important concepts include:

  • Create a new VM: Define the VM's name, operating system type, and basic settings.
  • Assign virtual CPU and memory: Allocate host resources while leaving enough capacity for the host OS.
  • Create or attach a virtual hard disk: Provide storage for the guest OS and its files.
  • Configure a virtual network adapter: Enable the virtual NIC and select how it should connect to networks.
  • Mount a CD/DVD or ISO image: Provide bootable installation media through the VM's virtual optical drive.
VM configuration conceptually includes:
  virtual CPU:        assigned processor capacity
  virtual memory:     allocated host RAM
  virtual hard disk:  storage for the guest operating system
  virtual NIC:        network adapter and connection mode
  boot media:         physical CD/DVD or ISO image

Conceptual Walkthrough: One Host, Several Guests

Imagine a physical laptop running a Linux host operating system. Oracle VirtualBox runs on that host. In VirtualBox, you create two separate VMs:

  • Linux VM: Has its own virtual CPU, assigned memory, virtual hard disk, virtual NIC, and Linux guest OS.
  • Another-OS VM: Has a separately configured virtual CPU, memory, virtual hard disk, virtual NIC, and a different guest OS.

Both guest operating systems can run at the same time in separate VM windows. Each guest sees its own virtual computer. VirtualBox coordinates access to the physical laptop's processor, memory, storage, and networking.

This separation is useful for testing software, learning operating-system administration, running applications that require different operating systems, and experimenting without changing the host installation directly. A VM is not completely independent of the host, however: its performance depends on available host resources, and deliberate sharing mechanisms are required when files or networks need to cross the VM boundary.

Troubleshooting Common VM Problems

The VM does not start the operating-system installer

  • Confirm that the correct CD/DVD drive or ISO installation source is attached to the VM.
  • Confirm that the VM is configured to boot from the virtual optical device.
  • Check that the ISO image is a valid bootable image and that the VM was restarted after changing the boot media.

The guest OS has insufficient resources

  • Review the VM's configured memory, virtual CPU count, and virtual disk allocation.
  • Ensure that the host retains enough RAM and processor capacity for its own operating system.
  • Remember that increasing a VM's allocation cannot exceed the useful capacity of the physical host.

The guest OS cannot access the network

  • Verify that a virtual network interface card is enabled in the VM settings.
  • Review the network connection mode assigned to the VM.
  • Check the guest OS network configuration after confirming that VirtualBox is presenting the adapter.

Summary

  • A VM is software that behaves like an independent computer.
  • The host is the physical computer and its host OS runs VirtualBox.
  • VirtualBox creates, configures, and runs VMs while presenting virtual hardware to them.
  • The guest OS is installed and operated inside a particular VM.
  • Virtual CPUs, memory, hard disks, and network adapters provide the interfaces required by the guest OS.
  • One host can run multiple logically separate VMs, but all of them share the host's finite resources.
  • An ISO image or physical CD/DVD can provide the installation media used to install a guest OS.

The next logical steps are to install Oracle VirtualBox, create a VM, and learn how to install and administer a guest operating system. For a concise reference, return to What Is a Virtual Machine?.