What Is a Virtual Machine in Oracle VirtualBox?
Learn what a virtual machine is, how Oracle VirtualBox uses host hardware, and how host and guest operating systems, virtual hardware, and installation media relate.
What Is a Virtual Machine?
A virtual machine (VM) is a software-created computer environment. It can boot an operating system, run applications, store files, and perform many of the same tasks as a standalone physical computer.
A VM does not consist of a separate physical computer. Instead, virtualization software such as Oracle VirtualBox creates and operates the VM by presenting software-defined hardware to it. The operating system running inside the VM generally treats that presented hardware as its own computer.
For example, you can keep your normal operating system on a physical computer and create a VM to test another operating system. The second operating system runs inside the VM rather than replacing the host operating system.
For a broader introduction, see what virtualization is and how Oracle VirtualBox works.
Host Computer, Host Operating System, and VirtualBox
The host computer is the physical computer on which Oracle VirtualBox is installed. Its real processor, RAM, storage devices, and network connection provide the resources used by VMs.
The host operating system is the operating system installed directly on that physical computer. Windows, Linux, and macOS can be examples of host operating systems, depending on the computer and VirtualBox installation.
Oracle VirtualBox is the virtualization software between the host and its VMs. It creates virtual hardware devices and maps them to resources supplied by the host. A virtual CPU uses processing capacity from the host CPU, virtual memory uses the host's RAM, and a virtual disk is stored using space on the host's storage.
Physical Computer and Virtual Machine Comparison
Virtual Hardware Assigned to a VM
When you create a VM, you select or adjust its virtual hardware. Virtual hardware consists of software-presented devices that the guest operating system can detect and use.
Virtual CPU and Virtual Memory
A virtual CPU is a processor resource presented to the guest. It is backed by the host CPU; it is not an additional physical processor. You can normally choose how many virtual CPUs a VM may use in its VirtualBox settings.
Virtual memory is the amount of host RAM assigned to the VM. The guest uses it as ordinary RAM, but that memory must come from the host's available memory. Assigning almost all host RAM to a VM can leave too little for the host operating system and other applications.
Virtual Hard Disk
A virtual hard disk is the VM's internal storage device. It commonly exists as a disk-image file stored on the host. The guest operating system formats and uses this device much like a physical computer uses an internal drive.
The virtual disk is not unlimited. Its configured capacity and the free space on the host determine how much storage the guest can use. Learn more about virtual disks and disk-image files.
Virtual Network Adapter
A virtual network adapter is a network interface presented to the guest operating system. VirtualBox connects it through a selected networking mode, allowing the guest to communicate with the host, other VMs, a physical network, or the internet as configured.
If a guest cannot connect to a network, check that its virtual adapter is enabled and review the selected VirtualBox network mode.
Virtual Optical Drive
A virtual optical drive behaves like a CD or DVD drive from the guest's perspective. It can use physical media in a host optical drive or an ISO image, which is a file containing the contents of a disc.
Host and Guest Operating Systems
The guest operating system is the operating system installed inside a VM. The host operating system runs directly on the physical host computer. These are separate operating-system environments even though they share the same physical computer.
A guest can usually be installed, configured, updated, and administered much like an operating system on a physical machine. For example, one host could run a Linux guest for software testing and a Windows guest for compatibility testing.
Each guest has its own operating-system files, settings, installed applications, users, and virtual storage. An application installed in one guest normally belongs only to that guest. It does not automatically appear in another VM or in the host operating system.
For a focused explanation, read what a guest operating system is.
Installing a Guest Operating System
The usual conceptual workflow is:
- Create a new VM and choose the intended guest operating-system type.
- Assign virtual hardware such as virtual CPUs and memory.
- Create or attach a virtual hard disk.
- Attach installation media to the VM's virtual optical drive.
- Start the VM so it can boot from the installation media.
- Install and configure the guest operating system inside the VM.
Installation media contains the files needed to install an operating system. It may be a physical CD or DVD, or an ISO image stored on the host. Instead of burning an ISO image to a disc, you can attach the ISO directly to the VM's virtual optical drive.
When the VM starts, VirtualBox makes the attached media available as though it were inserted into an optical drive. If the guest does not start the installer, verify that valid media is attached and that the VM can boot from the virtual optical drive.
See how to create a VM, how to install a guest OS, and how to add a DVD or CD-ROM drive.
Running Multiple VMs on One Host
A single host can contain and run multiple VMs. For example, VirtualBox might list separate VMs for a Linux guest, a Windows guest, and a testing environment.
Each VM has its own virtual hardware configuration and guest operating-system environment. Its virtual disk, assigned memory, virtual CPUs, and network adapter are distinct from those of other VMs. This separation helps prevent ordinary changes inside one guest from automatically changing another guest.
However, the VMs are not independent of the host's physical capacity. When several VMs run at the same time, they share the host's available CPU time, RAM, disk space, and network capacity. Running too many VMs, or assigning overly large amounts of memory and CPU resources, can slow the guests and make the host unresponsive.
A Practical VirtualBox Example
Imagine a physical computer running a host operating system with Oracle VirtualBox installed. You create two VMs:
- VM 1: A Linux guest with its own virtual CPU allocation, virtual memory, virtual hard disk, and virtual network adapter.
- VM 2: A Windows guest with a different virtual hardware allocation and a separate virtual disk and network adapter.
Both VMs use the same host processor, RAM, physical storage, and network connection. Each guest sees its assigned virtual devices rather than directly managing the host's physical devices. A browser installed in VM 1 remains installed in VM 1; it does not automatically become available in VM 2 or on the host.
This arrangement is useful for testing another operating system, practicing operating-system administration, or learning software configuration while keeping the host environment separate. It does not provide unlimited capacity or guarantee complete isolation from every possible failure; the VMs still depend on the host and VirtualBox.
Common Problems and Conceptual Fixes
The VM is slow or the host becomes unresponsive
The VM or several running VMs may be demanding more CPU or memory than the host can comfortably provide. Reduce VM resource allocations, stop unused VMs, and leave sufficient resources for the host operating system.
The operating-system installer does not start
Installation media may not be attached, the selected ISO may be incorrect or invalid, or the virtual optical drive may not be available as a boot source. Check the attached media and the VM's boot configuration.
A program installed in the VM does not appear on the host
This is expected. The program was installed in the guest operating system. Software remains in that guest unless you separately install it on the host or configure an appropriate sharing or integration method.
The guest has no network connection
Check that the VM's virtual network adapter is enabled and that its selected network mode is appropriate. Virtual networking determines how the guest reaches the host, other guests, or external networks.
Key Distinctions to Remember
- VM versus host: The VM is software-defined; the host is the physical computer running VirtualBox.
- Virtual hardware versus physical hardware: The guest sees virtual devices, while VirtualBox maps those devices to real host resources.
- Host OS versus guest OS: The host OS runs directly on the physical computer; the guest OS runs inside a VM.
- Separate environments versus unlimited resources: VMs have separate operating-system environments, but all running VMs share the host's finite CPU, memory, storage, and network capacity.
- Installation media versus installed system: An ISO or disc provides installer files; the guest operating system is installed onto the VM's virtual hard disk.
Once these distinctions are clear, creating a VM is easier to understand: VirtualBox defines a computer-like environment, assigns it virtual hardware, supplies installation media, and starts a guest operating system that uses the host's real resources.