Step-by-Step Guide to Install Windows on a Dedicated Server Using QEMU
Step-by-Step Guide to Install Windows on a Dedicated Server Using QEMU

Steps are for Kimsufi only, but they may work for other providers too.

Before starting, boot your server into “rescue” mode and log in with the credentials provided by Kimsufi.

Boot to Rescue Mode and Login with SSH
  1. Log in to your Kimsufi manager panel.
  2. Under the server options, select the “Rescue Mode” option and activate it.
  3. Wait for the email containing the new rescue mode credentials (username and password).
  4. Connect to the server using SSH with the provided credentials:
ssh root@

Replace <server-ip> with your server's IP address. Enter the password provided in the email when prompted.

Step 1: Switch to Root User

Start by becoming the root user to ensure you have the required privileges:

sudo -i
Step 2: Verify KVM Support

Check if your CPU supports hardware virtualization:

egrep -c '(vmx|svm)' /proc/cpuinfo
  • A result '1' or higher confirms that your CPU supports virtualization.
Step 3: Install cpu-checker to Check KVM Status

Install cpu-checker to use the kvm-ok command:

apt-get update
apt-get install -y cpu-checker

Verify KVM functionality:

kvm-ok

Expected Output:

INFO: /dev/kvm exists
KVM acceleration can be used
Step 4: Ensure KVM Modules Are Loaded

If kvm-ok is not available or /dev/kvm does not exist, manually load the KVM modules:

Check Kernel Logs:
dmesg | grep -i kvm
Load KVM Modules:

For Intel CPUs:

modprobe kvm
modprobe kvm_intel

For AMD CPUs:

modprobe kvm
modprobe kvm_amd

Verify the modules are loaded:

lsmod | grep kvm
Step 5: Disk Preparation
Identify the Disk
lsblk

Find the disk you want to use (e.g., /dev/sda).

Clear Existing Partitions with cgdisk:
  1. Launch cgdisk:
  2. cgdisk /dev/sda
  3. Highlight the partition you want to delete (e.g., /dev/sda1) using the arrow keys.
  4. Select [Delete] to remove the partition.
  5. Repeat until all partitions are deleted.
  6. Select [Write] to save the changes and confirm by typing yes.
  7. Select [Quit] to exit.
Reboot the System:
reboot

Reconnect to the server after it reboots.

Step 6: Download ISO Files

Download the Windows ISO files:

wget -P /mnt https://devilish.com.au/iso/Windows_Server_2016_x64_Intel.iso
wget -P /mnt https://devilish.com.au/iso/Windows_Server_2019_x64_Intel.iso
wget -P /mnt https://devilish.com.au/iso/Windows_Server_2022_x64_Intel.iso
wget -P /mnt https://devilish.com.au/iso/Windows_Server_2025_x64_Intel.iso
wget -P /mnt https://devilish.com.au/iso/17763.3650.221105-1748.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us.iso
Step 7: Install QEMU

Install QEMU to enable virtualization:

apt-get install -y qemu-system
Step 8: Launch QEMU with KVM

Run QEMU with the following command:

change the iso name to the one you select on this line -drive file=/mnt/Windows_Server_2019_x64_Intel.iso,media=cdrom \

qemu-system-x86_64 \
-m 1G \
-cpu host \
-enable-kvm \
-boot order=1 \
-drive file=/mnt/Windows_Server_2019_x64_Intel.iso,media=cdrom \
-drive file=/dev/sda,format=raw \
-device usb-ehci,id=usb,bus=pci.0,addr=0x4 \
-device usb-tablet \
-net nic,model=virtio-net-pci \
-net user,hostfwd=tcp::3389-:3389 \
-vnc 0.0.0.0:0
Step 9: Connect via VNC (do not close down the SSH session)

Install a VNC Viewer (e.g., RealVNC, TigerVNC).

Connect to your server using:

<server-ip>:0

Example:

149.56.242.65:0
Step 10: Install windows
Step 11: Enable Remote Desktop (Using Server Manager)

To enable Remote Desktop in Windows Server using Server Manager, follow these steps:

  1. Log in to the Server:

    Access your Windows Server via the VNC connection provided during the installation process.

  2. Open Server Manager:

    Once logged in, the Server Manager dashboard should appear automatically. If it does not, you can open it from the Start menu by searching for Server Manager.

  3. Navigate to Local Server Settings:

    In the Server Manager dashboard, locate the Local Server option in the left-hand navigation menu. Click on it.

  4. Enable Remote Desktop:

    In the Local Server settings page, look for the Remote Desktop field (it will likely say "Disabled").

    Click on the Disabled link to open the System Properties window.

  5. Configure Remote Desktop Settings:

    In the System Properties window, go to the Remote tab.

    Under the Remote Desktop section, select Allow remote connections to this computer.

    Confirm any warnings that appear, and if prompted, check the box for Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended).

  6. Save Changes:

    Click OK to save the changes and close the System Properties window.

  7. Allow Remote Desktop in Windows Firewall:

    Back in Server Manager, go to the Tools menu (top-right corner) and select Windows Defender Firewall with Advanced Security.

    In the Firewall management window, ensure the Remote Desktop (TCP-In) rule is enabled under Inbound Rules.

    If the rule is disabled, right-click on it, select Enable Rule, and confirm.

Verify Remote Desktop Access:

Once Remote Desktop is enabled and allowed through the firewall:

  • Use a Remote Desktop Protocol (RDP) client (like the built-in Remote Desktop Connection tool on Windows).
  • Connect to your server using its public IP address and administrator credentials.

Example:

  • RDP Host/IP: your-server-ip
  • Username: Administrator
  • Password: Your configured admin password.
Step 12: Boot to Hard Drive (Using OVH Control Panel)

After the installation is complete, reboot the server to boot from the hard drive using the OVH Control Panel:

  1. Log in to Your OVH/Kimsufi Manager Panel:

    Access your OVH or Kimsufi account through the web interface.

  2. Navigate to Boot Settings:

    In the control panel, locate your server in the list of active services. Click on it to access the server's management settings.

    Find the Boot or Boot Options section.

  3. Change Boot Mode:

    In the Boot Options section, you will see the current boot mode (likely set to "Rescue"). Change this to Hard Drive.

  4. Save Changes and Reboot:

    Save the new boot settings. Then, go to the Reboot option in the control panel and restart your server.

  5. Wait for the Server to Boot:

    Allow a few minutes for the server to reboot and load the Windows operating system from the hard drive.

  6. Connect via Remote Desktop:

    Once the server has booted, use Remote Desktop Protocol (RDP) to connect to your Windows installation:

    • Host/IP Address: Enter your server's public IP address.
    • Username: Use Administrator.
    • Password: Enter the password set during the Windows installation process.

Your server is now running Windows and ready to use.