Create service account and Compute Engine virtual machine instance with Microsoft Windows Server 2019 as operating system.
Configuration other than default values:
Variable | Description | Value |
---|---|---|
MY_GCP_GCE_NAME | Name of GCE virtual machine instance | windows |
MY_GCP_GCE_TYPE | GCE machine type | g1-small [vCPU: shared, RAM: 1.7 GB] |
MY_GCP_GCE_DISK_BOOT_SIZE | Size of the boot disk | 64GB |
MY_GCP_GCE_DISK_BOOT_TYPE | Type of the boot disk | pd-standard (HDD) |
MY_GCP_GCE_IMAGE_FAMILY | Image family for the OS that the boot disk will be initialized with | windows-2019 |
MY_GCP_GCE_IMAGE_PROJECT | Project against image family references | windows-cloud |
64GB HDD results in poor I/O performance. If you don't want that you have to change the disk type and size and spend more money. For more information, please see: https://developers.google.com/compute/docs/disks#performance.
Google Cloud Pricing Calculator
- Region: Finland
- 730 total hours per month
- VM class: regular
- Instance type:
g1-small
(USD 14.46) [Sustained Use Discount applied] - Operating System / Software: Paid (USD 16.79)
- Sustained Use Discount: 30%
- Effective Hourly Rate: USD 0.043
- Zonal standard PD: 64 GiB (USD 2.82) [HDD not SSD! When the instance is shut down, you only pay the ring price for the disc.]
- Total Estimated Cost: USD 34.07 per 1 month
Windows Server 2019 usage fee billed by Google:
- EUR 0.02/hour (EUR 12.38/month) for
f1-micro
andg1-small
machine types - EUR 0.03/core/hour (EUR 24.77/core/month) for all other machine types
Information without guarantee.
01_create_windows.sh
: Create service account and Compute Engine virtual machine instance02_reset_windows_password.sh
: Reset and return a password for a Windows machine instance10_rdp_windows.sh
: Starts an IAP TCP forwarding tunnel for RDP20_serial_console_windows.sh
: Connecting to the serial console99_delete_windows.sh
: Delete Compute Engine virtual machine instance and service accountZZ_debug.sh
: For debugging only
If you don't need your VM for a long time you can make a snapshot from the disk.
You can then delete the VM and the disk (99_delete_windows.sh
).
If you need the VM with the data again, you can create a new fresh VM from the snapshot.
30_create_snapshot_windows.sh
: Create snapshot of Compute Engine persistent boot disk31_create_from_snapshot_windows.sh
: Create Compute Engine persistent boot disk from last snapshot and create virtual machine instance with created disk39_delete_snapshots_windows.sh
: Delete all Compute Engine boot disk snapshots from specific instance
You will then save the disk cost and pay only the very cheap snapshot price.
- Regional snapshot storage $0.029 per GB in
europe-north1
(Finland) - Multi-regional snapshot storage $0.0286 per GB in
eu
(European Union) [DEFAULT]
Example:
# Create snapshot
bash 30_create_snapshot_windows.sh
# Delete SA, Disk and VM
bash 99_delete_windows.sh
# Later, create new VM from snapshot
bash 31_create_from_snapshot_windows.sh
# Delete all snapshots
bash 39_delete_snapshots_windows.sh
Connect to Windows Server via RDP.
- Starts an IAP TCP forwarding tunnel for RDP with script
10_rdp_windows.sh
- Connect to local IP
127.19.72.6
via RDP client
Use the storage bucket created in step 03 to exchange installation files for extra software.
Download the SAP GUI for Windows installation archive from the web page: https://developers.sap.com/trials-downloads.html?search=sap+gui+for+windows
- Download the
SAP_GUI_for_Windows.rar
archive - Unrar archives with 7-Zip or WinRAR
- Copy unpacked folder to
../storage_bucket/windows/
- Run the script
10_sync_storage_bucket.sh
in folder03_storage
to synchronize the files to the bucket
Download the latest stable Chrome browser for Windows installation archive from the web page: https://chromeenterprise.google/browser/download/
- Download the
GoogleChromeEnterpriseBundle64.zip
archive - Unzip archive with 7-Zip or with the standard ZIP program of your operating system
- Copy unpacked folder to
../storage_bucket/windows/
- Run the script
10_sync_storage_bucket.sh
in folder03_storage
to synchronize the files to the bucket
Connect to Windows Server via RDP.
Start Google Cloud SDK Shell
:
Download bucket content with command:
gsutil -m rsync -r "gs://<MY_GCP_STORAGE>/windows" "%HOMEPATH%\Downloads"
Example:
gsutil -m rsync -r "gs://storage-bucket-name/windows" "%HOMEPATH%\Downloads"
Run the setup programs from the Downloads folder.