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
- Open PowerShell as Administrator and run:
1
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -NoRestart
- Restart your system to apply changes.
- After reboot, search for Hyper-V Manager in the Start Menu and open it.
Creating a Virtual Machine for Ubuntu Server
- In Hyper-V Manager, click New > Virtual Machine.
- Set a name (e.g., “UbuntuServer”) and choose Generation 2.
- Assign at least 2GB RAM (4GB+ recommended).
- Select “Use Dynamic Memory” to optimize resource allocation.
- Create a Virtual Hard Disk (20GB minimum).
- Under Installation Options, select Install an operating system from a bootable image file and choose your Ubuntu Server ISO.
Installing Ubuntu Server
- Start the VM and boot from the Ubuntu ISO.
- 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).
- Finish the installation and reboot.
Post-Installation Configuration
- Install Hyper-V Integration Services (for better performance):
1
sudo apt update && sudo apt install linux-virtual linux-cloud-tools-virtual
- 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.