Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fedora-cloud-launch-gce-cli
Created google-fedora-metadata-keys following instructions here: https://wiki.ubuntu.com/GoogleComputeEngineSSHKeys
I used 'fedora', 'cloudinit', and 'root' as usernames there, most likely just 'fedora' would be required/needed.
Converted qcow2 image to raw using qemu-img convert command, followed instructions here to import into GCE appropriately: https://major.io/2019/08/07/fedora-30-on-google-compute-engine/
Create instance (you probably don't need to specify all these options, this was copied from the web interface for convenience)
gcloud beta compute \
--project=<redacted> instances create mgugino-fedora-33-test3 \
--zone=us-east1-c --machine-type=e2-medium \
--network=default --network-tier=PREMIUM \
--metadata=block-project-ssh-keys=true \
--maintenance-policy=MIGRATE \
--service-account=<redacted> \
--scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append \
--image=fedora-33-mgugino-test --image-project=<redacted> --boot-disk-size=40GB \
--boot-disk-type=pd-standard --boot-disk-device-name=mgugino-fedora-33-test3 --reservation-affinity=any \
--metadata-from-file=ssh-keys=google-fedora-metadata-keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.