Installing Linux Hyper-V VM
How to create a Hyper-V VM for Ubuntu
- Download Ubuntu ISO.
- Right-click the server in Server Manager then select Hyper-V Manager from the context menu.
- Select the server.
- Select the action New > Virtual Machine.
- Enter the Name and Location.
- Enter the Generation as Generation 1.
- Assign Memory, which should be at least 12288MB.
- Disable the use of Dynamic memory.
- For the Connection, choose Virtual Switch with internet connection/local network access.
- For the Connect Virtual Hard Disk, make sure that the size meets the requirements.
- For the Installation Options, install on an operating system from a bootable CD/DEV-ROM Image File (
.iso). Use the downloaded Ubuntu ISO.
How to install Ubuntu on a VM
- Double-click on a created Hyper-V VM.
- Turn on the VM.
- Select a language.
- Select the keyboard layout.
- Enter the network connection details (use DHCP or Manual).
- Click Done until you get to the Storage Configuration screen.
-
Choose the Installation Type to be Custom Storage layout.
- Highlight the local disk device, press Enter and select Add GPT Partition.
- Set the Size to 2x the amount of RAM allocated for the VM (at least 24576MB).
- Set the Format to Swap.
- Click Create.
To add another partition:
- Set the Size to the maximum that is remaining.
- Set the Format to Ext4.
- Set the Mount Point to '/'.
- Click Done then Continue.
- Enter your account name, username, computer name and password.
- Select to Install OpenSSH Server.
- Do not install any Snap applications.
- Wait for the installation to finish then reboot the VM, as needed.
- Once the VM has restarted, go to install the Linux Server.