Post

Setting Up Hyper-V and Installing Ubuntu Server – The Right Way

Step-by-step guide to setting up Hyper-V on Windows and installing Ubuntu Server for a virtualized Linux environment.

Setting Up Hyper-V and Installing Ubuntu Server – The Right Way

Running Ubuntu Server on Hyper-V turns any Windows machine into a flexible, virtualized environment. This guide covers setting up Hyper-V, installing Ubuntu Server, and configuring it for optimal performance.

Prerequisites

  • Windows 10/11 Pro or Enterprise (Hyper-V is not available on Home editions)
  • 64-bit processor with virtualization enabled (check BIOS/UEFI settings)
  • At least 8GB RAM (16GB+ recommended for better VM performance)
  • Ubuntu Server ISO (Download Here)

Enabling Hyper-V on Windows

  1. Open PowerShell as Administrator and run:
    1
    
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -NoRestart
    
  2. Restart your system to apply changes.
  3. After reboot, search for Hyper-V Manager in the Start Menu and open it.

Creating a Virtual Machine for Ubuntu Server

  1. In Hyper-V Manager, click New > Virtual Machine.
  2. Set a name (e.g., “UbuntuServer”) and choose Generation 2.
  3. Assign at least 2GB RAM (4GB+ recommended).
  4. Select “Use Dynamic Memory” to optimize resource allocation.
  5. Create a Virtual Hard Disk (20GB minimum).
  6. Under Installation Options, select Install an operating system from a bootable image file and choose your Ubuntu Server ISO.

Installing Ubuntu Server

  1. Start the VM and boot from the Ubuntu ISO.
  2. Follow the installation wizard:
    • Select language, time zone, and keyboard layout.
    • Configure network settings.
    • Partition the disk (guided install recommended).
    • Set up a user account and hostname.
    • Choose any optional features (OpenSSH recommended for remote access).
  3. Finish the installation and reboot.

Post-Installation Configuration

  1. Install Hyper-V Integration Services (for better performance):
    1
    
    sudo apt update && sudo apt install linux-virtual linux-cloud-tools-virtual
    
  2. Enable Remote SSH Access:
    1
    
    sudo systemctl enable --now ssh
    

Your Ubuntu Server is now running on Hyper-V, ready for use.

This post is licensed under CC BY 4.0 by the author.