-
Notifications
You must be signed in to change notification settings - Fork 3
2. First Domain Controller (In Hyper V)
Richard "Dick" Tracy edited this page Dec 16, 2022
·
3 revisions
The first domain controller will be create in Hyper-V. Ensure the network is setup and working properly; follow [these](HyperV Networking) instructions
- Download a Windows Server 2019 from my visual studio
- Copy Windows Server 2019 Datacenter, and versions 1903, 1909, 2004, and 20H2 - Retail Key to test file
- Open Hyper-V Manager
- In right pane, click Virtual Switch Manager...
- In Virtual Switch Manager window:
- Select New virtual network switch
- Select External, the click create Virtual switch
- Give the virtual switch a name....such as external network
- select the wireless external network
- Click Apply. (this may interrupt internet connectivity for a short bit)
- Expand Hyper-V Manager
- Right click computer name --> New \ Virtual Machine
- Give it a name that reflectsyour lab name (eg. LAB-DC1)
- Generation: 2
- Assign Memory: 4096mb with Dynamic Memory off
- Network: Connect to External network. (the one you created earlier)
- Virtual Hard Disk: 120 GB
- Installation an Operating system from bootable CD/ROM
- Select Image. Browse to the Server 2019 ISO downloaded earlier
- Right click new machine and click Settings
- Navigate to Processor
- Change to 2 processors
- Navigate to Checkpoints
- Uncheck Enable Checkpoints
- Click OK
- Right click new machine and click Connect
- When window opens click the power button or Start
- If prompted to boot from CD click any key. This can be difficult to catch. try pressing Action-->Reset. Then once prompted click Reset, then immediately click within the black window with mouse and then hit any key to start booting from ISO
- When boot to install screen
- Click Next
- Click Install Now
- Type in Serial Key
- Select Windows Server 2019 Datacenter (Desktop Experience)
- Accept EULA
- Click Custom: Install Windows Only
- Highlight the Unallocated space, click next
- The installation can take some time.
- When complete it will ask for local admin password; type in a password
- Done
- Log into new server
- Server manager will launch
- Click Local server on Left
- Click on Computer Name
- On popup click Change.
- Set the name to same as Virtual Machine Name (eg. LAB-DC1)
- Click ok then Reboot Now
- Log back into server
- When server manager launches, Click Manage-->Add Roles and Features
- Under server Roles, check Active Directory Domain Services
- Click Add Features on popup
- Click Next through each window
- Click Install.
- Click Close when complete
- Open Command prompt
- Run command: ipconfig
- Keep command window open
- Run command: ncpa.cpl
- Right click the Network Interface-->properties
- Highlight Internet protocol Version 4 (TCP/IPv4)
- Click Properties
- Select Use the following IP addresses
- Set each entry to what is displayed in command window
- Set Preferred DNS server to Server's IPv4
- In Server Manager, you will see a Flag with a Warning symbol next to it. Click it and select Promote this server to a domain controller
- At the Promote DC screen, Select add a new forest
- Provide a root domain name (Eg. mylab.com)
Must be as full qualified domain (eg. <second level domain>.<top level domain>)
- Make all functional levels are at Windows Server 2016
- Check Domain Name System (DNS) Server
- Check Global Catalog (GC)
- Provide recovery password
- Click all the way through.
During Prerequisites check, there may be warnings. make sure there are not errors though!
This checklist is to be used during the networking configuration. Values that are prefilled in can be used, but they can be changed if needed; make sure you read the comments.
| Name | Values | Comment |
|---|---|---|
| Lab Name | Lab | |
| Domain Name | It is best to create a unique domain | |
| Azure Hub Name | Lab-Hub-Subnet1 | |
| Azure Hub CIDR | 10.10.0.0/16 | |
| Azure Hub Subnet 1 | 10.10.0.0/24 | Specify a space within Hub's CIDR |
| Azure Hub Gateway | 10.10.200.0/26 | Specify a space within Hub's CIDR Subnet but does not conflict with subnet 1 |
| Azure Spoke Name | Lab-Spoke-Subnet1 | |
| Azure Spoke CIDR | 10.20.0.0/16 | |
| Azure Spoke Subnet 1 | 10.20.0.0/24 | Specify space within Spoke's |
| Azure Spoke Subnet 2 | 10.20.1.0/27 | Bastion Subnet |
| Azure VPN ASN Port | 65010 | |
| IPSec Shared Key | This will be generated when setting up VYOS router. | |
| Azure Gateway Public IP | This can be retrieved once a gateway has been created in Azure. | |
| Home Public IP | The home network where the device connected to will be hosting Hyper-V guests, go to: https://ipinfo.io/json . | |
| Hyper-V Subnet 1 | 10.100.1.0/24 | Cannot conflict with Azure subnets |
| Hyper-V Subnet 2 | 10.100.2.0/24 | Cannot conflict with Azure subnet |
| Azure VM: Domain | 10.20.0.1 | Use this to configure Azure |
| Controller IP | subnets internal DNS. If multiple DC's are created, each IP will need to be added. |