[Script] Turn your Linux VPS/Server into Windows Server automatically using Shell script

I ve tried tried everything in this thread i still cant use vnc viewer.. i kept getting "Timed out waiting for a response from the computer" i use scaleway.com

https://github.com/mediabots/Linux-to-Windows-with-QEMU/issues/1

upload_2019-4-7_11-13-36.png


issue resolved & closed


Now its ok with rdp.

Thanks for confirming via PM
 
Such a valuable share! Thanks a lot bud!
 
**UPDATE**

In the script, VNC default port changed to 9 from 0, because for some servers, 0 port reserved for other purposes.

So now if you use this script, you could access your server via VNC viewer with the following format:
Server_IP:9

Regards
 
hmmmm getting "The device is not writable: Permission denied" after running the script with root access
any idea what I'm doing wrong?
 
hmmmm getting "The device is not writable: Permission denied" after running the script with root access
any idea what I'm doing wrong?

Hello
That kind of error could only be due to your system configuration. Its not an issue of the script.

Had you tried it with user name 'root'?
or
an user with root access?


better try with root user itself. (if it does't, post a screenshot,so we can help)

btw,which hosting provider are you using for your VPS or Dedibox?

Regards
 
Thanks for your help
I sorta figured it out

The issue was with Ubuntu 18
It works with Ubuntu 16 but now the problem is that there's only one drive on VPS, and it's boot drive.
It has enough spae but I can't partition it since it's the boot drive.

I need to run Ubuntu live, but I'm not sure how I would do that on a vps

It's for Serverpoint (I need a cheap Ashburn vps, and they seemed to offer the best price)
 
Thanks for your help
I sorta figured it out

The issue was with Ubuntu 18
It works with Ubuntu 16 but now the problem is that there's only one drive on VPS, and it's boot drive.
It has enough spae but I can't partition it since it's the boot drive.

I need to run Ubuntu live, but I'm not sure how I would do that on a vps

It's for Serverpoint (I need a cheap Ashburn vps, and they seemed to offer the best price)

Ok
Though I have recently tested my script on Ubuntu 18.04, and it was working fine.
Anyway, I am happy to heard that you were able to use the script

You can change the Windows Disk size by editing the .sh script

At first delete old Windows Instance by running below commands:
Code:
umount -l /mnt /media/script
rm -rf /mediabots /floppy /virtio /media/* /tmp/*
rm -f /sw.iso /disk.img

Next, open script file on vim editor (search on Youtube about "how to use vim on linux")

then change the content of line No. 88
from this
Code:
newDisk=$(expr $freeDisk \* 90 / 100 / 1024)
to this
Code:
newDisk=25600

So next time when you will run the script, it will create 25GB Disk pace for Windows OS

Regards
 
Last edited:
so I edited your script (as instructed above), uploaded to a github, generated a new link, and started from step 1 on a fresh server but I'm still only seeing a drive with 128 MB and a second drive with 160 GB (System)

is there something I'm doing wrong?
 
so I edited your script (as instructed above), uploaded to a github, generated a new link, and started from step 1 on a fresh server but I'm still only seeing a drive with 128 MB and a second drive with 160 GB (System)

is there something I'm doing wrong?

Check your PM please
 
Can we install windows 2008R2?

of course

If you want to use your own Windows ISO copy,
then upload it to your extra server after that you would have a DIRECT_URL and then just before running the last command(that is /media/script/mediabots_Linux-to-Windows.sh) edit the script (.sh) file using vim command

Now replace http://51.15.226.83/WS2012R2.ISO of LINE NO. 35 & 39 with your DIRECT_ISO_URL

Also you can go to here : https://www.microsoft.com/en-in/evalcenter/evaluate-windows-server and download any official version of 180 days free Windows server copy

NOTE - If you don't know how to use vim , then youtube is your friend https://www.youtube.com/results?search_query=vim

Regards
 
My servers are often disconnected and must be restarted on the management page to be accessed again. I use the scaleway server that is the reason why
 
My servers are often disconnected and must be restarted on the management page to be accessed again. I use the scaleway server that is the reason why

Yesterday I tested a VPS from scaleway com, for me it was working fine, even I tested with my this script
I tried below plan:
DEV1-M | 3 vCPUs 4 GB 40 GB | NVMe 200 Mbits/s €7.99/mo or €0.016/hr

but ya, I agree, sometime their VPS behaves strange. May be due to peak hours or problem related to a particular IP.
And I also commit, they are increasing their price rate! Few months ago they were the cheapest VPS provider in terms of SSD disk space, but not now :|
 
Yesterday I tested a VPS from scaleway com, for me it was working fine, even I tested with my this script
I tried below plan:
DEV1-M | 3 vCPUs 4 GB 40 GB | NVMe 200 Mbits/s €7.99/mo or €0.016/hr

but ya, I agree, sometime their VPS behaves strange. May be due to peak hours or problem related to a particular IP.
And I also commit, they are increasing their price rate! Few months ago they were the cheapest VPS provider in terms of SSD disk space, but not now :|
I think because the script makes vps lose my connection when I run 20 vps, there are 10 vps that are constantly disconnected and have to be restarted on the management page.
 
Very helpful! Thanx, Trying to find such solution.
 
My servers are often disconnected and must be restarted on the management page to be accessed again. I use the scaleway server that is the reason why

Normally, if a VPS get disconnected on RDP or Putty, one can just reconnect it.
But in your case you said, you have to restart whole VPS(through web management page) to get connected again,in that case your VPS is not responding, its not same as disconnected.

I think because the script makes vps lose my connection when I run 20 vps, there are 10 vps that are constantly disconnected and have to be restarted on the management page.

No way, script has job to install Windows Server OS on top of Linux OS.
Once Windows sever get installed and you successfully connected to your Windows RDP via IP: PORT(through VNC,etc) for 1st time, script job is done :)
After that KVM(QEMU) took control over Virtualization.
Now if your VPS not connecting/responding, its problem of you VPS or ISP, they might have a limit.
I am using Scaleway since long time, encountered such issues only 3 or 4 times out of 100 times, though I never ran 20 instances at a time!

You should create a Support Ticket on Scaleway.com about your VPS problem.

Another thing, I am not sure whether you are using this option or not,but I suggest not to use "delete existing Linux OS" option of the Script

Regards
 
Last edited:
Back
Top