Installing Windows Server 2012R2 on VC VPS


#1

tl;dr: IPv6 works but very impractical !IPv4 does NOT work!


I’ve decided to try and install Windows Server 2012 R2 on a Scaleway VC.
A lot of time went into the testing so it would be a complete waste of time if I did not share my experience here.

It is possible to get windows server 2012r2 running on any scaleway VC server.
I have not tested the dedicated C servers.


This is how to do it:
Create a proxmox hypervisor on a computer.
Then create a VM with the same hardware devices that Scaleway uses on their kvm VC instances.
Basically use a 32GB VirtIO disk and a VirtIO network adapter.

Install Windows Server 2012R2 in the vm using an .ISO from MSDN. (Or any other legal source)
During the installation you’ll need the virtIO driver CD to be mounted to get the correct storage driver.
Mount the Windows Server 2012 R2 .ISO to the first CD/DVD drive.
Add a second CD/DVD drive and mount the VirtIO-win driver CD to it.
Turn the VM on and install the server to your own liking…

Finish the installation and login.
Configure all settings like firewall and rdp.
After that edit the BCD (successor of boot.ini) to enable the Windows EMS console.
The Windows EMS console will allow you to throubleshoot things through the Scaleway web console.

bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200
bcdedit /ems {current} on

Shut the machine down and add an extra hard drive (atleast 35GB)
Boot about any linux live CD, I’ve used Ubuntu.
Create a complete disk image using dd

dd if=/dev/vda conv=sync,noerror bs=64K | gzip -c > /path/to/backup.img.gz

Upload backup.img.gz to a webserver that’s reachable from the internet.
Use any protocol you like such as FTP/SFTP/SCP.
You’ll need about 5GB of free space on your webserver depending on how heavily you’ve customized your installation.


Create a new VC1M instance.
Change the created instances bootscript to: x86_64 rescue in the advanced settings on the control panel.
Give the server a hard reboot and connect through ssh to the rescue session once it is booted.
Format /dev/vdb and mount it.

mkfs.ext3 /dev/vdb
mount /dev/vdb /mnt

Download the backup.img.gz dd disk image file to the: /dev/vdb device.

wget [url to backup.img.gz] /mnt

Restore the disk image to /dev/vda using dd.

gunzip -c /mnt/backup.img.gz | dd of=/dev/vda

This will take about 20 to 30 minutes, go get yourself a cup of coffee and a chocolate chip cookie.


Open the console of the instance you’ve created on the scaleway website.
Leave the website in the background.
Switch to the ssh session and reboot the server (do not use the hard reboot button in the scaleway control panel!)
Quickly change back to the console on the website!
Before the server boots through ipxe press ctrl+b (you have to be quick!)
If you’re to late don’t worry, just wait for the server to boot and reconnect to ssh.
Reboot again and make sure you’re a bit quicker this time!

In the ipxe environment type: exit and press enter.

IPXE> exit

The server should boot from the local disk now.

After a few seconds the Windows EMS console should show up.
Enter: cmd

SAC> cmd

And connect to the cmd sesson using: ch -si 1

SAC> ch -si 1

Login using the credentials you’ve set during the servers installation in the Proxmox VM.
Run ipconfig and find out that you are not receiving a DHCP lease. :scream:

C:\Windows\system32> ipconfig /all

After a week of troubleshooting I’ve finally found out what the problem was.
Windows does not allow a /31 or 255.255.255.254 subnetmask to be configured on any interface.

Unfortunately Scaleway uses /31 for all VC instances.
Scaleway uses this to save IP-adresses since you don’t really have the need for an broadcast address. Since you know exactly who else is in the subnet.
I know some providers do this with their public IPv4 adresses but I’ve never seen it used before on private addresses.

That’s the reason why you won’t be able to use your IPv4 address.
I’ve given Server 2016 a quick test and it seems to have the same problem.

IPv6 however does work!
However the Scaleway implementation is not very convenient to use for this purpose.(Here you can read why )

So you’ll be able to connect to your sever using IPv6.
It requires some tweaking with the settings but it does work.
Unfortunately my local provider does not support IPv6 yet just like about half the rest of the world.

Unless there is someone who can tweak the M$ TCP/IP stack to allow /31 subnet, there is no solution to solve this problem.


Conclusion:
It is pretty damn useless to install Windows on a scaleway VPS at this moment.
Don’t waste your time and money on trying to get it working, I’ve happily did that for you. :joy:


Some side notes:

Remember you will always have to open the Scaleway website and do the Ctrl-B dance when rebooting the server, otherwise it will continue to boot the rescue image.

If for some reason the server is unresponsive do a hard reboot.
Do not do the Ctrl+B dance but let the server boot in rescue mode.
After the server is booted connect through ssh and reboot.
Quickly change to the scaleway web console and do the Ctrl+B dance.

If you don’t let the rescue image boot after a hard reboot, the control panel will think there is something wrong with the server and reset the whole VM after 2 minutes.
Because it didn’t receive the hello message, and you won’t be able to sent it because you can’t send the message back to the PXE server, since you’re unable to communicate over IPv4.


Useful information:
https://pve.proxmox.com/wiki/Windows_VirtIO_Drivers
https://wiki.archlinux.org/index.php/disk_cloning



Windows OSes on Scaleway
May install my own Windows copy on x64 baremetal?
#2

So we are following a very long tutorial to create a Windows VPS for nothing?


#3

Thanks for your Tutorial. Actually I was able to setup Windows Server 2016 on an VC1M instance with working IPV4.

For this I used in the cmd session netsh to set as static my subnetmask, ip and gateway.

The gateway address and ip is the same as the linux one and for subnetmask I just used 255.255.255.252.
The netsh command looks like this:

netsh interface ip set address “connection name” static yourscalewayIP 255.255.255.252 yourScalewaygateway

After that set the dns to the same as in linux with this command:

netsh interface ip add dns “connection name” scalewayDNS

Than if you have configured remote desktop before you can login into your windows machine using your public scaleway ip.


#4

Hi Pgr4567,

Thanks for pointing this out :slight_smile:
And adding the information how to get it to work in Server 2016.

In this article it looks indeed like M$ did change the TCP/IP stack and now supports subnet’s as small as /32 in server 2016.

This looks very promising.
Is the performance acceptable?


#5

Hi!
Thanks Gwiz for the tutorial. I was able to replicate it on a VC1L Server. It works as a charm and the performance is acceptable. I’ve been trying to do the same on a C2M Server but it doesn’t work. Do you think it can really work on it ?
I’m new to Scaleway and a novice too in the virtualization world, maybe I don’t understand many things…

Dima


#6

Can you give me this snapshot (windows os)? Thank you :slight_smile:


#7

Hi!!
I am trying to Install Windows Server. Could you please help me out ?


#8

hello bro can send me the link of img file my internet is too slow i can’t upload it from my computer


#9

If he could that would be great.


#10

I got to the bit where you stop the PXE boot and cancel it but after a while it force reboots the server. So I didn’t have enough time to setup the IP address

Windows image (For those who want it): https://s3.eu-west-2.amazonaws.com/aws-file-uploads/windows2016.img.gz

username: administrator
password: Password1

REMEMBER to change password.
Setup this image a while ago


#11

Hi jonny,

Try changing the bootscript to “x86_x64 rescue”.
Reboot the server and let it boot completely into the linux rescue.
SSH to the server and “reboot” from the ssh session.

Don’t use the power toggle in the scaleway dashboard because this triggers the boot check that will reset the server automatically after X minutes because it didn’t receive the successful boot confirmation.
Rebooting through SSH does not trigger this verification.

After you’ve issued the reboot through SSH quickly change to the scaleway dashboard console of the server and press ctrl+B when the server goes into PXE boot.

Let me know if you get the IP settings configured correctly.
I never had time to test the solution from: Pgr4567


#12

Tried subnet mask of 255.255.255.252 .
Kept saying invalid parameter, so used 255.255.255.0

Waiting on the CPU load to die down now


#13

Hi All,

confirm this is working with Windows 2016. had to do a Subnet Mask of 255.255.255.0 but still works.

  1. the GW ip address is one lower than your scaleway IP.
    i.e, if your IP 10.10.10.2, your GW IP is 10.10.10.1
  2. dont forget to setup DNS, in my case that was 10.6.30.8

I’m new to scaleway so how would one reboot/poweroff the server? is this even feasible or would we have to go through the SAC> cmd loop again?


#14

Not jonny, but can confirm that solution from Pgr4567 works fine!


#15

Don’t be anxious besides the forgotten password there are still other for you to regain the password access to Windows 10 computers can’t remember password in Microsoft edge or even any account password you can easily save in it.