수. 8월 6th, 2025

Introduction
VirtualBox is a powerful, open-source virtualization tool that lets you run multiple operating systems (Windows, macOS, Linux distros, etc.) simultaneously on your Linux machine. Whether you’re testing software, running legacy apps, or learning new OS environments, VirtualBox provides a flexible sandbox. Here’s how to master it.


1. Prerequisites

  • A Linux Host: Ubuntu, Fedora, Debian, etc.
  • Sufficient Resources: At least 4GB RAM (8GB+ recommended), 20GB free storage per VM.
  • CPU with Virtualization Support: Enable VT-x/AMD-V in your BIOS/UEFI.
  • ISO File: The operating system installer (e.g., Windows 10 ISO, Ubuntu ISO).

2. Installing VirtualBox

On Debian/Ubuntu:

sudo apt update  
sudo apt install virtualbox virtualbox-ext-pack  

On Fedora:

sudo dnf install @virtualization  

Verify Installation:

Launch VirtualBox from your applications menu or run virtualbox in the terminal.


3. Creating Your First Virtual Machine

Step 1: Click “New” in VirtualBox.

  • Name: e.g., “Ubuntu 22.04 VM”
  • Type: Select the OS (e.g., Linux).
  • Version: Choose the correct flavor (e.g., Ubuntu 64-bit).

Step 2: Allocate RAM

  • Assign 25–50% of your host’s RAM (e.g., 4096 MB for a host with 8GB RAM).

Step 3: Create a Virtual Hard Disk

  • Select “Create a virtual hard disk now” → VDI (VirtualBox Disk Image)Dynamically allocated.
  • Set disk size (e.g., 25GB). The file grows as you use the VM.

4. Installing the Guest OS

Step 1: Mount the ISO

  • Select your VM → Click “Settings” → “Storage”.
  • Under “Controller: IDE”, click the 📁 icon → “Choose a disk file” → Select your ISO.

Step 2: Start the VM

  • Click “Start”. The OS installer will boot.
  • Follow the installer prompts (partitioning, username, etc.).

Pro Tip:

  • Disable Audio/Printers in “Settings > Audio” if you encounter performance issues.

5. Essential Post-Installation Setup

Install Guest Additions

Guest Additions enhance performance, enable shared folders, clipboard sync, and better screen resolution.

  1. Start the VM.
  2. Go to VirtualBox menu: Devices → Insert Guest Additions CD Image.
  3. Inside the guest OS, open the CD and run:
    • Linux Guests: sudo ./VBoxLinuxAdditions.run
    • Windows Guests: Run VBoxWindowsAdditions.exe.

Configure Shared Folders

  • In VM “Settings” → “Shared Folders” → Add a host folder (e.g., /home/yourname/shared).
  • Access it from the guest at /media/sf_shared (Linux) or via File Explorer (Windows).

6. Optimization & Troubleshooting

  • Snapshots: Take snapshots (“Machine > Take Snapshot”) before critical changes for easy rollbacks.
  • Network Settings:
    • NAT: Default (VM shares host’s IP).
    • Bridged: VM gets its own IP on your LAN (ideal for servers).
  • Performance:
    • Enable 3D acceleration in “Display > Screen”.
    • Assign more CPU cores (“System > Processor”).
  • Common Fixes:
    • If USB devices aren’t detected: Add your user to the vboxusers group:
      sudo usermod -aG vboxusers $USER  
    • Kernel module error? Run: sudo /sbin/vboxconfig.

Conclusion

VirtualBox turns your Linux system into a versatile playground for any OS. By following these steps, you’ll have a stable, high-performance VM ready for development, testing, or experimentation. Remember to:
✅ Allocate resources wisely.
✅ Install Guest Additions.
✅ Use snapshots liberally!

Ready to virtualize? Dive into VirtualBox’s documentation for advanced features like CLI management (VBoxManage) or automated deployments. Happy virtualizing! 🖥️🔧

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다