Skip to content

Virtual Machine Experience Guide

If you're not ready to install Debian directly on your computer, a virtual machine is the perfect starting point. It lets you create a "virtual computer" within your existing system to experience and learn Debian with zero risk.

🎯 Why Start with a Virtual Machine

Advantages at a Glance

  • Zero risk — Does not affect your existing operating system or data
  • Rollback anytime — Use snapshots to restore the system with one click if anything goes wrong
  • Learning and experimentation — Freely try various commands and configurations without fear of breaking things
  • Multiple versions side by side — Run multiple Debian virtual machines simultaneously

Installation Method Comparison

MethodRiskPerformanceSuitable Scenario
Virtual Machine✅ No risk70-90%Learning, testing
Dual Boot⚠️ Requires partitioning100%Daily use + Windows
Direct Install⚠️ Overwrites original OS100%Fully switching to Debian
Live USB✅ No riskLowerQuick preview

💡 Beginner Tip

It is recommended to try Debian in a virtual machine first, and consider installing on physical hardware after you are comfortable with the basics.

💻 Choosing Virtual Machine Software

Choose the appropriate virtual machine software based on your operating system:

Software Comparison

SoftwarePriceSupported SystemsFeaturesRecommendation
VirtualBoxFreeWindows/macOS/LinuxCross-platform, full-featured✅ Highly recommended
VMware WorkstationFree (Personal)Windows/LinuxExcellent performance✅ Recommended
UTMFreemacOSApple Silicon support✅ Recommended for Mac users
KVM/QEMUFreeLinuxNear-native performanceSuitable for advanced users

📥 Installing VirtualBox

Windows Installation

  1. Visit the VirtualBox website
  2. Download the "Windows hosts" installer
  3. Run the installer and click "Next" through the wizard
  4. Restart your computer after installation

macOS Installation

bash
# Method 1: Download the installer directly
# Visit https://www.virtualbox.org/wiki/Downloads
# Download "macOS / Intel hosts"

# Method 2: Using Homebrew
brew install --cask virtualbox

Linux Installation

bash
# Debian/Ubuntu
sudo apt update
sudo apt install virtualbox

# Or install the latest version
# Download the .deb package from the official website
sudo dpkg -i virtualbox-7.1_7.1.x-xxxxx~Debian~bookworm_amd64.deb
sudo apt install -f

⚠️ Important Notice

Before installing VirtualBox, make sure virtualization technology (VT-x / AMD-V) is enabled in your BIOS.

🔧 Creating a Virtual Machine

Creation Workflow

Step 1: Create a New Virtual Machine

  1. Open VirtualBox and click "New"
  2. Fill in the basic information:
    • Name: Debian 13
    • Type: Linux
    • Version: Debian (64-bit)

Step 2: Allocate Memory

Choose based on your physical memory:

Physical MemoryRecommended AllocationDesktop Environment
8 GB2 GBXfce / MATE
16 GB4 GBGNOME / KDE
32 GB+4-8 GBAny desktop

💡 Beginner Tip

Do not allocate more than half of your physical memory to the virtual machine, or your host system will slow down.

Step 3: Create a Virtual Hard Disk

  • File type: VDI (VirtualBox Disk Image)
  • Allocation method: Dynamically allocated (recommended — only uses actual space as needed)
  • Size: 25-40 GB recommended

Step 4: Mount the ISO Image

  1. Select the newly created virtual machine and click "Settings"
  2. Go to the "Storage" section
  3. Click the disk icon under "Empty"
  4. Select "Choose a disk file"
  5. Browse and select the Debian ISO file you downloaded

⚙️ Virtual Machine Configuration Details

System Settings

  • Processor: Allocate 2-4 cores
  • Boot Order: Optical drive first
  • Enable EFI: Recommended (simulates modern UEFI boot)

Display Settings

  • Video Memory: Set to 128 MB
  • Graphics Controller: VMSVGA
  • Enable 3D Acceleration: Can be enabled after installing Guest Additions

Network Settings

ModeDescriptionUse Case
NATVM accesses the internet through the host; external devices cannot reach the VMEveryday browsing (default)
BridgedVM gets its own IP address; accessible on the local networkServer testing
Host-onlyCan only communicate with the host; no internet accessInternal network testing

🚀 Installing Debian in the Virtual Machine

  1. Select the virtual machine and click "Start"
  2. The virtual machine will boot from the ISO image
  3. Follow the installation wizard to complete the installation

💡 Beginner Tip

Installing in a virtual machine is exactly the same as installing on a physical machine. For detailed installation steps, refer to the Installation Guide. In the virtual machine, you can safely choose "Use entire disk" — it will not affect your real hard drive.

Recommended choices during installation:

  • Partitioning scheme: Use entire disk (virtual hard disk — completely safe)
  • Desktop environment: GNOME or Xfce (Xfce is lighter and runs more smoothly in a VM)
  • Check: SSH server + standard system utilities

🔌 Installing Guest Additions

Guest Additions significantly improve the virtual machine experience:

Features

  • ✅ Automatic resolution adjustment
  • ✅ Seamless mouse switching
  • ✅ Shared clipboard
  • ✅ Shared folders
  • ✅ Drag and drop files
  • ✅ Better display performance

Installation Steps

bash
# 1. Install build dependencies
sudo apt update
sudo apt install -y build-essential dkms linux-headers-$(uname -r)

# 2. In the VirtualBox menu, select:
#    Devices → Insert Guest Additions CD image...

# 3. Mount and install
sudo mount /dev/cdrom /mnt
sudo /mnt/VBoxLinuxAdditions.run

# 4. Reboot the virtual machine
sudo reboot

Enable Clipboard Sharing

After installation, in the VirtualBox menu:

  • Devices → Shared Clipboard → Bidirectional
  • Devices → Drag and Drop → Bidirectional

📁 Shared Folder Configuration

Shared folders allow you to conveniently exchange files between the host and the virtual machine.

Creating a Shared Folder

  1. Go to VM Settings → Shared Folders
  2. Click the Add icon on the right
  3. Select a folder path on the host
  4. Set a name (e.g., shared)
  5. Check Auto-mount and Make Permanent

Accessing in the Virtual Machine

bash
# Add your user to the vboxsf group
sudo usermod -aG vboxsf $USER

# After logging out and back in, the shared folder is at
ls /media/sf_shared/

# Or mount manually
sudo mount -t vboxsf shared /mnt/shared

📸 Snapshot Management

Snapshots are one of the most powerful features of virtual machines — save the system state at any time and restore with one click if something goes wrong.

Creating a Snapshot

  1. Select the virtual machine in VirtualBox
  2. Click the "Snapshots" tab
  3. Click "Take Snapshot"
  4. Enter a snapshot name and description

Restoring a Snapshot

  1. Select the snapshot you want to restore from the snapshot list
  2. Click "Restore"
  3. The virtual machine will return to the state it was in when the snapshot was taken

💡 Snapshot Best Practices

  • Create a "clean system" snapshot immediately after installing the OS
  • Create a snapshot before installing important software or making major configuration changes
  • Snapshots consume disk space — periodically clean up snapshots you no longer need

⚡ Performance Optimization

Optimization Checklist

ItemOptimizationEffect
MemoryAllocate 2-4 GBSystem responsiveness
CPUAllocate 2-4 coresProcessing speed
Video MemorySet to 128 MBDisplay quality
Hard DiskStore virtual disk on SSDI/O performance
Guest AdditionsInstall Guest AdditionsOverall experience
3D AccelerationEnable after installing GAGraphics performance

Additional Optimization

bash
# Optimize inside the VM: reduce swap usage
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

# Disable unnecessary services
sudo systemctl disable bluetooth
sudo systemctl disable cups

🆘 Common Issues

Virtual Machine Fails to Start

Error: VT-x is disabled in the BIOS

Solution:
1. Restart your computer and enter the BIOS settings
2. Find Virtualization Technology (VT-x or AMD-V)
3. Set it to Enabled
4. Save and restart

Performance Is Too Slow

  • Increase the allocated memory and CPU cores
  • Make sure the virtual disk is stored on an SSD
  • Install Guest Additions
  • Choose a lightweight desktop environment (e.g., Xfce)

No Network Connectivity

bash
# Check if the network mode is set to NAT
# VirtualBox Settings → Network → Attached to: NAT

# Check inside the virtual machine
ip addr show
ping -c 4 debian.org

# If there is no connectivity, try restarting the network
sudo systemctl restart NetworkManager

Guest Additions Installation Fails

bash
# Make sure all dependencies are installed
sudo apt update
sudo apt install -y build-essential dkms linux-headers-$(uname -r)

# Remount the CD
sudo mount /dev/cdrom /mnt

# Check the error log
sudo /mnt/VBoxLinuxAdditions.run 2>&1 | tail -20

Cannot Display in Full Screen

bash
# Make sure Guest Additions are installed
# VirtualBox menu → View → Auto-resize Guest Display

# Or manually set the resolution
xrandr --output Virtual-1 --mode 1920x1080

Next Steps

After experiencing Debian in a virtual machine, you can:

  1. Installation Guide - Install Debian on physical hardware
  2. Dual Boot Installation Guide - Keep Windows while installing Debian
  3. First Boot Configuration - Complete initial system setup

Is Debian running smoothly in your virtual machine? Ready to install for real →