Windows on Hetzner dedicated server without usb stick / KVM console

Windows on Hetzner dedicated server without usb stick / KVM console

Hetzner lately decided to refuse usb sticks with an unlicensed version of windows to be used as install mediums. We are going to take a look at a workaround that doesn't need the presence of an usb stick or Lantronix KVM console


1. We have to boot our server into rescue. You can do that by logging into the hetzner robot:

2. Let the server reset automatically.

3. Grab your windows downloadable iso link. You can also get these from Hetzner directly:

Windows Server CORE 2016
Windows Server CORE 2019
Windows Server CORE 2022

If we want to download it on the server we have to replace download.hetzner.com with mirror.hetzner.de in the URLs.

4. I will use Windows Server 2019 in this example. Download the ISO to your server:

wget -O windows.iso http://mirror.hetzner.de/bootimages/windows/SW_DVD9_Win_Server_STD_CORE_2019_1809.11_64Bit_English_DC_STD_MLF_X22-51041.ISO

5. Download the latest version of virtio tools as well. This is nessearry to be able to detect the disks.

wget -O virtio.iso https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso

6. Start qemu / vnc with both iso's and disks attached.

printf "change vnc password\n%s\n" "CH4NGE-M3" | qemu-system-x86_64 -enable-kvm -cpu host -smp 4 -m 4096 -boot d -cdrom ./windows.iso -drive file=/dev/nvme0n1,format=raw,media=disk,if=virtio -drive file=/dev/nvme1n1,format=raw,media=disk,if=virtio -drive file=virtio.iso,if=ide,media=cdrom -vnc :0,password -monitor stdio

7. Connect to VNC using your server IP and Port 5901. Password is CH4NGE-M3 (or to whatever you have changed it).

8. Click next until you get to the screen where the disks are probably not shown. Use the "Browse" button and navigate to virtio-win*->amd64->2k19 (or whatever windows version ur using).

9. After installing the driver the disks should show up. Proceed the installation. Aftwards its going to restart a few times and you should be able to enter your new administrator password.

10. Check if your network is working correctly. If not insert your servers IP / gateway (you will get this from the hetzner robot).

And dont forget to enable RDP.

11. Now shutdown the windows server and type reboot in the resque console.