I used GCP on a Free Trial for a couple of month and set up and a Compute engine VM, when the Trial budget ended the VM went down and I can't restart it even after upgrading to monthly payments.
Every time I want to restart the VM i get this error:
The default network interface [nic0] is frozen.
I tried to create a new VM, but also got an error:
Google Compute Engine is not ready for use yet in the project. It may take several minutes if Google Compute Engine has just been enabled, or if this is the first time you use Google Compute Engine in the project.
Created a new service account and played with roles, but the result is still the same.
What should I do in this situation?
Thanks in advance!
Best regards, Ivan
This issue looks like a known issue from Google side:
Workaround:
1. Try creating a new VPC network using the following:
https://cloud.google.com/sdk/gcloud/reference/compute/networks/create
Now create a VM instance using the new network
Create a new project under the same billing account and try creating VM using the default network
Related
I am new to GCE. I am trying to write a cron job to take some action based on current CPU utilization of some VMs on GCE. Is there a way I can get this info using 'gcloud' command?
I have tried gcloud compute instances describe <instance_name>. But that does not provide current CPU utilization info.
I found this other post that talks about getting this info from StackDriver - Understanding instance/cpu/utilization of Google Compute Engine
I am looking for this info using 'gcloud'.
Appreciate any help. Thank you in advance.
gcloud commands are used to create and manage Google Cloud resources. I checked the gcloud command references and it does't cover monitoring metric. To monitor performance of your VM instance, you need to use stackdriver monitoring
If you really want this feature in gcloud command, you can open a feature request here
My GCP Compute engine is down. In GCP console it is up and running. It is an Ubuntu 18.04 server with 0.6GB memory(an always free tier compute engine). It was not restarted for more than couple of months. The system usage was around 60% last checked. I have already checked this answer. And none of them seems valid for me(seems so).
Free disk stands at 54%.
SSH perfectly configured.
No firewall issue.
It just seemed the VM stopped responding putting the hosted url down. When I checked Compute engine monitoring tabs, all the graphs were normal without any visible changes. I even checked the logging but no system crash kind of logs were present. I stopped and restarted the compute engine, and it started working perfectly, as nothing happened. In AWS, the VM instance failed System Reachability tests in such scenarios.
Does GCP has something similar like AWS system reachability test?
Any possible logs or something, by which I can understand the reason why the Compute Engine stopped responding?
There are different kinds of test with custom scenarios in your project , please find it on reference link [1]
[1] https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/how-to/running-connectivity-tests
Our team is trying to troubleshoot an issue we have been encountering with service accounts. The service account we are using is able to create a disk and IP address, however an error is thrown when an instance request is created. All resources can be listed (ie. networks, snapshots, etc.). I have attached a small console snippet below.
The service account is successfully authenticated with JSON key given to me. I have tried altering permissions of the service account and created a new key.
Any assistance is greatly appreciated.
Created [https://www.googleapis.com/compute/v1/projects/<PROJECT>/zones/asia-east1-c/disks/dev-josh-ui-test-08].
Created [https://www.googleapis.com/compute/v1/projects/<PROJECT>/regions/asia-east1/addresses/dev-josh-ui-test-08-ip].
ERROR: (gcloud.compute.instances.create) Some requests did not succeed:
- The resource '<ID>-compute#developer.gserviceaccount.com' of type 'serviceAccount' was not found.
I was able to get the exact error provided:
The resource '-compute#developer.gserviceaccount.com' of type 'serviceAccount' was not found.
by deleting my default compute service account and attempting to create an instance through the Cloud Shell, so I assume this is the issue.
If the default compute service account was somehow deleted, if has been less than 30 days, you can restore it using: gcloud beta iam service-accounts undelete [ACCOUNT_ID]
https://cloud.google.com/iam/docs/creating-managing-service-accounts#undeleting
After this, you will have to go into https://console.cloud.google.com/apis/dashboard and disable and re-enable the compute engine API. This will take a few moments, but after the GCE API is re-enabled you should be able to create VMs through the Cloud Shell again and I was able to reproduce this.
On https://console.cloud.google.com/apis/dashboard disable the "google compute engine API" and after enable it again.
The enabling also creates some additional setup that is needed to use the API. Those resources could have been deleted by accident beforehand.
You might need to have some patience and wait a minute or two between disabling and enabling.
I have hosted a wordpress on Google Compute engine,kindly find the below specification.
Kindly see the specification.
Instance type=f1-micro
Memory=0.60GB
Virtual core=1
I followed the instruction given at below link.
How to increase the size of a Google Cloud virtual machine?
I created created snapshot of existing VM and attached that snapshot to new VM.
But when i iam opening the new VM ip it is not working.
Kindly advice how increase RAM and Disk of Existing VM.
With thanks and regards,
Vijay Maurya
So far only found this dialog under "recommendations".
In order to modify the machine configurations, you have to stop the VM instance first.
Then go to edit, and change the machine type with required memory.
I believe you have to go into the Networks section under Compute and then assign the old IP address to the new machine. That's what I did when upgrading one of my instances.
I have a perl job that runs for 5 mins at the top of every hour. What is the most cost effective way of running this job on the Google Cloud infrastructure? Running a compute engine VM seems too heavy-weight for this since I'd get charged for the other 55 mins of no use. I don't understand the "Managed VMs" well enough, but it seems like this might be an option, but I'm not sure if pricing is rounded to the hour. Does anyone have any ideas what the best option is so that I only get charged for 120 mins of usage (24 times run * 5 minutes). The script also uses some image processing binaries, so converting to Python won't do the trick.
Managed VMs are linked to Google App Engine. If you have an App in GAE, managed VMs are used to configure the hosting environment for you App using VMs that run on Google Compute Engine and these applications are subject to Java and Python run time. This link can give you an idea on pricing on GAE, however Perl is not a supported language in GAE.
On GCE, you can start up an instance, do the task and then delete the instance without deleting the persistence disk, this will allow you to recreate the instance using this disk, however you will still be charged for the provisioned disk space and you will need to create a script that will spin up the instance and delete it. You can also create a snapshot of your disk and recreate your instance based on the snapshot, this will be little bit less expensive that keeping the disk.
Also, you should look at the type of persistence disks (PD) on GCE, at this link, take a look at the examples provided, since based on your operation, regular PD or SSD PD can make a big difference on price.
You can use the pricing calculator to estimate your charges
When you deploy to App Engine using a managed VM, an compute engine instance (managed by google) is created for you. All request to App Engine will be forwarded to the created compute engine instance.
To run your script in App Engine as a Managed VM, you will have to dockerize your project, as the managed VM runs a docker container.
I don't see a reason to use App Engine managed VM (just for running a script), as the cost will be same as using a compute engine instance.
Probably the most cost effective way is to create a script that:
Launches a compute engine instance
Install perl
Copies your script to the instance
Runs you script in the created instance
To schedule the execution, you can put at home/office a cron job that executes the above script.