There are two specific configuration options required when creating a new Hyper-V Generation 2 virtual machine to run Debian:
Secure boot must be disabled, as it is not currently supported by Debian; and
Dynamic Memory should be disabled, as the version of Linux Integration Services (LIS) included with Debian does not currently support dynamic memory allocation.
Otherwise, virtual machine sizing (processors, memory, storage, etc) can be as per the Debian System Requirements.
There are two methods of creating a new virtual machine; Hyper-V Manager using a simple wizard-based interface, and Windows PowerShell using an advanced and scriptable command-line interface.
Hyper-V Manager
The following instructions can be used to create a new Hyper-V virtual machine for Debian using Hyper-V Manager.
From the Actions menu in Hyper-V Manager, select New → Virtual Machine. The New Virtual Machine Wizard window will open and the Before You Begin page will be displayed.
Before You Begin
Specify whether you want to Store the virtual machine in a different location.
Click Next. The Specify Generation page will be displayed.
Specify Generation
Select Generation 2 and click Next. The Assign Memory page will be displayed.
Assign Memory
From the Assign Memory page, perform the following actions:
Type a value for Startup memory; and
Deselect Use Dynamic memory for this virtual machine.
Click Next. The Configure Networking page will be displayed.
Configure Networking
Select an External network Connection to provide your virtual machine with Internet access, and click Next. The Connect Virtual Hard Disk page will be displayed.
Connect Virtual Hard Disk
Select Install an operating system from a bootable image file; and
Set the Image file to the location of the Debian installation disc image.
Click Next. The Summary page will be displayed.
Summary
Click Finish. The New Virtual Machine Wizard window will close.
Select the new Debian virtual machine in Hyper-V Manager and open Settings. The Settings window will open.
Select Firmware from the Hardware list. The Firmware options will be displayed.
Firmware: Boot from DVD Drive
Confirm Boot order lists the DVD Drive as the first boot device.
Select Security from the Hardware list. The Security options will be displayed.
Security: Secure Boot disabled
Deselect Enable Secure Boot.
Select Memory from the Hardware list. The Memory options will be displayed.
Memory
Confirm Enable Dynamic Memory is deselected.
Select Processor from the Hardware list. The Processor options will be displayed.
Processor: Virtual Processors
Specify the Number of virtual processors to be used by this virtual machine.
Click OK to accept changes and close the Settings window.
From the Actions menu in Hyper-V Manager, select Start. The Debian virtual machine will enter a Running state.
From the Actions menu in Hyper-V Manager, select Connect. The Virtual Machine Connection window will be displayed.
Windows PowerShell
The following instructions can be used to create a new Hyper-V Virtual Machine for Debian using Windows PowerShell, and are intended for use by advanced users.
Start the Windows PowerShell ISE with elevated privileges (Run as Administrator).
Copy, paste and run the following script from the Windows PowerShell ISE:
[gist]198e2ffd3a0c16a969a85467360e3dee[/gist]
The script will produce output similar to the following: