A virtual machine (VM) simulates or emulates the architecture and functionality of a physical computer. VMs emulate a full hardware environment (CPU, memory, storage, network devices), allowing each VM to run its own operating system, without interfering with other VMs or the host system. VMs are created and managed by software called a hypervisor (e.g., VMware, VirtualBox, or Hyper-V).

Some virtual machine emulators, such as [QEMU] (Quick Emulator)](https://en.wikipedia.org/wiki/QEMU) and video game console emulators, are designed to also emulate (or “virtually imitate”) different system architectures, thus allowing execution of software applications and operating systems written for another CPU or architecture. OS-level virtualization allows the resources of a computer to be partitioned via the kernel. The terms are not universally interchangeable.

The difference between emulation and virtualization lies in how they replicate a computing environment. Both allow software to run in an isolated or controlled environment, but they do so in fundamentally different ways.

  • Virtualization: Runs multiple operating systems or applications on the same hardware architecture using a hypervisor to manage hardware resources. It is faster and more efficient since it runs directly on the hardware, but it requires the same underlying architecture.
  • Emulation: Simulates the hardware and software of one system on another, enabling cross-platform software execution (e.g., running ARM software on x86). It is slower because it has to mimic an entirely different hardware architecture.
AspectEmulationVirtualization
ArchitectureCross-platform (e.g., ARM on x86)Same architecture (e.g., x86 on x86)
PerformanceSlower (due to real-time translation of instructions)Faster (near-native, hardware-assisted)
Use CasesRunning software for a different platform or legacy appsRunning multiple OSes or apps on the same hardware
Hardware InteractionEmulates hardware (CPU, peripherals, etc.)Direct access to physical hardware (via hypervisor)
OverheadHigher (due to the need for instruction translation)Lower (uses host’s hardware directly)

VirtualBox Installation

Install Ubuntu on VirtualBox [11/25/23]

How to run an Ubuntu Desktop virtual machine using VirtualBox 7
How to Install ROS 2 in Ubuntu 22.04 on Windows using Virtual Box

picture 0 picture 1 picture 2 picture 3

Set up an SSH key for GitHub authentication

  • Generate an ssh key on your VM and add it to your GitHub account