How to Install a Linux Virtual Machine on Microsoft Hyper-V

Virtualization is a great way to do things such as test out new software, experiment with custom computer configurations, learn networking or even learn how to use a new operating system.  It allows you to create complete standalone virtual computers (virtual machines) that act independently of the host computer (running Hyper-V), even though the virtual machines share the hardware of the host.

Video - How to Install a Linux Virtual Machine on Microsoft Hyper-V

Watch Video: How to Install a Linux Virtual Machine on Microsoft Hyper-V.

If you have been using Windows as your main operating system, you might want to try out Linux to see how it works and you might even find that you prefer it over Windows itself! Linux is a free to use open source operating system that comes in many versions, or flavors as they are commonly referred to. This means you can install any version of Linux you like as a virtual machine on a Hyper-V host.

In this article, we will be showing you how to install a Linux virtual machine on Microsoft Hyper-V. In order to use Hyper-V, you will need to be running a Windows Server operating system or a Windows Professional desktop OS such as Windows 11 Pro. You can run Hyper-V on a Windows Home version computer by following the steps outlined in this video.

Once you have Hyper-V up and running on your host computer, you can start the process to create a new virtual machine (VM). We will be installing Ubuntu Linux since its very user friendly and has a nice graphical user interface (GUI). You can download Ubuntu here.

With the Hyper-V host selected on the left pane you can go to the Action menu and choose New > Virtual Machine. You will then see an introduction screen but on the Specify Name and Location screen you can enter the name you want to use for your new virtual machine. This name will only be used in Hyper-V and will not be the hostname of the VM itself.

Hyper-V will use your default storage location for this new VM, but you can change it if you want to place the virtual machine files elsewhere. You might want to create a folder with the name of the VM in the location box, so it doesn’t get mixed in with your other virtual machines.

How to Install a Linux Virtual Machine on Microsoft Hyper-V

On the next screen you will need to choose which VM Generation to use with your new virtual machine. We recommend Generation 1 to avoid compatibility issues.

How to Install a Linux Virtual Machine on Microsoft Hyper-V

On the next screen you can choose how much RAM you want assigned to your virtual machine. Linux does not require as much RAM as Windows does so you can get away with 4GB and be just fine. Or if your host has a lot of RAM, you can increase this number if desired.

You can also leave the Use Dynamic Memory for this virtual machine box checked. This allows virtual machines to dynamically adjust their memory allocation based on workload demands. When this option is enabled, Hyper-V allocates memory to the virtual machine as needed, increasing or decreasing it within specified limits. This helps optimize memory usage across multiple virtual machines by allowing unused memory to be reclaimed and allocated to other virtual machines when necessary.

How to Install a Linux Virtual Machine on Microsoft Hyper-V

If you have not made any changes to your networking configuration, you can choose the Default Switch in the networking step. This will allow your VM to access the internet via the connection on the host computer running Hyper-V.

How to Install a Linux Virtual Machine on Microsoft Hyper-V

On the next step, you will need to create a new virtual disk (hard drive for the VM). Hyper-V will name this virtual disk based on the name of the VM itself.  You can then decide where to store this virtual disk and may want to store it in the same folder you used for the virtual machine files.

If you do not want to use the recommended disk size that Hyper-V suggests, you can change the number to make the virtual disk smaller or larger. Just be sure not to go too small, otherwise there might not be enough room to install Linux or any apps after Linux is installed. Ubuntu recommends 25 GB of free hard drive space.

How to Install a Linux Virtual Machine on Microsoft Hyper-V

For the Installation Options step, you will need to tell Hyper-V where you have the Linux ISO file downloaded so it knows where to boot from when you start the VM for the first time.

How to Install a Linux Virtual Machine on Microsoft Hyper-V

The final screen will show you a summary of your virtual machine’s configuration and if everything looks good, you can click on Finish.

How to Install a Linux Virtual Machine on Microsoft Hyper-V

Now you will have your new Linux virtual machine shown in your Hyper-V inventory along with any other VMs you had previously configured.

Hyper-V Manager

Now you can simply double click the VMs name and then click on Start. The following steps will vary depending on what version of Linux you are installing but we will go through the steps required to install Ubuntu.

For the first screen, you will need to choose the Try or Install Ubuntu option.

Try or Install Ubuntu option

Next, you will need to choose your language and then choose the Install Ubuntu option. The Try Ubuntu option is used to run Ubuntu in memory without installing it. This is a good way to quicky see how it looks but anything you change in this mode will not be saved when you shut down the VM.

Try or Install Ubuntu Linux

Then you will need to choose your keyboard\country layout which should be correct by default.

The next screen allows you to choose which type of installation you want to use. If you really want to see all that Ubuntu has to offer, you should choose the Normal installation option.  You can also have it download any updates while installing so you do not need to do it after the installation is complete even though there is a good chance you will need to do more updates relatively soon.

Ubuntu Linux Normal installation

The next screen is where you can view or edit how Linux will partition your virtual disk. If you are new to Linux, you should go with the first option which will erase the virtual disk which is blank to begin with and then create all the needed partitions for you.

Ubuntu Create Partitions

You will then be shown a summary of what will be created and then you just need to click on the Continue button.

Ubuntu Linux Write Changes to Disk

Then you will need to choose your time zone if Linux has not chosen the correct one for you.

For the who are you section, you can type in the username you wish to use for your Linux VM as well as a computer name to go along with it. You will also need to come up with a password that will be used for logging into your VM. You can however choose the option to log in automatically so you will not need to type your password each time.

Ubuntu Create Username and Password

The installer will then continue to copy files to the virtual hard disk and when everything is complete, you will have your new Linux virtual machine ready to go.

Ubuntu Desktop

For additional training resources, check out our online training courses.

Related Posts

© 2024 Online Computer Tips
Website by Anvil Zephyr