1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice
  2. The hosting section is sponsored by Hostwinds visit the BHW Partnership program for your exclusive BHW member hosting benefit today.
    MUST be signed into your BHW account.
    Dismiss Notice

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

Discussion in 'Web Hosting' started by sohom, Feb 23, 2019.

  1. sohom

    sohom Senior Member

    Joined:
    May 26, 2013
    Messages:
    1,065
    Likes Received:
    240
    Occupation:
    Coder | Programmer
    Location:
    Automation
    Home Page:
    https://github.com/mediabots/Linux-to-Windows-with-QEMU/issues/1

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

    issue resolved & closed


    Thanks for confirming via PM
     
  2. Windmm

    Windmm Jr. VIP Jr. VIP

    Joined:
    Jun 10, 2013
    Messages:
    2,698
    Likes Received:
    1,183
    Such a valuable share! Thanks a lot bud!
     
    • Thanks Thanks x 1
  3. sohom

    sohom Senior Member

    Joined:
    May 26, 2013
    Messages:
    1,065
    Likes Received:
    240
    Occupation:
    Coder | Programmer
    Location:
    Automation
    Home Page:
    **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
     
  4. kneehawk

    kneehawk Newbie

    Joined:
    May 21, 2012
    Messages:
    12
    Likes Received:
    2
    hmmmm getting "The device is not writable: Permission denied" after running the script with root access
    any idea what I'm doing wrong?
     
  5. sohom

    sohom Senior Member

    Joined:
    May 26, 2013
    Messages:
    1,065
    Likes Received:
    240
    Occupation:
    Coder | Programmer
    Location:
    Automation
    Home Page:
    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
     
  6. kneehawk

    kneehawk Newbie

    Joined:
    May 21, 2012
    Messages:
    12
    Likes Received:
    2
    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)
     
  7. sohom

    sohom Senior Member

    Joined:
    May 26, 2013
    Messages:
    1,065
    Likes Received:
    240
    Occupation:
    Coder | Programmer
    Location:
    Automation
    Home Page:
    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: May 8, 2019
  8. kneehawk

    kneehawk Newbie

    Joined:
    May 21, 2012
    Messages:
    12
    Likes Received:
    2
    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?
     
  9. gluglu

    gluglu Newbie

    Joined:
    May 29, 2018
    Messages:
    49
    Likes Received:
    9
    thanks thats really helpful
     
    • Thanks Thanks x 1
  10. ari991

    ari991 Registered Member

    Joined:
    Nov 3, 2018
    Messages:
    57
    Likes Received:
    8
    WOW , nice share buddy
     
    • Thanks Thanks x 1
  11. sohom

    sohom Senior Member

    Joined:
    May 26, 2013
    Messages:
    1,065
    Likes Received:
    240
    Occupation:
    Coder | Programmer
    Location:
    Automation
    Home Page:
    Check your PM please
     
  12. vincent47

    vincent47 Registered Member

    Joined:
    Jul 31, 2011
    Messages:
    85
    Likes Received:
    8
    Location:
    https://www.collectionsofvincent47.download
    Home Page:
    this is what i need, since i know a 1$ per month linux vps