Install Windows Server through Rescue System

This Tutorial aims to provide you with a step-by-step guide to install Windows from an ISO on a server.

WHAT YOU WILL NEED:

  1. A Windows ISO
  2. A Server with a Linux-based "Rescue System" available
  3. Enough RAM to store the ISO OR a secondary hard drive
  4. A SSH and VNC Client
  5. Basic knowledge about advanced Windows settings

 

PART 1  - GETTING RESCUE SYSTEM READY

First you want to boot into the rescue system, this is as easy as pressing a button in the web interface. You'll get a root password to login into the rescue system.

Now create a RAM disk for the Windows ISO:

mount -t tmpfs -o size=6000m tmpfs /mnt

Most of our windows ISO is about 5GB big and fits comfortably into the 32 GB RAM our test server has, if you don't have enough RAM but a second hard drive available you can use that instead.

 

In our example, we will install Windows Server 2012.
Now download the Windows ISO, in this case it sits on our FTP server:

wget -O /mnt/windows.iso "http://mirror.northnetworking.com/bootimages/windows/SW_DVD5_Win_Svr_Std_and_DataCtr_2012_64Bit_English_Core_MLF_X18-27588.iso"

 

After that finishes it's time to download the portable QEMU-KVM version:

wget -qO- /tmp https://cdn.rodney.io/content/blog/files/vkvm.tar.gz | tar xvz -C /tmp

 

 

If your server has a main hard drive > 2TB and boots through UEFI you can use the UEFI BIOS for QEMU:

wget -qO- /tmp https://cdn.rodney.io/content/blog/files/uefi.tar.gz | tar xvz -C /tmp

 

PART 2  - INSTALLING WINDOWS

 

Now you can start QEMU-KVM and start the installation:

/tmp/qemu-system-x86_64 -net nic -net user,hostfwd=tcp::3389-:3389 -m 2048M -localtime -enable-kvm -cpu host,+nx -M pc -smp 2 -vga std -usbdevice tablet -k en-us -cdrom /mnt/windows.iso -hda /dev/sda -boot once=d -vnc :1

 

Or for UEFI systems:

/tmp/qemu-system-x86_64 -bios /tmp/uefi.bin -net nic -net user,hostfwd=tcp::3389-:3389 -m 2048M -localtime -enable-kvm -cpu host,+nx -M pc -smp 2 -vga std -usbdevice tablet -k en-us -cdrom /mnt/windows.iso -hda /dev/sda -boot once=d -vnc :1

 

Once you've started the VM you can connect to your-ip:1 using VNC and go through the graphical installer.
After installing Windows it will boot and allow you to create a User etc. Windows is now installed but not quite ready yet.

 

PART 3  - CONFIG WINDOWS

BASIC REQUIRED CONFIGURATION:

  • Enable RDP
  • Disable Firewall

You can now test the RDP connection by connecting to your-ip, the QEMU switches we used forward that port. The second step is required because Windows will recognize the real network connection of the server as a new network on startup and block RDP by default. By disabling it RDP will stay available, you can enable the firewall again after logging in and allowing RDP through the firewall on the new network.

There is not additional configurations required on our servers, networking will work automatically.

 

That's it! You are done and now have windows running on your Server.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 10570