Milestone 11 Hyper V - zacharylongo/Tech-Journals GitHub Wiki
- This Journal details my experience and steps taken for Milestone 11 of Hyper V
Windows 2019 Install
-
Firstly, I followed the lab's instructions and used rufus to flash server-2019 onto a USB drive in the class
-
I then signed into my IPMI, navigated to the "Remote Control" tab, selected "iKVM/HTML5" and then pressed the relevant button:
-
After opening my existing super micro server, I pressed f12.
-
Provided my root login:
- Terminated my old VM's:
- I MASHED f11 when this menu came up:
- Booted from general UDisk 5.00
- When windows is ready, this should appear:
- Went through the install normally, making sure to select the 2019 desktop experience.
- Did custom install:
- Deleted old drive partitions. (This could be done by highlighting each partition and selecting delete)
- Installed windows on Drive 1
- Configured credentials. (Save them)
- With a CTRL-ALT-DELETE macro (Top of screen), we are now into our windows server 2019 box:
Post Install
- Said yes to discovery:
- Opened Server Manager. Then went to Network and Adapter Settings:
- Went to Network Connections, then edited the properties of Ethernet 8:
- Selected IPV4 in the dropdown:
-
Set my IP's and gateway accordingly (This will be different for you)
-
Pressed Ok to confirm.
-
Attempt a
ping google.comto verify your connectivity -
If successful, install google chrome (and then chrome remote desktop after)
Powershell command to install chrome:
(New-Object System.Net.WebClient).DownloadFile('https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi','chrome.msi')
.\chrome.msi
- Chrome should now appear in your search bar:
-
I highly advise that you download chrome remote desktop. It can be found at
remotedesktop.google.com -
Clicked the following boxes to add / install CRD:
- Hit add extension
- The installer should be in your downloads folder. Click to install, this is all you need to do to get it working.
Hyper-V install
- Installed Hyper-V with the following
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
-
After install, navigate to Hyper-V using the bottom left search bar behind the windows button.
-
Back in Powershell, set the hostname:
Rename-Computer -NewName "Super9" -Restart
- Once logged back in, go to Hyper-V. From there, select your new machine (Super 9 in my case), right click for the dropdown and click "Virtual Switch Manager"
-
Select "New Virtual Network Switch" and click Create new virtual switch while "external" is selected.
-
The following is my config:
- This is ok:
- Repeat the process, this time selecting internal:
My config. Make sure to click "apply"
- Back in server manager, click remote desktop and enable it.
- Apply and Ok
Nat Switch
- Repeating the same process as earlier (Through Virtual Switch Manager), Create a new internal switch
- Refresh Server Manager and select nat "IPv4 address assinged by DHCP...." under the vEthernet entry for "nat"
- Back in network connections, select the following:
- IPV4 settings as we did earlier, Making sure to set and apply the appropriate addresses.
Windows Admin Center
-
Navigate to the install at https://aka.ms/WACDownload
-
Run the following to start it (or just find and click the .exe)
.\Downloads\WindowsAdminCenter2306.msi
-
Navigated to "https://super9" and logged in.
-
Navigate to Virtual machines. (settings icon, "extensions" , "Virtual machines and switches"
-
Go to all connections and select your box.
-
Navigate to the virtual machines tab:
Format an extra drive!
- I changed mine to Z: for ease of remembrance
- I made mine 75% of the drive and assigned Z
Attempting to create Windows 11
-
I encountered massive issues when duplicating this step for windows 11 (not the firewall). I would get alternating errors saying my system did not meet the standards for windows 11 AND that my drive was corrupted. (Neither were true and I had someone verify this) My steps seemed to work just fine for other environments, just not my own. Therefore I will include my commands!
-
Use admin shell
-
Creating folder structure
mkdir "Z:\ISO"
mkdir "Z:\VM_FILES"
(New-Object System.Net.WebClient).DownloadFile('http://192.168.7.241/isos/pfSense-CE-2.7.0-RELEASE-amd64.iso','F:\ISO\pfsense.iso')
- Created VM
New-VM -Name "fw-super9" -MemoryStartupBytes 2GB -Path "Z:\VM_FILES\fw-super9" -NewVHDPath "Z:\VM_FILES\fw-super10\fw-super9.vhdx" -NewVHDSizeBytes 16GB -Generation 2 -SwitchName "HyperV-WAN"
- Processor Count:
Set-VMProcessor "fw-super9" -Count 2
- Network adapter and its connection to switch:
Add-VMNetworkAdapter -VMName "fw-super9" -Name "LAN-INTERNAL"
Connect-VMNetworkAdapter -VMName "fw-super9" -Name "LAN-INTERNAL" -SwitchName "LAN-INTERNAL"
- PF sense (Firewall) ISO to VM:
Add-VMDvdDrive -VMName "fw-super9" -Path "F:\ISO\pfsense.iso"
- Turning off Secure boot:
Set-VMFirmware -VMName "{VM_NAME}" -EnableSecureBoot Off
- Dictating boot order:
Set-VMFirmware -VMName "fw-super9" -BootOrder $(Get-VMHardDiskDrive -VMName "fw-super9"), $(Get-VMDvdDrive -VMName "fw-super9")
FW Config
-
Start the VM by highlighting it and clicking "start" in hyper-v.
-
Right click it and hit "Connect"
- From here, follow defaults until the following:
- Make sure to select GPT
- Commit
- When Setup begins:
Say no to vlan setup
Select hn0 as WAN
Select hn1 as LAN
Proceed.
-
Enter Option 2 then Option 1 and N to DHCP
-
Set IP
-
Subnet should be 24 bits
-
Set an appropriate Upstream gateway
-
It will be your default gateway
-
Skip IPV6 Setup.
-
Attempt to ping an outside website using the shell (Option 8)
-
Select Option 2 to setup the LAN
-
Say no to DHCP
-
enter your address
-
24 bits
-
Skip Ipv4 upstream for LAN and WAN
-
Say yes to "Configure IPV6 address LAN Interface via DHCP6"
-
No to enable DHCP server on LAN
-
Yes to configure LAN interface via DHCP6
Creating windows 11 VM
-
As stated before, this did not work for me; but easily worked for my colleague who was also working on the assignment at the same time. Be careful to install things in the right directory and follow system standards. More details in submission doc.
-
On windows server download iso from: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/: (Select hyper-V gen 2 option)
-
Extract:
Add-Type -Assembly "System.IO.Compression.Filesystem"
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\Users\Administrator\Downloads\WinDev2311Eval.HyperV.zip","Z:\VM_FILES\WinDev2311Eval")
- Extract Hardrive file from zip:
New-VM -Name "WinDev2311Eval" -MemoryStartupBytes 8GB -Path "Z:\VM_FILES\WinDev2311Eval" -VHDPath "Z:\VM_FILES\WinDev2311Eval\WinDev2311Eval.vhdx" -Generation 2 -SwitchName "LAN-INTERNAL"
Set-VMProcessor "WinDev2311Eval" -Count 2
- Start the VM (where the problems began)
Start-VM "WinDev2311Eval"
- You should be able to access it through the connect tab as you did before.
Alternate Steps
-
Instead, I did this with a windows 7 VM (Yeah I know)
-
Network the box as you would with anything else. Routing its default gateway through your new firewall,
##DHCP
-
From your newly created VM, navigate to 10.0.5.2 (our PFsense)
-
Configure it through the wizard (making sure to name your newly created domain)
-
Go to services and click "DHCP server" From there just fill in the fields.
-
REMEMBER TO HIT SAVE OR YOU WILL LOSE PROGRESS
-
Go back and set your adapter to DHCP <3