Milestone11:HyperV - echadbourne/SYS-350 GitHub Wiki
Preparation
Start by creating Windows Server 2019 bootable media with rufus
(This took a long time)
Plug the USB into the server, and power cycle the server (and spam f11)
Select the UEFI USB 2.0 option
Using the windows installer, delete all of the partitions and select the largest drive to install Windows on
Wait for windows to install, set an admin password, and remove the installation media when it reboots
Hyper-V
I had a second storage drive, so I used Disk Management to create a new simple volume and make all the space a storage drive.
I then used the roles and features wizard to install Hyper-V on the server
I used all the defaults and selected the adapter listed as "Ethernet 8" for the first virtual switch, as it was the only one there. I assume this is Eth0, since this is the only one with a connection.
It then asked for a restart, so I did that.
At this point I decided to install Google Chrome and Chrome Remote Desktop so that I can work on this stuff from elsewhere. I figured I should be able to do everything from Chrome Remote Desktop at this point. This involved downloading google chrome from the class file server and running through the chrome remote desktop installer for the 100th time.
I also forgot to change the hostname so I did that and restarted again
Once Hyper-V was installed I could open the Hyper-V Manager, open the virtual switch manager, rename the existing virtual switch, and create two internal virtual switches
WAC
Install WAC with the installer, I left all the defaults. The WAC dashboard can now be accessed at https://localhost:6516/
At first it didn't install properly so I had to uninstall and reinstall Windows Admin Center to be able to access it
Creating a vm
To create a vm I opened up the Hyper-V Manager, and created a new vm. I left all of the settings default, named it pfsense, and attached the first network adapter to the WAN. Once it was created I turned off secure boot, added a virtual processor, and added a second network adapter attached to the Internal LAN. Here is how my settings worked:
I then booted up the vm and assigned the first interface to the WAN and the second interface to the LAN.
Judging by the fact that the assigned WAN ip was via DHCP in the class network, I think I assigned the interfaces correctly. So I then set up DHCP for the LAN with an address range of 10.0.5.100-254, and while I shouldn't need to, pfsense helpfully informed me that I could manage the firewall by going to https://10.0.5.1/ which is the internal IP for the LAN interface.
- The rest of the setup was a pretty basic pfsense setup
Windows 11
Windows 11 was very annoying and I had to find the minimum requirements for a vm through trial and error. I assigned it:
- 8gb of ram (minimum is 4)
- 64+ hard drive space
- In security, turn on TPM
- 2 virtual processors
Then in order to boot into the windows installer I had to let it fail, then press tab + enter and then space to get it to boot to the installer drive. Because it wouldn't recognize my input otherwise.
Apparently your supposed to hold down any key while booting up the vm. Because that makes sense. Helpful resources:
After the installation, during initial setup, the internal network did not seem to be working so I had to set it up on the WAN. I can't troubleshoot the internal network if I don't have a working vm on it, and It seemed pointless to make a whole other vm just to test the internal network, so I decided to finish the Win 11 setup and fix it later.
I also had to disable the internet requirement for setting up win 11. I followed the instructions here but I'll also write them down:
- Once the setup wizard starts, press Shift + F10 to bring up an administrator command prompt
- Type
OOBE\BYPASSNRO - The device will reboot
- Once it's back, bring up a command prompt again and type
ipconfig /releaseto disconnect the internet (Or just unplug it)
At this point I was able to continue the setup without internet, bypassing the need to have it on the WAN, and bypassing the need for a microsoft account.
I used the username "echadbourne" and set the answers to all the security questions as "Administrator" because this vm is going to be deleted by the time anyone tries to get in.