When attempting to create a new GCP VM on a new account, the list of public images is empty. If I try to launch an image from the public marketplace, the boot device will not be attached.
What am I doing wrong here?
Turns out the problem was caused by the security group in my organization which set a public image constraint and neglected to ensure my team was aware of it.
https://cloud.google.com/compute/docs/images/restricting-image-access
open cloud shell as per my comment (right upper corner square with ">" sign)
list images using
gcloud compute images list
Output will look like this:
try to create your VM with desired image via opened cloud shell using for example the following
gcloud compute instances create test --image-family ubuntu-1804-lts --image-project ubuntu-os-cloud
Output should look something like this:
If so, you will find your instance running under compute engine.
PS.
Dont forget to turn these VMs off when you are done.
If you want to select another image make sure to use image project and image family from output from step 2.
Either way at least this should give you some errors to resolve
Related
I distributed slurm-gcp using Terraform through the GitHub and it was available successfully. Source:
Slurm on Google Cloud Platform
But I want to change the image I use when using node to a custom image.
I am trying to edit /slurm/scripts/config.yaml.
Among the contents of the file:
image: projects/schedmd-slurm-public/global/images/family/schedmd-slurm-20-11-7-hpc-centos-7
I want to edit the part.
How to reroute this part to my custom image?
First you need to create your own image.
Create a new VM with the image you want to modify; make appropriate changes and stop the VM. Then create a new image from the VM's disk.
Next create a custom image from that disk and your path in the config.yaml file can look like this:
image: projects/my-project-name/global/images/your-image-name
You can get exact path to your custom image by running:
wb#cloudshell:~ (wb)$ gcloud compute images describe your-image-name | grep selfLink
selfLink: https://www.googleapis.com/compute/v1/projects/wb/global/images/your-image-name
When I try to import .ova file, there is following error.
The problem is:
[import-ovf] 2020/08/19 13:02:35 step "import-boot-disk" run error: step "wait-for-signal" run error: WaitForInstancesSignal FailureMatch found for "inst-importer-import-ovf-import-boot-disk-3qlqg": "ImportFailed: Failed to resize disk. The Compute Engine default service account needs the role: roles/compute.storageAdmin'"
ERROR
ERROR: build step 0 "gcr.io/compute-image-tools/gce_ovf_import:release" failed: step exited with non-zero status: 1
ERROR: (gcloud.compute.instances.import) build 0683583e-5157-4d13-972b-b5e3f5f75f2b completed with status "FAILURE"
"
The command I am using to implement is: gcloud compute instances import eve --os=ubuntu-1604 --source-uri=gs://evenamespace/EVE.ova --zone=northamerica-northeast1-a --custom-memory=25GB --custom-cpu=4.
I already add an role in Compute Engine default service account, that is Compute Storage Admin like the picture
As mentioned in this Answer to a very similar question, you should make sure that your Compute Engine Service Account has the roles roles/compute.storageAdmin & roles/storage.objectViewer.This is also mentioned in the documentation here.
Also, it is important to make sure that you have enough Disk quota in the region where you're importing the disk into.
The import process uses SSD disks for performance during the import process. So, in case you don't have quita for SSD Disks available you may also face issues when importing an appliance. I suggest to also check your current SSH quota.
Could you please try the recommendations and let me know if this works to complete your import?
If not, maybe you could retrieve all of the logs by inspecting the console output of gcloud compute instances import. There will be a URL for the scratch bucket.You can load that URL, navigate to the logs directory, and download all of the logs. More hints to the cause could be found in these logs.
Using this command without the / at the end of the ova file name I got it to work:
$ gcloud beta compute machine-images import <my-machine-image> --source-uri=gs://my-virtual-appliances-bucket/my-va-file.ova --os=ubuntu-1804
Let me know if this helps anyone trying to attempt this, check out this link as well.
Rolling update for an instance group fails with "Invalid Fingerprint" error message at console. Earlier rollouts had no issues but recently started seeing this error and updates are failing, even a times Instance Group section of console is going unresponsive.
Already tried :
Creating New Image and using it in a new Template for rolling out update in instance group
Appreciate any clues or help.
Thanks
When trying to roll-out an update to my instance group with the "ROLLING RESTART/REPLACE" button, I got a “Invalid Fingerprint” error message in the Notification. This issue might also be caused by the "ROLLING UPDATE" button. (capital letters are shown at the source GCE interface)
My instance group size was set to 1 instance, and I was getting the error:
"Invalid fingerprint"
To solve the problem, I changed the Instance Group size from 1 to 2, and then rolled the update.
After the update was done - I change the group size back to 1.
For documentation purposes, the error looks like this:
Edit the Instance Group (set number of instances) by clicking the edit button:
.. and update the number of instances:
Currently, our Internal Compute Engine team working on the issue, The current workaround is to use the gcloud command which should also fix the issue on the Cloud Console afterwards. you can do a rolling replace using:
gcloud beta compute instance-groups managed rolling-action replace [instance group]
You can find the details of the command at this link. Also, you can keep an eye for complete resolution of the issue at this public issue tracker link where other users field a defect report. I must also mention that Updating Managed Instance Group is a beta feature as of now.
I have an image created from a VM and I want to create an Instance Template to use that image for boot disk. I cannot find any way to do this in Google Cloud Console. How can create an Instance Template, using an image for boot disk?
Thanks!
Go to Compute Engine -> Images. In Filter images, enter the tag that you used to create the image. If you did not use a tag or something descriptive, then you will have to look thru the entire list. If you do not find your image, then go back and figure out what went wrong with your import.
Once you know your image and its name, go to Compute Engine -> Instance tempates.
Click on Change in Boot disk. Select the tab Custom images. If you do not see your image, then go back again and figure what went wrong with your import.
If you see your image select it and press the Select button. Continue configuring your instance template.
How to list the gcp images in the marketplace from the gcloud commandline? "gcloud compute images list" only shows the standard images in the project and probably skips the marketplace listing.
By default, the cli shows standard images only.
--standard-images
Show images from well-known image projects. The well known image
projects are: centos-cloud, coreos-cloud, debian-cloud, cos-cloud,
rhel-cloud, rhel-sap-cloud, suse-cloud, suse-sap-cloud,
ubuntu-os-cloud, windows-cloud, windows-sql-cloud. Enabled by default,
use --no-standard-images to disable.
To list images from specific project you want to specify --project flag.
Example:
# gcloud compute images list --project=click-to-deploy-images --filter="name ~ 'nginx.*'"