Last active
October 6, 2020 00:09
-
-
Save michaelgugino/e742b83d3950c6cdbfaa25fe262a86bf to your computer and use it in GitHub Desktop.
fedora-cloud-launch-gce-cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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