How to run Debian on Hyper-V
Please share with your friends...
  • 2
  • 1
  •  
  •  
  • 4
  •  
  •  
  •  
  •  
  •  
    7
    Shares


⇐ BackPageNext ⇒

Create Virtual Machine

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.

  1. From the Actions menu in Hyper-V Manager, select NewVirtual Machine. The New Virtual Machine Wizard window will open and the Before You Begin page will be displayed.
    Hyper-V Manager - New Virtual Machine Wizard - Before You Begin
    Before You Begin
  2. Click Next. The Specify Name and Location page will be displayed.
    Hyper-V Manager - New Virtual Machine Wizard: Specify Name and Location
    Specify Name and Location
  3. From the Specify Name and Location page, perform the following actions:
    1. Type a Name for this virtual machine; and
    2. Specify whether you want to Store the virtual machine in a different location.
  4. Click Next. The Specify Generation page will be displayed.
    Hyper-V Manager - New Virtual Machine Wizard: Specify Generation
    Specify Generation
  5. Select Generation 2 and click Next. The Assign Memory page will be displayed.
    Hyper-V Manager - New Virtual Machine Wizard: Assign Memory
    Assign Memory
  6. From the Assign Memory page, perform the following actions:
    1. Type a value for Startup memory; and
    2. Deselect Use Dynamic memory for this virtual machine.
  7. Click Next. The Configure Networking page will be displayed.
    Hyper-V Manager - New Virtual Machine Wizard: Configure Networking
    Configure Networking
  8. 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.
    Hyper-V Manager - New Virtual Machine Wizard: Connect Virtual Hard Disk
    Connect Virtual Hard Disk
  9. From the Connect Virtual Hard Disk page, perform the following actions:
    1. Select Create a virtual hard disk;
    2. Type a Name for this virtual hard disk;
    3. Set the Location for this virtual hard disk, if not using the default; and
    4. Specify the Size for this virtual hard disk, with a default size of 127 GB.
  10. Click Next. The Installation Options page will be displayed.
    Hyper-V Manager - New Virtual Machine Wizard: Installation Options
    Installation Options
  11. From the Installation Options page, perform the following actions:
    1. Select Install an operating system from a bootable image file; and
    2. Set the Image file to the location of the Debian installation disc image.
  12. Click Next. The Summary page will be displayed.
    Hyper-V Manager - New Virtual Machine Wizard: Summary
    Summary
  13. Click Finish. The New Virtual Machine Wizard window will close.
  14. Select the new Debian virtual machine in Hyper-V Manager and open Settings. The Settings window will open.
  15. Select Firmware from the Hardware list. The Firmware options will be displayed.
    Hyper-V Manager - Settings for Debian - Firmware: Boot from DVD Drive
    Firmware: Boot from DVD Drive
  16. Confirm Boot order lists the DVD Drive as the first boot device.
  17. Select Security from the Hardware list. The Security options will be displayed.
    Hyper-V Manager - Settings for Debian - Security: Secure Boot disabled
    Security: Secure Boot disabled
  18. Deselect Enable Secure Boot.
  19. Select Memory from the Hardware list. The Memory options will be displayed.
    Hyper-V Manager - Settings for Debian - Memory
    Memory
  20. Confirm Enable Dynamic Memory is deselected.
  21. Select Processor from the Hardware list. The Processor options will be displayed.
    Hyper-V Manager - Settings for Debian - Processor: Virtual Processors
    Processor: Virtual Processors
  22. Specify the Number of virtual processors to be used by this virtual machine.
  23. Click OK to accept changes and close the Settings window.
  24. From the Actions menu in Hyper-V Manager, select Start. The Debian virtual machine will enter a Running state.
  25. 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.

  1. Start the Windows PowerShell ISE with elevated privileges (Run as Administrator).
  2. Copy, paste and run the following script from the Windows PowerShell ISE:
    [gist]198e2ffd3a0c16a969a85467360e3dee[/gist] The script will produce output similar to the following:

    ComputerName            : WINDOWS-PC
    Path                    : C:\Hyper-V\Virtual Hard Disks\Debian 8.5.0.vhdx
    VhdFormat               : VHDX
    VhdType                 : Dynamic
    FileSize                : 4194304
    Size                    : 136365211648
    MinimumSize             : 
    LogicalSectorSize       : 512
    PhysicalSectorSize      : 4096
    BlockSize               : 1048576
    ParentPath              : 
    DiskIdentifier          : 00000000-0000-0000-0000-000000000000
    FragmentationPercentage : 0
    Alignment               : 1
    Attached                : False
    DiskNumber              : 
    Number                  : 
    
    Name             : Debian 8.5.0
    State            : Off
    CpuUsage         : 0
    MemoryAssigned   : 0
    MemoryDemand     : 0
    MemoryStatus     : 
    Uptime           : 00:00:00
    Status           : Operating normally
    ReplicationState : Disabled
    Generation       : 2
  3. Start the Debian Virtual Machine, using the following command:
    Start-VM -Name $VM_Name

    The Debian virtual machine will enter a Running state.

  4. Open the Virtual Machine Connection console, using the following command:
    vmconnect $env:COMPUTERNAME $VM_Name

    The Virtual Machine Connection window will be displayed.

⇐ BackPageNext ⇒

How to run Debian on Hyper-V

Please share with your friends...
  • 2
  • 1
  •  
  •  
  • 4
  •  
  •  
  •  
  •  
  •  
    7
    Shares
Tagged on:                             

Leave a Reply

Your email address will not be published. Required fields are marked *