Save 10%Pay yearly on any plan. 6% half-yearly, 3% quarterly. Help centreWhatsAppTelegram TeamsOpen a ticket

How to Set Up a Virtual Lab with VirtualBox or Hyper-V

Build a practice network of virtual machines on one PC: choose between VirtualBox and Hyper-V, set up isolated networks, use snapshots, and plan the memory.

3 min readBy Swati

Reviewed by the AmazingRDP technical team

A virtual lab with VirtualBox or Hyper-V

A lab too big for your PC? A dedicated server can run Hyper-V or another hypervisor with many virtual machines. See Cheap Dedicated Servers from $38.99

A virtual lab is a set of virtual machines on one computer, connected by a network that exists only inside it. It is where you practise what you would not dare on real systems: build a Windows domain, break a Linux server, test an upgrade. Two free tools cover almost every need.

VirtualBox or Hyper-V?

VirtualBoxHyper-V
Runs onWindows, macOS, LinuxWindows 10 and 11 Pro, Enterprise, Education; Windows Server
CostFreeIncluded in those Windows editions
Ease for beginnersEasier: one window, simple USB and shared foldersMore technical
Speed with Windows guestsGoodVery good
AutomationVBoxManage, VagrantPowerShell, built in
Choose it whenYou are starting out, or not on Windows ProYou work with Windows Server and want what companies run

Running both on one PC works on current versions, with VirtualBox slower while Hyper-V is switched on. Pick one.

Before you start

  • Memory decides the size of the lab. Add up what the machines need and leave 4 GB for your own system. 16 GB runs three or four small machines; 32 GB is comfortable.
  • An SSD with 100 GB or more free.
  • Virtualisation switched on in the PC's firmware settings.
  • Installer images (ISO) from the makers' sites. Microsoft offers evaluation editions of Windows Server and Windows Enterprise. See operating systems to try in a virtual machine.

Set up in VirtualBox

  1. Install VirtualBox from virtualbox.org.
  2. Click New, name the machine, choose the ISO, and set memory, processors and disk size.
  3. Under Settings, Network, choose how the machine is connected (table below).
  4. Start it and install the system. Afterwards install the Guest Additions from the Devices menu.
  5. Take a snapshot of the clean installation.

Set up in Hyper-V

Switch the feature on: open Turn Windows features on or off, tick Hyper-V, and restart.

The Windows Features window with Hyper-V ticked

Or in PowerShell as administrator: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All.

  1. Open Hyper-V Manager and create a switch under Virtual Switch Manager (table below).
  2. Choose New, Virtual Machine. Pick Generation 2 for current systems, set the memory, connect the switch, and attach the ISO.
  3. Start the machine and install. Take a checkpoint when it is clean.

The networks

You wantVirtualBoxHyper-V
Machines reach the internet; nothing reaches themNATDefault Switch
Machines see each other only; no internetInternal NetworkPrivate switch
Machines and your PC see each other; no internetHost-only AdapterInternal switch
Machines appear on your real networkBridged AdapterExternal switch

For a lab, use an isolated network for the machines' own traffic. A lab domain controller or DHCP server on your real network can disturb every other device on it. A machine may have two adapters: one isolated, one NAT for updates.

A first lab worth building

MachineRoleMemory
Windows ServerDomain controller, DNS, DHCP4 GB
Windows 11A PC joined to the domain4 GB
Ubuntu ServerA web server, or a machine to manage over SSH1 to 2 GB

Habits that save time

  • Snapshot before every experiment, and delete old snapshots; they grow.
  • Keep one clean machine of each system and clone it in place of reinstalling.
  • Give machines fixed addresses and write them down.
  • Shut machines down when you are done; a suspended lab still holds disk space and, when resumed, memory.

When the PC is too small

A VPS is itself a virtual machine and normally cannot run others inside it. A dedicated server can: install Hyper-V or another hypervisor on it and reach the lab from anywhere. Related: Windows Server vs Linux server.

Questions

What is a virtual lab?

A set of virtual machines on one computer, joined by a private network, used for practice and testing.

Is VirtualBox or Hyper-V better for a home lab?

VirtualBox is easier and runs on every system. Hyper-V is faster with Windows guests and closer to what companies run.

How much RAM do I need for a virtual lab?

16 GB for three or four small machines; 32 GB for a comfortable lab.

Can I run virtual machines inside a VPS?

Normally not. For that you need a dedicated server.