-
In the Hyper-V Manager window, click on New in the Actions panel on the right.
-
Select Virtual Machine and click Next.
-
Enter a Name for your virtual machine (e.g., "UbuntuVM").
-
Choose a Location to store the virtual machine configuration files (e.g., "C:\VMs").
-
Click Next.
Generation 1 and Generation 2 virtual machines are two different types of virtual machines that can be created in Hyper-V. The main difference between the two is the firmware used to boot the virtual machine.
Generation 1 virtual machines use BIOS (Basic Input/Output System) firmware, which is the traditional firmware used in most physical computers. BIOS firmware is limited in terms of the hardware devices it can support and the security features it provides.
Generation 2 virtual machines, on the other hand, use UEFI (Unified Extensible Firmware Interface) firmware, which is a newer and more advanced firmware that provides better security features and supports newer hardware devices.
I use Gen2 which gives us more features but You can find more information here.
-
select Geneation 2.
-
click Next.
-
Specify the amount of Memory to allocate to the virtual machine (e.g., 4096 MB or 2048MB).
-
Uncheck the "Use Dynamic Memory for this virtual machine".
-
Click Next.
NOTE: If You want to have a virtual machine with GUI(e.g. Desktop Environment) allocate at least 2048 of RAM but if You are planning on setting up linux as server 1024MB would be sufficient.
-
Select the Network to connect the virtual machine to:
-
Not Connected: No network connection.
-
Default Switch: Connect to an internal network using a virtual switch.
-
Other Networks(if you've created before)
-
-
Click Next.
-
Choose to Create a virtual hard disk or Use an existing virtual hard disk.
-
Specify the Name, Location, and Size of the virtual hard disk (e.g., 30 GB).
-
Click Next.
NOTE: Give your virtual machine at least 20GB of space.
-
check "Install an operating system from a bootable CD/DVD-ROM"
-
check "Image file (.iso)" and then give it your iso file.
-
click Next.
- check summary and if everything feels Ok, click finish.
-
right click on the newly created virtual machine and then click on Settings..."
-
Navigate to Security from Hardware section and make sure secure boot is disabled.
-
Navigate to Processor from Hardware section and set the "Number of virtual processors" to at least 2.
NOTE: If You're using this virtual machines as a server, 1 processor would be enough.
-
Navigate to Integration Services from Management section and check all the services.
-
Navigate to Checkpoints from Management section and disable checkpoints.
-
Right click on Your virtual machine and click on "Connect..."
-
Hopefully You will be able to boot from iso file provided before and begin the installation.
NOTE: Don't forget to enable Enhanced Session Mode after installation if you want to use the GUI. Without it, features like audio redirection, display resizing, rendering acceleration, shared clipboard, and more will be disabled.
