Connect with us

Gadgets

How to Install Windows Server 2022 on Hyper-V VM

[ad_1]

Read this guide to learn how to install Windows Server 2022 on a Hyper-V VM, rename the VM’s Windows computer name, and assign it an IP address.

Step 1: Create the Hyper-V VM

Read my guide, How to Create Hyper-V vSwiches, VMs, and vNICs in Windows 11 to learn how to create VM, vSwiche, and vNICs for a Hyper-V VM.

Step 2: Install Windows Server 2022

If you do not have a Windows Server 2022 ISO image, download it before proceeding.

Before installing the OS, connect the vNIC on the VM to the external virtual switch by running this command:

Get-VMNetworkAdapter -VMName IPMviSCSI | Connect-VMNetworkAdapter -SwitchName HPV-vSwitch

Then, follow these steps to install Windows Server 2022 on the VM:

  1. Note the path you saved the Windows Server 2022 ISO image
  2. Then, on the Hyper-V Host, open Hyper-V Manager, right-click the VM, IPMviSCSI, and select Settings.
  3. Then, on the left pane, click SCSI Controller, then DVD Drive > Add.
Install Windows Server 2022 on a Hyper-V VM

The new DVD Drive will be selected.

  1. On the details pane, select Image File and use the Browse button to open the Windows Server 2022 ISO image file – click Apply when you finish but do not close the VM’s Settings.
  1. Select Firmware, then, select DVD Drive and use the “Move up” button to make it the first boot device – click OK to apply the changes and close the VM’s Settings.
Finally, select Firmware, then, select DVD Drive, use the Move up button to make it the first boot device, click OK to apply the changes and close the VM's SettingsFinally, select Firmware, then, select DVD Drive, use the Move up button to make it the first boot device, click OK to apply the changes and close the VM's Settings

Finally, back in the Hyper-V Manager, right-click the VM and select Connect; then, start the VM and install the OS.

Before you start the VM, be ready to click any key to start Windows installation. I like to connect to the VM before I start it so I have enough time to respond to the prompt. Install Windows Server 2022 Standard (Desktop Experience).

Finally, back in the Hyper-V Manager, right-click the VM and select Connect; then, start the VM and install the OSFinally, back in the Hyper-V Manager, right-click the VM and select Connect; then, start the VM and install the OS

When you finish installing the OS, proceed to step 2 below.

Step 3: Rename VM and Assign an IP Address

Start the VM and sign in, then, run the following commands to assign the VM an IP address, rename it, and then restart the VM:

#Assign a static IP address to the VM's NIC

Get-NetAdapter | New-NetIPAddress -IPAddress 192.168.0.154 -PrefixLength 24 -DefaultGateway 192.168.0.1

#Assign the DNS server to the NIC

Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses 192.168.0.80

#Change the computer name of the VM and restart it

Rename-Computer -NewName IPMviSCSI -Restart

When the VM restarts, it may be a good idea to check for updates via the Windows Update Settings.

Conclusion

Installing Windows Server 2022 on a Hyper-V VM is surprisingly less complicated than installing Windows 11 on a Hyper-V VM. For example, the Windows 11 TPM requirements are not needed for Windows Server 2022.

Anyway, I hope you found this guide enlightening! Let me know by responding to the “Was this page helpful?” below. You may also find more articles in our “Related Articles” section below very helpful – why not check them out?

[ad_2]

Victor Ashiedu

Source link