OSDeploy | Sune Thomsen
TwitterLinkedInWindows 365 CommunityMVP ProfileGitHub
  • Home
  • Blog
    • Microsoft Intune
      • How to migrate BitLocker key(s) from all fixed drives to Microsoft Entra ID.
      • Migrate Bitlocker Recovery Key(s) to Azure AD with Proactive Remediation
      • Migrate imported GPOs to Intune with Group Policy analytics (preview)
      • Group Policy analytics (preview) made a bit easier with PowerShell
      • Analyze on-premises GPOs with MEM Group Policy Analytics (preview)
    • Virtual Machine
      • Fix the Hyper-V virtual switches after updating to Windows 11 (22H2)
    • 🆕Windows 365
      • 🆕Windows 365 Boot: Why User-Driven Mode?
      • 🆕Enhancing Security With Intune MAM (preview) for Windows 365
      • The Concept of Windows 365 Switch
      • The Concept of Windows 365 Boot
      • The Concept of Windows 365 Frontline
      • Move Cloud PCs to a new Azure Region or Azure Network Connection
      • Windows 365 End-User Experience (Tips & Tricks) – Part 4. Windows 365 app and Cloud PC reporting
      • Windows 365 End-User Experience (Tips & Tricks) – Part 3. Multimedia Redirection
      • Windows 365 End-User Experience (Tips & Tricks) – Part 2. Teams Optimization, SSO, and Localization
      • Windows 365 End-User Experience (Tips & Tricks) – Part 1. Connection experience
      • How to Configure Windows 365 Azure AD Join Single Sign-on (SSO)
      • Keep Windows 365 current and stay current with Windows Autopatch
      • Provide the end-users with a localized Windows 365 Cloud PC experience
      • How to configure Windows 365 Enterprise Azure AD join
      • How to secure Windows 365 using a FIDO2 security key
      • Prevent sensitive information from being captured on Windows 365 CPCs
      • Manage local administrator rights on Windows 365 Cloud PCs.
      • How to create a custom image for Windows 365 Enterprise Cloud PCs
      • How to reprovision existing Cloud PC (Windows 365) to Windows 11
      • How to configure Windows 365 Enterprise in Microsoft Endpoint Manager
  • Archive
    • Deployment
      • OSDCloud: The ZTI Way
      • OSDBuilder: WinPE Customization
    • Microsoft Configuration Manager
      • ConfigMgr: Run "All" Client Actions During OSD
      • ConfigMgr: WIM Your Applications Like a Boss
      • ConfigMgr: Deploy UWP Applications During OSD
      • ConfigMgr: Building a Basic LAB Environment
        • Part 1 - Installing Windows 10 (1909) on the Host
        • Part 2 - The Host and Hyper-V Configuration
        • Part 3 - Setting up the Domain Controller
          • Active Directory
          • DHCP
          • DNS
        • Part 4 - Setting up Microsoft Endpoint Configuration Manager
          • Prerequisites
          • SQL
        • Part 5 - Setting up Discovery Methods and Boundaries
        • Part 6 - Setting up Software Update Point
      • ConfigMgr: Splash Screen for Driver and BIOS Update
      • ConfigMgr: Global Conditions for Dell WD15 Dock Detection
    • Microsoft Intune
      • Block personally owned devices in Intune with enrollment restrictions
      • Remove Windows 10 built-in apps with Intune & Microsoft Store for Business Apps
    • Windows
      • Win10: Multi-Language Toast Notifications
        • Toast Notification: Low Disk Space
  • Links
    • Blogs
    • Microsoft
    • Scripts
Powered by GitBook
On this page
  • BEFORE YOU BEGIN
  • HOST CONFIGURATION
  • Windows Update
  • Windows Features
  • HYPER-V CONFIGURATION
  • Hyper-V NAT Virtual Switch
  • Hyper-V Manager

Was this helpful?

  1. Archive
  2. Microsoft Configuration Manager
  3. ConfigMgr: Building a Basic LAB Environment

Part 2 - The Host and Hyper-V Configuration

04-12-2020 5:39 PM

PreviousPart 1 - Installing Windows 10 (1909) on the HostNextPart 3 - Setting up the Domain Controller

Last updated 5 years ago

Was this helpful?

BEFORE YOU BEGIN

Disclaimer: All information and content in these blog posts is provided without any warranty whatsoever. The entire risk of using this information or executing the provided content remains with you. Under no circumstances should Microsoft, its author, or anyone else involved in the creation of these blog posts be held liable for any damage or data loss.

HOST CONFIGURATION

In my previous blog post I did a quick hardware configuration walk-through and installed Windows 10 on my host. In Part 2, I will walk you through the Hyper-V configuration and build a Virtual Machine for my Domain Controller (DC) where we in will be setting up Active Directory, DHCP, and DNS.

After finishing the Windows 10 installation the first thing I want to do is change the computer name to eg. OSDSUNE-LAB-01 and then check for Windows Updates. Since my Windows 10 image is offline serviced every month, Windows Updates won't find anything exciting!

If you don't offline servicing your Windows 10 image, my recommendation is that you run Windows Updates and get the latest cumulative and other updates installed before moving forward with the configuration.

Windows Update

Log into the host we created in .

Step 1. Type "Check for updates" in the search line next to the start button, and click "Check for updates"

Step 2. Click "Check for updates" and wait.

Step 3. After a few seconds it should start downloading and install required updates for the host.

Step 4. When it's done, reboot the host.

Windows Features

After a reboot, log into the host again and we will now be adding the Hyper-V feature role to the host.

Step 1. In the search line, type "Add features" and click "Turn Windows features on or off"

Step 2. Check the "Hyper-V" box and click "OK"

Step 3. Click "Restart now"

Step 4. After a reboot, log into the host and check for Windows Updates once again. In the search line, type "Check for updates" and click "Check for updates". The reason for this is that since we have add a new feature to Windows it need to re-apply the cumulative update in order for the feature to function correct.

Step 5. As mentioned it will re-apply the latest cumulative update. (And yes I has gone to the dark side...) reboot the host when it's done.

HYPER-V CONFIGURATION

After a reboot, log into the host again and we will start setting up the Hyper-V role.

WHAT IS HYPER-V?

Hyper-V is Microsoft's Hypervisor, which give you the ability to run Virtual Machines (Guests) on a Physical Machine (Host).

Hyper-V was introduced back in 2008, a lot has happened since then, and today Hyper-V is a great alternative to other Virtualization Technologies from eg. VMware and Citrix.

Hyper-V NAT Virtual Switch

I will be using Windows PowerShell to create a Virtual Switch that uses Network Address Translation (NAT), this will keep the LAB environment separate from the rest of the network, but still provide internet access to the Virtual Machines.

Step 1. Open Windows PowerShell in Administrator elevated mode.

Step 2. To create the Virtual Switch run the below New-VMSwitch command.

New-VMSwitch -SwitchName "NAT Switch" -SwitchType Internal

Step 3. The below New-NetIPAddress command, assigns an IP address to the Virtual NIC. Which also will be the default gateway IP address for the NAT Network that we are creating.

New-NetIPAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NAT Switch)"

Step 4. The below New-NetNAT command assigns a private range of IP addresses that the Virtual Machines will use on the Virtual Switch we have just created.

New-NetNAT -Name "NAT Network" -InternalIPInterfaceAddressPrefix 192.168.0.0/24

Hyper-V Manager

Now that we have configured the Virtual Switch, it's time to launch the Hyper-V Manager and configure a Virtual Machine for the Domain Controller.

Step 1. In the search line, type "Hyper-V" and click "Hyper-V Manager"

Step 2. Right-click on the Hyper-V Server and click "Hyper-V Settings..."

Step 3. You don't have to perform this step, but by habit I like to change the default path for Virtual Hard Disks and Virtual Machines. Leave the rest as default and click "OK"

Step 4. Open File Explorer and go to "C:\Hyper-V", confirm that the folders has been created.

Step 5. Right-click on the Hyper-V Server again, but this time you click "New" and then "Virtual Machine..."

Step 6. Click "Next"

Step 7. Enter a name for the Virtual Machine (DC) and leave "Location" as default and click "Next"

Step 8. Select "Generation 2" and click "Next"

Step 9. Type in the amount of memory (RAM) you want to dedicate to the Virtual Machine (I'll give a DC server, 4 GB of memory). Uncheck "Use Dynamic Memory for this virtual machine" and click "Next"

Step 10. Now select the newly created "NAT Switch" from the drop-down menu and click "Next"

Step 11. Select "Create a virtual hard disk" and enter a name (DC.vhdx). Leave the "Location" and "Size" as default and click "Next"

Step 12. Select "Install an operating system from a bootable image file". Enter a path or browse to the "Windows Server 2019" ISO file and click "Next"

Step 13. Review the settings and click "Finish" to create the Virtual Machine.

Step 14. We should now see a new Virtual Machine in the Hyper-V Manager.

Step 15. Right-click on the Virtual Machine and then click "Connect"

Step 16. Select "File" and click "Settings..." or click Ctrl+O to enter the settings for the Virtual Machine.

Step 17. Select "Processor" and change the "Number of virtual processors" to at least 2 and click "OK"

Step 18. Now click "Start"

I will not be diving deep into the details about Virtual Switch or NAT, so please read this excellent on this topic by if you need more information.

We have now create a NAT Virtual Switch that will keep the LAB environment separate from the rest of the network, but still provide internet access to the Virtual Machines - Now That's Awesome!

Step 19. Windows Server 2019 are now ready to be installed on the Virtual Machine in .

And that's it, folks! This should conclude the host and Hyper-V configuration. In I will walk you through the installation of Windows Server 2019 on my Domain Controller and we will be setting up a basic Active Directory, DHCP, and DNS configuration.

If you have any questions regarding this topic, feel free to reach out to me. I am most active on !

😎
blog
Aidan Finn
Part 3
Part 3
Twitter
Part 1
Part 3
Part 1
Windows 10 (1909) - Windows Update
Windows 10 (1909) - Windows Update
Windows 10 (1909) - Windows Update
Windows 10 (1909) - Add Feature
Windows 10 (1909) - Add Feature
Windows 10 (1909) - Add Feature
Windows 10 (1909) - Windows Update
Windows 10 (1909) - Windows Update
PowerShell - NAT Virtual Switch
PowerShell - NAT Virtual Switch
PowerShell - NAT Virtual Switch
PowerShell - NAT Virtual Switch
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows 10 (1909) - Hyper-V Manager
Windows Server 2019 - Installation