How to Set Up a VM on Windows 11
In this article
Setting up a virtual machine (VM) on Windows 11 lets you run another operating system—like Linux, an older Windows version, or a test build—inside a window on your current desktop. This is useful for software testing, learning new OSes, or isolating suspicious files without risking your main system. Windows 11 includes a built-in hypervisor called Hyper-V, but it's only available on Pro, Enterprise, or Education editions. If you're on Windows 11 Home, you'll use the free, open-source Oracle VirtualBox instead. This guide covers both methods.
What You'll Need
- A Windows 11 PC with at least 8 GB of RAM (16 GB recommended) and a 64-bit CPU with virtualization support (Intel VT-x or AMD-V).
- Enough free disk space—at least 20 GB per VM, but more if you plan to install large applications.
- An ISO file of the operating system you want to install (e.g., Ubuntu, Windows 10, Debian). You can download these from official sources.
- If using Hyper-V: Windows 11 Pro, Enterprise, or Education. Check by going to Settings > System > About.
- If using VirtualBox: the latest VirtualBox installer from virtualbox.org, plus the Extension Pack if you need USB 3.0 or broader device support.
Step-by-Step
Method 1: Using Hyper-V (Windows 11 Pro and above)
- Enable virtualization in BIOS/UEFI. Restart your PC, press the key shown on screen (usually Del, F2, F10, or F12) to enter BIOS/UEFI. Look for a setting called "Intel Virtualization Technology," "SVM Mode," or "VT-x/AMD-V" and enable it. Save and exit. If it's already enabled, skip this step.
- Turn on Hyper-V in Windows Features. Open the Start menu, type "Windows Features," and select "Turn Windows features on or off." In the list, check the box for "Hyper-V" (this includes the Hyper-V Manager and platform). Click OK and restart when prompted.
- Open Hyper-V Manager. Press Start, type "Hyper-V Manager," and open it. If you don't see it, verify that your edition supports Hyper-V and that virtualization is enabled in BIOS.
- Create a new virtual machine. In the right-hand Actions panel, click "New" > "Virtual Machine." Follow the wizard: give the VM a name, choose a generation (Generation 2 is recommended for modern OSes like Windows 10/11 or Ubuntu 20.04+), assign memory (at least 2048 MB for Linux, 4096 MB for Windows), configure a virtual network (choose "Default Switch" for internet access), and create a virtual hard disk (choose a size, e.g., 40 GB).
- Attach the ISO file. In the wizard's "Installation Options" step, select "Install an operating system from an image file (.iso)" and browse to your downloaded ISO. If you skipped this, right-click the VM, go to "Settings," and under "DVD Drive" choose the ISO.
- Start the VM and install the OS. Select the VM in Hyper-V Manager and click "Start" (or right-click > Connect). A new window opens showing the VM's display. Follow the OS installer's prompts. Once installed, the VM will boot normally.
Method 2: Using VirtualBox (Windows 11 Home or any edition)
- Download and install VirtualBox. Go to virtualbox.org, download the Windows installer, and run it. Accept the defaults; you may need to allow the driver installation during setup.
- Enable virtualization in BIOS/UEFI. Same as above—check that VT-x/AMD-V is enabled. VirtualBox will warn you if it's off.
- Create a new VM. Open VirtualBox, click "New" (the blue star icon). Name your VM, choose the type and version (e.g., Linux > Ubuntu 64-bit). Set memory size (at least 2048 MB, but use half of your system RAM if you have 8 GB).
- Create a virtual hard disk. Select "Create a virtual hard disk now." Choose VDI (VirtualBox Disk Image) as the file type. Choose "Dynamically allocated" so the file grows as you use it—this saves space. Set a size (e.g., 30-50 GB).
- Attach the ISO and configure settings. Select the VM and click "Settings." Go to "Storage," click the empty optical drive, then the disk icon next to "Optical Drive," and "Choose a disk file" to select your ISO. Under "System," ensure "Enable EFI" is checked for modern OSes (optional but recommended for Windows 10/11). Under "Network," keep "NAT" for internet access.
- Start the VM and install. Click "Start" (green arrow). The VM will boot from the ISO. Follow the installer. After installation, remove the ISO from the virtual drive (Settings > Storage) to avoid booting from it again.
Common Mistakes
- Forgetting to enable virtualization in BIOS—this causes an error like "VT-x is not available" or a black screen.
- Allocating too much RAM to the VM, making your host system sluggish. Keep at least 4 GB for Windows 11 itself.
- Choosing the wrong VM generation in Hyper-V. Generation 1 won't boot 64-bit Windows 10/11 or Ubuntu 20.04+ properly.
- Not downloading the correct ISO (e.g., 32-bit when you need 64-bit). Always match the VM's architecture to the ISO.
- Clicking "Start" before attaching the ISO—the VM boots to a blank screen or "No bootable device" error.
Tips
- Use snapshots (Hyper-V: right-click VM > Checkpoint; VirtualBox: Machine > Take Snapshot) before major changes—this lets you roll back instantly.
- Enable "Enhanced Session Mode" in Hyper-V (Hyper-V Manager > Settings > Server) for better clipboard sharing and display resolution.
- In VirtualBox, install "Guest Additions" after the OS is installed (Devices > Insert Guest Additions CD image) for smooth mouse integration and folder sharing.
- Keep your VM's virtual disk on a different physical drive than your host OS for better performance.
- Use a fixed-size virtual disk if you need speed over space; dynamic disks are slower but more flexible.
Troubleshooting
- Error: "Hyper-V cannot be installed" or "Virtualization is disabled in firmware." Reboot into BIOS/UEFI and enable VT-x/AMD-V. Also, ensure that "Memory Integrity" (in Windows Security > Device Security) is not blocking hypervisor—temporarily disable it if needed.
- VM boots to a black screen. In VirtualBox, try disabling "Enable EFI" (Settings > System > Motherboard) or switch to a different OS type. In Hyper-V, ensure you selected Generation 2 for modern OSes.
- No internet in the VM. In VirtualBox, go to Settings > Network and change "Attached to" from NAT to "Bridged Adapter." In Hyper-V, make sure the VM is connected to the "Default Switch" (right-click VM > Settings > Network Adapter).
- VM is extremely slow. Increase the number of CPU cores (Settings > System > Processor) but leave at least one core for the host. Also, ensure you have enough free RAM.
- Cannot install Guest Additions in VirtualBox. Make sure you're running the VM as a normal user, not in safe mode, and that the ISO is properly mounted. Try downloading the latest VirtualBox version.
Frequently Asked Questions
Can I run a VM on Windows 11 Home?
Yes, but not with Hyper-V. Use VirtualBox or VMware Workstation Player (free for personal use) instead.
How much RAM should I give my VM?
For a Linux desktop, 2-4 GB is enough. For Windows 10/11, give at least 4 GB. Always leave at least 4 GB for your host system.
Will a VM slow down my PC?
Yes, while the VM is running, it uses CPU, RAM, and disk I/O. If you allocate too many resources, your host may become unresponsive. Close the VM when not in use.
Can I run a 32-bit OS in a VM?
Yes, both Hyper-V and VirtualBox support 32-bit guests. In Hyper-V, create a Generation 1 VM. In VirtualBox, choose a 32-bit version from the OS type dropdown.
How do I share files between my host and VM?
In VirtualBox, install Guest Additions and enable a shared folder under Settings > Shared Folders. In Hyper-V, use Enhanced Session Mode or copy-paste through the clipboard.
Is it safe to download a VM from the internet?
Only if it's from a trusted source like the OS vendor or a well-known provider (e.g., Microsoft's Edge Developer VMs). Otherwise, you risk malware. Always scan downloaded ISOs with antivirus.