Skip to content

Instantly share code, notes, and snippets.

@ajxchapman
Last active August 20, 2024 19:02
Show Gist options
  • Save ajxchapman/187f8f5220cfc15f703e0019a8fc1f2a to your computer and use it in GitHub Desktop.
Save ajxchapman/187f8f5220cfc15f703e0019a8fc1f2a to your computer and use it in GitHub Desktop.
Install Windows on Digital Ocean droplet

TL;DR

Steps

  • Create a build droplet with 4GB RAM
  • Install QEMU and run the Windows 10 installation ISO
$ apt-get update && apt-get install qemu -y
$ qemu-img create -f raw windows10.img 16G
$ wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso
$ qemu-system-x86_64 \
  -m 3G \
  -cpu host \
  -enable-kvm \
  -boot order=d \
  -drive file=Win10.iso,media=cdrom \
  -drive file=windows10.img,format=raw,if=virtio \
  -drive file=virtio-win.iso,media=cdrom \
  -vnc :0
  • Connect via VNC and install Windows 10
  • Install the following drivers from the virtio-win ISO
    • f:\NetKvm\w10\amd64
    • f:\viostor\w10\amd64
  • Continue the Windows 10 installation
  • Power off the QEMU vm at the point the Windows 10 installation requires a reboot
  • On build droplet host the created disk image via a HTTP server
$ python3 -m http.server
  • Create a target droplet with 4GB - 8GB RAM
  • Boot the target droplet into recovery mode by setting Recovery mode to Boot from Recovery ISO
  • SSH into the target droplet
  • Download the Windows 10 QEMU disk image from the build instance and write it to the droplet disk
$ wget -O- http://82.196.0.147:8000/windows10.img | dd of=/dev/vda
$ shutodwn 0
  • Change the target droplet Recovery mode back to Boot from Hard Drive
  • Boot Windows and attach via the web console
  • In a CMD prompt configure IP, RDP and Firewall settings:
$ netsh interface ip set address "connection name" static <IP Address> <Net Mask> <Default Gateway>
$ reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
$ netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
  • Connect via RDP
@XXXFlorin
Copy link

lilb is super pro que pro mega pro also florin is coolio and ghost succ

@bratyxa92
Copy link

I tried this command and tried to add it simply in the network settings, but for some reason I don’t even have a driver for the network, and I can’t figure out how to add it. https://glitchwitch.io/assets/img/blog/6/windows-network-4.png

@SalimF
Copy link

SalimF commented Mar 7, 2023

I finish all the steps, but Droplet won't boot at all . OK it works
for CentOS use this command
yum install qemu-kvm -y

@amjiddader
Copy link

@BlueDragon926
Copy link

Hi everybody!
I have several VPS installations Windows Server 2019 on digitanlocea. But from these two days all of them can not RDP. I went to my desk and connected via the Recovery Console and found that Windows was still working and connected to the Internet normally.

@amjiddader
Copy link

RDP does not connect sometime due to windows update either on HOST to Server.
Any security patch that is installed will block all REMOTE Access.
Better u update both machine.
Or u can search google on, How to allow RDP on windows 10 unsecured.

Btw > Here is updated guide.. https://github.com/amjiddader/windows-on-cloud

@BlueDragon926
Copy link

BlueDragon926 commented Dec 13, 2023

I'm install Windows server 2019.
today, I'm try install from begin (make windows IMG file myself), but still not solved.
I can access new windows on Recovery Console but can't RDP. all config is true.

Sad!

@amjiddader
Copy link

Try using tight vnc , update your windows...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment