Overview
This is the fourth post in a multi-part series that illustrates how to customize the Windows installer media to automate the process of installing a Windows AD domain controller, a Windows file server, and a Windows desktop environment. This article details the process for implementing a Linux router VM to provide internet access to the AD Lab.
Hyper-V natively provides network address translation (“NAT”) but implementing this Linux router allows for future revisions of the AD Lab to implement advanced concepts like multiple subnets.
- Introduction
- Architecture
- Prerequisites
- Create the Virtual Machines
- Customize the Windows installer ISOs
- Install the Linux Router
- Install the Windows Systems
- Conclusion
Create the Virtual Machines
Use these steps to create four virtual machines. Open Hyper-V Manager and click New > Virtual Machine:
Specify Name and Location
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-01-1024x775.png)
VM | Name |
Router | AD Lab 01 router.contoso.com |
DC | AD Lab 02 dc.contoso.com |
Server | AD Lab 03 server.contoso.com |
Client | AD Lab 04 client.contoso.com |
Specify Generation
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-02-1024x775.png)
All VMS: select Generation 2.
Assign Memory
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-03-1024x775.png)
VM | Startup memory |
Router | 1024 |
DC | 2048 |
Server | 2048 |
Client | 4096 |
Configure Networking
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-04-1024x775.png)
VM | Connection |
Router | AD Lab External |
DC | AD Lab Private |
Server | AD Lab Private |
Client | AD Lab Private |
Connect Virtual Hard Disk
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-05-1024x775.png)
All VMs: accept the default Name and Location, and set size as follows:
VM | Size |
Router | 64 |
DC | 128 |
Server | 128 |
Client | 128 |
Installation Options
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-06-1024x775.png)
VM | option | Image file (.iso) |
---|---|---|
Router | Install an operating system from a bootable image file | AlmaLinux-9.5-x86_64-minimal.iso |
DC | Install an operating system later | NA |
Server | Install an operating system later | NA |
Client | Install an operating system later | NA |
Edit the Hyper-V Virtual Machine Settings
Use these steps to edit the virtual machines. Open Hyper-V Manager, select a VM, and click Settings:
Security
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-07-1024x975.png)
VM | Template | Enable Trusted Platform Module |
---|---|---|
Router | Microsoft UEFI Certificate Authority | No |
DC | Microsoft Windows | Yes |
Server | Microsoft Windows | Yes |
Client | Microsoft Windows | Yes |
Memory
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-08-1024x975.png)
VM | Maximum RAM | Memory buffer |
Router | 1024 | 5% |
DC | 2048 | 5% |
Server | 2048 | 5% |
Client | 4096 | 5% |
Integration Services
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-09-1024x975.png)
All VMs: check Guest services.
Checkpoints
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-10-1024x975.png)
All VMs: uncheck Enable checkpoints.
Automatic Start Action
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-11-1024x975.png)
All VMs: select Nothing.
Automatic Stop Action
![](https://onezeroone.dev/wp-content/uploads/2025/02/Hyper-V-Manager-12-1024x975.png)
All VMs: Select Shut down the guest operating system.