Tech

How to install Windows Server 2022 via rescue on Hetzner server?

Installing Windows Server 2022 on a Hetzner server without KVM access

Step 1: Go to the Microsoft download page and get the link for the Windows Server 2022 ISO image.

Step 2: Put your server in rescue mode and SSH into it using Putty.

Step 3: Download the ISO image using the wget command. For example:

wget https://url.com/server_image.iso

Step 4: Enable VNC access by typing the following command. Replace SERVER_EVAL_x64FRE_en-us.iso with the actual file name of the ISO image:

qemu-system-x86_64 -net nic -net user,hostfwd=tcp::3389-:3389 -m 10000M -enable-kvm -cpu host,+nx -smp 2 -k en-us -cdrom SERVER_EVAL_x64FRE_en-us.iso -drive file=/dev/nvme0n1,format=raw,media=disk -vnc :1 -boot d

Step 5: Download a VNC viewer and connect to your server using its IP address followed by ::1. For example, if your server’s IP address is 192.168.1.100, you would connect to 192.168.1.100::1.

Step 6: You can now install Windows Server 2022 on your Hetzner server.

Step 7: Once installed, disconnect from VNC and use the reboot command in the rescue SSH session to boot the server.

Additional notes:

  • The qemu-system-x86_64 command creates a virtual machine that runs the Windows Server 2022 installation media.
  • The -net nic and -net user,hostfwd=tcp::3389-:3389 options configure the virtual machine to have a network connection and to forward VNC traffic from the host machine to the virtual machine.
  • The -m 10000M option allocates 10 GB of RAM to the virtual machine.
  • The -enable-kvm option enables KVM support.
  • The -cpu core2duo,+nx option configures the virtual machine to use a Core 2 Duo CPU with NX support.
  • The -smp 2 option configures the virtual machine to have 2 CPUs.
  • The -k en-us option configures the virtual machine to use the US English keyboard layout.
  • The -cdrom SERVER_EVAL_x64FRE_en-us.iso option configures the virtual machine to use the Windows Server 2022 ISO image as its installation media.
  • The -drive file=/dev/nvme0n1,format=raw,media=disk option configures the virtual machine to use the first NVMe drive on the host machine as its storage device.
  • The -vnc :1 option enables VNC access on the first VNC display.
  • The -boot d option configures the virtual machine to boot from the CDROM drive.

Once you have completed the steps above, you will be able to install Windows Server 2022 on your Hetzner server without having to request KVM access.

UEFI: qemu-system-x86_64 -net nic -net user,hostfwd=tcp::3389-:3389 -m 10000M -enable-kvm -cpu host,+nx -smp 2 -k en-us -cdrom SERVER_EVAL_x64FRE_en-us.iso -drive file=/dev/nvme0n1,format=raw,media=disk -vnc :1 -boot d -bios /usr/share/ovmf/OVMF.fd

Leave a Reply

Your email address will not be published. Required fields are marked *