0

I'm a Windows guy and am new to GCP. Things that used to be easy are hard. Like, spinning up a Windows 11 OS. I've gotten some of the way there.

  • I uploaded the disk VHDX to GCP
  • I converted the VHDX to a GCP disk image, using the standard settings (the UI didn't work, but the equivalent gcloud command was fine).

Whenever I create an instance from this image, I'm forced to choose SPOT provisioning, but I don't understand why.

If I try standard provisioning, I get this:

ERROR: (gcloud.compute.instances.create) Could not fetch resource:
 - Invalid value for field 'resource.scheduling.provisioningModel': 'STANDARD'. For preemptible, only allowed provisioning_model value is SPOT.

The UI also seems to be steering me towards using sole-tenancy, but I don't need that either.

Does anyone have a reliable set of steps to get a reliable Windows 11 instance running in GCP?

5
  • 1
    Windows 11 is not supported. Do you have a Microsoft license that permits Windows 11 virtualization in the cloud? cloud.google.com/compute/docs/instances/windows/ms-licensing Commented Jun 14 at 22:26
  • According to this, it is supported: cloud.google.com/compute/docs/images/os-details#windows_client . I have MSDN licenses. The VMs are only for test purposes, and not accessible publicly. Similar to what one would do with vSphere.
    – snowkoan
    Commented Jun 16 at 19:47
  • AFAIK MSDN licenses do not support GCP virtualization. Read the link for license types that are supported. Commented Jun 17 at 21:22
  • Are you referring to Windows licensing? MSDN Windows licenses are usually Pro/retail. While the OS itself may be unsupported, the license should function as it would elsewhere. Pro and retail licenses are usually not suitable for mass deployment, but should work fine for one off bespoke setups.
    – Greg Askew
    Commented Jun 18 at 11:09
  • @GregAskew - I provided a link to the license types that Google allows. Two factors are at play - what Microsoft allows and what Google allows. Commented Jun 20 at 3:43

1 Answer 1

1
# Upload VHDX to Google Cloud Storage
gsutil cp path-to-local-vhdx-file gs://your-bucket-name/path-to-vhdx-file

# Create an image from the VHDX file
gcloud compute images create windows-11-image --source-uri gs://your-bucket-name/path-to-vhdx-file --os windows-10

# Create a persistent disk from the image
gcloud compute disks create windows-11-disk --image windows-11-image --zone your-zone

# Create a VM instance using the persistent disk
gcloud compute instances create windows-11-instance \
    --zone your-zone \
    --machine-type n1-standard-1 \
    --subnet default \
    --maintenance-policy MIGRATE \
    --service-account your-service-account \
    --scopes https://www.googleapis.com/auth/cloud-platform \
    --tags http-server,https-server \
    --image windows-11-image \
    --image-project your-project-id \
    --boot-disk-size 200GB \
    --boot-disk-type pd-standard \
    --boot-disk-device-name windows-11-disk \
    --reservation-affinity any
1
  • Thank you. I'll give this a go.
    – snowkoan
    Commented Jun 18 at 23:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .