├── rennzone-800x800.png ├── README.md └── windows-server-autoinstaller.sh /rennzone-800x800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nodepedia/Custom-Windows-Server-Image/HEAD/rennzone-800x800.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Custom Windows Server Image : Auto Installer 2 | 3 | --- 4 | 5 | ## 1. Download & Setup Installer : 6 | 7 | Download file Installernya 8 | 9 | ```jsx 10 | wget https://raw.githubusercontent.com/rennode/Custom-Windows-Server-Image/main/windows-server-autoinstaller.sh 11 | ``` 12 | 13 | Beri permission ke file tersebut 14 | 15 | ```jsx 16 | chmod +x windows-server-autoinstaller.sh 17 | ``` 18 | 19 | Jalankan installernya 20 | 21 | ```jsx 22 | ./windows-server-autoinstaller.sh 23 | ``` 24 | 25 | ## 2. Run QEMU : 26 | 27 | Note - Ubah xxx sesuai dengan versi windows yang kalian pilih. 28 | 29 | ```jsx 30 | qemu-system-x86_64 \ 31 | -m 3G \ 32 | -cpu host \ 33 | -enable-kvm \ 34 | -boot order=d \ 35 | -drive file=windows2xxx.iso,media=cdrom \ 36 | -drive file=windows2xxx.img,format=raw,if=virtio \ 37 | -drive file=virtio-win.iso,media=cdrom \ 38 | -device usb-ehci,id=usb,bus=pci.0,addr=0x4 \ 39 | -device usb-tablet \ 40 | -vnc :0 \ 41 | ``` 42 | PENTING : Enter 2x 43 | 44 | ## 3. Akses via VNC : 45 | 46 | Buka RealVNC Viewer, masukkan IP VPS kalian. Setelah itu ikuti langkah langkah yang ada di video. 47 | 48 | ## 4. Download File Custom Windows Server Kalian : 49 | 50 | Kompress Windows Server Img kalian 51 | 52 | ```jsx 53 | dd if=windows2xxx.img | gzip -c>windows2xxx.gz 54 | ``` 55 | 56 | Install Apache 57 | 58 | ```powershell 59 | apt install apache2 60 | ``` 61 | 62 | Beri akses firewall untuk Apache 63 | 64 | ```powershell 65 | sudo ufw allow 'Apache' 66 | ``` 67 | 68 | Pindahkan file Windows Server Image kalian biar bisa di download 69 | 70 | ```powershell 71 | cp windowsxxx.gz /var/www/html/ 72 | ``` 73 | 74 | Buka browser, download dengan mengakses VPSnya. Ubah yyy dengan ip kalian, xxx untuk versi Windows Server yang kalian pilih 75 | 76 | ```jsx 77 | http://yyy.yyy.yyy/windows2xxx.gz 78 | ``` 79 | 80 | ## 5. Setting Agar Bisa Diakses via RDP : 81 | 82 | Create droplet baru dan ikuti petunjuk yang ada di YouTube 83 | 84 | ```jsx 85 | wget -O- --no-check-certificate http://yyy.yyy.yyy/windowsxxxx.gz | gunzip | dd of=/dev/vda 86 | ``` 87 | 88 | -------------------------------------------------------------------------------- /windows-server-autoinstaller.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Function to display menu and get user choice 4 | display_menu() { 5 | echo "Please select the Windows Server version:" 6 | echo "1. Windows Server 2016" 7 | echo "2. Windows Server 2019" 8 | echo "3. Windows Server 2022" 9 | read -p "Enter your choice: " choice 10 | } 11 | 12 | # Update package repositories and upgrade existing packages 13 | apt-get update && apt-get upgrade -y 14 | 15 | # Install QEMU and its utilities 16 | apt-get install qemu -y 17 | apt install qemu-utils -y 18 | apt install qemu-system-x86-xen -y 19 | apt install qemu-system-x86 -y 20 | apt install qemu-kvm -y 21 | 22 | echo "QEMU installation completed successfully." 23 | 24 | # Get user choice 25 | display_menu 26 | 27 | case $choice in 28 | 1) 29 | # Windows Server 2016 30 | img_file="windows2016.img" 31 | iso_link="https://go.microsoft.com/fwlink/p/?LinkID=2195174&clcid=0x409&culture=en-us&country=US" 32 | iso_file="windows2016.iso" 33 | ;; 34 | 2) 35 | # Windows Server 2019 36 | img_file="windows2019.img" 37 | iso_link="https://go.microsoft.com/fwlink/p/?LinkID=2195167&clcid=0x409&culture=en-us&country=US" 38 | iso_file="windows2019.iso" 39 | ;; 40 | 3) 41 | # Windows Server 2022 42 | img_file="windows2022.img" 43 | iso_link="https://go.microsoft.com/fwlink/p/?LinkID=2195280&clcid=0x409&culture=en-us&country=US" 44 | iso_file="windows2022.iso" 45 | ;; 46 | *) 47 | echo "Invalid choice. Exiting." 48 | exit 1 49 | ;; 50 | esac 51 | 52 | echo "Selected Windows Server version: $img_file" 53 | 54 | # Create a raw image file with the chosen name 55 | qemu-img create -f raw "$img_file" 30G 56 | 57 | echo "Image file $img_file created successfully." 58 | 59 | # Download Virtio driver ISO 60 | wget -O virtio-win.iso 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.215-1/virtio-win-0.1.215.iso' 61 | 62 | echo "Virtio driver ISO downloaded successfully." 63 | 64 | # Download Windows ISO with the chosen name 65 | wget -O "$iso_file" "$iso_link" 66 | 67 | echo "Windows ISO downloaded successfully." 68 | --------------------------------------------------------------------------------