1. Home
  2. Windows Tips
  3. Run debian server on windows server with hyper v

Run Debian server on Windows Server with Hyper-V

Do you need to run Debian Linux in a VM on your Windows Server? Unsure how to set it up? We can help! Follow along as we show you how to deploy a Debian server on Windows Server.

Before we begin

This guide requires having Hyper-V configured on your Windows Server. To configure Hyper-V on Windows Server, ensure you’re running the “Desktop Experience”. Then, launch the Server Manager application.

Once inside the Server Manager app, find the “add roles and features” option, and select it. Locate “Hyper-V, and check the box next to it to enable the feature. You’ll need to reboot your Windows Server after the feature is enabled.

How to create a Debian VM in Hyper-V

To install Debian in Hyper-V, launch the Hyper-V app on Windows Server. Then, follow the step-by-step instructions below.

  1. Inside the Hyper-V app, find the sidebar. Then, right-click on your server in the sidebar. After right-clicking on your server, select “New” in the menu. Inside “New,” find “Virtual Machine,” and select it with the mouse to start creating a new VM.
  2. After selecting the “Virtual Machine” button, a “New Virtual Machine Wizard” window will appear. Read the “Before You Begin” brief, to understand what the Hyper-V wizard will do. When you’re done reading it, click on the “Next” button to move to the next page.
  3. On the Next page, you must choose your VM’s name and location. In the “Name” box, enter “Debian” in the box, denoting that your new VM should be called Debian. Then, choose where the VM should be stored, or leave it at the default, and click “Next”.
  4. You now must choose what generation of VM you will use with Hyper-V. Generation 1 supports 32-bit and 64-bit, but doesn’t support UEFI. Generation 2 does. Choose the generation that suits your needs best. Then, select “Next” to move to the next page.
  5. You’ll now need to assign an amount of memory to your Hyper-V VM. By default, 1024 MB is assigned. If you feel that is enough memory, leave it as is. Otherwise, change the memory to suit your needs. Click “Next” when done to move to the next page.
  6. Following RAM, you’ll have to configure VM networking. To do this, select a virtual switch in the drop-down menu. After selecting your virtual switch, find the “Next” button, and click on it with the mouse to move to the next page.
  7. After configuring networking for the VM, you’ll need to connect to a virtual hard disk. In the “Size” box, specify the disk size, and configure the other options to meet your needs. When done, click “Next.”
  8. Following configuring the hard drive, you must specify the operating system you’d like to install. As we are installing Debian in Hyper-V, head over to Debian.org, and download the latest stable release. After downloading the ISO to Windows Server, select “Install an operating system from a bootable CD/DVD-ROM” and select the Debian ISO.
  9. After adding the Debian ISO, click the “Next” button. When you select “Next,” you’ll see a summary of what Hyper-V will do. Read the summary. Then, click the “Finish” button to finish creating your VM.

How to install Debian in Hyper-V

Now that you’ve created your Debian VM in Hyper-V, find it under “Virtual Machines,” right-click, and select the “Start” button. Selecting “Start” will turn on the Debian VM. After selecting “Start” click “Connect” to open up a display.

In the Debian boot menu, choose “Graphical Install” to load up the Debian graphical installer. After selecting “Graphical Install” you’ll need to select a language. Using the UI, choose your preferred language. Click “Continue” when done.

Upon choosing your language, select your country in the menu. Selecting your location will make it easier for Debian to configure mirrors and your time zone.. When done, click “Continue”.

On the next page, you must choose a keyboard layout. Choose one from the list, and click “Continue.” After selecting the “Continue” button, the Debian installer will detect your system, configure networking, etc.

Once Debian is done detecting your system and configuring things like networking, you’ll be asked to configure a hostname for the Debian system. Enter a hostname that suits your needs, then click the “Continue” button.

After setting the hostname, you’ll need to set the domain name, username, root password, etc. Using the UI, configure everything. Click “Continue” when done to move on in the installer.

With your username, domain name, root password, and everything configured. Debian will ask you to configure the disk for installation. As this is a VM, choose “Guided – use entire disk” and click “Continue” to move to the next page.

Once you’ve configured partitioning, Debian will install the base system to the Hyper-V virtual disk. When the base system is installed, you’ll be taken to the “package” selection area.

In the package selection area, choose “Web server” if you plan to use Debian as a web server. If you need a GUI for your Debian server, choose one of the available desktop environments. When you’ve made your choices, click “Continue” to install the packages.

After installing the packages in Debian, the installer will be complete. Reboot your Debian Hyper-V VM to start using it.