How to Configure a VM on Hyper-V



1. Before creating a Domain Controller, we need a Virtual Machine to host it on Hyper-V. For that, a Server Operating System is required, which in turn requires an .iso file. You can download the .iso file from the  Microsoft Evaluation Center Any Server OS can be used; I chose Windows Server 2019.

Note: This is a trial version that does not require a license and is valid for 180 days.


2. Search for Hyper-V in the Start Menu and select it.




3. There are multiple ways to create a Virtual Machine in Hyper-V:
  1. Click on Action > New > Virtual Machine

  2. Right-click on your computer name in the left pane, then select New > Virtual Machine

  3. Under the Actions pane, click New > Virtual Machine



4. Click Next.


5. Enter a suitable name for your Virtual Machine.

6. If you want to store the Virtual Machine in a different location, you can specify it here. I’m choosing to use the default location.

7. Click Next.


8. Choose the generation for the Virtual Machine. The options are self-explanatory in the screenshot. By default, Generation 2 is selected.

9. Click Next.


10. The minimum requirement for Windows Server 2019 is 2 GB of memory, so I have allocated 4 GB.

11. The option 'Use Dynamic Memory for this virtual machine' is checked by default. 

When enabled, Dynamic Memory allows Hyper-V to automatically adjust the amount of memory (RAM) allocated to the virtual machine based on its actual usage. This means:
  • If the VM needs more RAM, Hyper-V can allocate more (up to a set limit).

  • If the VM uses less, Hyper-V reduces the allocation, freeing memory for other VMs or the host system.

12. Click Next.


13. This step lets you connect your new VM to a virtual switch. The network adapter assigned here determines how the VM communicates with other devices and the internet.

You can choose from existing virtual switches created in Hyper-V Manager:

External: Connects the VM to the physical network (like your LAN or internet).

Internal: Allows communication between VMs and the host only.

Private: Allows communication only between VMs on the same host.

If you don’t assign a network adapter here, your VM will be created without network connectivity (which you can add later).

This step is important for enabling internet access or network communication in your VM.

14. Click Next.



15. This step lets you create or attach a virtual hard disk (VHD or VHDX) that will serve as the storage for your virtual machine. You have three options:

1. Create a virtual hard disk (Default)

  • Hyper-V will create a new .vhdx file for the VM.

  • You can specify:

    • Name of the disk

    • Location where it should be saved

    • Size (e.g., 50 GB or more depending on OS needs)

This is the most commonly used option when you're creating a brand-new VM.

2. Use an existing virtual hard disk

  • Choose this if you already have a pre-configured VHD/VHDX (for example, from another VM or a backup).

  • Useful for cloning VMs or reusing system images.

3. Attach a virtual hard disk later

  • Skip this step if you're planning to configure the storage manually after the VM is created.

  • The VM will have no disk until you add one via settings.

For a typical Windows Server VM, allocate at least 40–50 GB, depending on your use case.

16. Click Next.


17. This final step lets you choose how the operating system (OS) will be installed on the new virtual machine. You have three main options:

1. Install an operating system later

  • No installation media is attached to the VM.

  • The VM will boot to a blank screen (no OS installed).

  • Useful if you want to set up the OS manually later.

2. Install an operating system from a bootable image file (.iso)

  • Select this to install the OS from an ISO file (e.g., Windows Server .iso).

  • You’ll browse and attach the .iso file during this step.

  • When you start the VM, it will boot from the image and launch the OS setup.

This is the most common option for fresh installations.

3. Install an operating system from a bootable CD/DVD-ROM

  • This option is for physical media or mounted virtual drives.

  • It uses the host’s physical CD/DVD drive (rarely used today).

If you're using an .iso downloaded from the Microsoft Evaluation Center, use Option 2.

18. Click Next.


19. Click Finish.


20. Under the Actions tab, select Settings under the Virtual Machine section.



21. In Hyper-V, under the Security tab, there are two options: 'Enable Secure Boot' and 'Enable Trusted Platform Module (TPM)'.

Secure Boot is a UEFI (Unified Extensible Firmware Interface) feature that helps prevent unauthorized code (like rootkits or bootkits) from running during the system's boot process. When you enable Secure Boot on a virtual machine (VM), Hyper-V uses a virtual UEFI firmware that only allows signed, trusted OS bootloaders to execute.

TPM is a hardware-based security component used for encryption, secure storage, and identity verification. It is useful for BitLocker encryption inside the VM. Adds an extra layer of trust and hardware-backed security.

By default, Secure Boot is enabled. You can choose to keep it enabled or disable it, depending on your needs. The same applies to TPM.


22. You can adjust the allocated RAM under the Memory tab according to your requirements.


23. You can adjust the allocated virtual processors under the Processor tab according to your requirements.


24. Under the Network Adapter tab, attach an External switch to the VM. An External switch connects the VM to the physical network, such as your LAN or the internet. In my case, the external switch is named 'New Virtual Switch'; in your case, the name may be different.


25. The Checkpoints tab in Hyper-V allows you to create snapshots of a VM’s current state, enabling easy rollback in case of issues. By default, it is enabled, but I have disabled it.

26. Click Appy, OK.




Comments