ERROR: (gcloud.compute.instances.create) Could not fetch resource
Could someone help me understand why I'm receiving the 'ERROR' shown below? Should I change some of the parameters in 'instance create' or is something else wrong ?
Thanks for the help in advance.
$ gcloud compute instances create onap-test-01 --zone us-central1-f --custom-cpu 40 --custom-memory 180GB --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/
images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.images.useReadOnly' permission for 'projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00'
Comments
-
Hi,
I've double checked, you do have access to the GCP image. What project are you using?
Thanks,
Amar
0 -
Note: I ealize that I need to reset the default region / zone
I'm currently attempting to use 'my-project1-1529728710719 '
after executing the command below I receive a read only error.
gcloud compute instances create my-project1-1529728710719--zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
For the following instances:
- [my-project1-1529728710719--zone]
- [us-central1-f]
choose a zone:
[1] asia-east1-a
[2] asia-east1-b
[3] asia-east1-c
[4] asia-northeast1-a
[5] asia-northeast1-b
[6] asia-northeast1-c
[7] asia-south1-a
[8] asia-south1-b
[9] asia-south1-c
[10] asia-southeast1-a
[11] asia-southeast1-b
[12] asia-southeast1-c
[13] australia-southeast1-a
[14] australia-southeast1-b
[15] australia-southeast1-c
[16] europe-north1-a
[17] europe-north1-b
[18] europe-north1-c
[19] europe-west1-b
[20] europe-west1-c
[21] europe-west1-d
[22] europe-west2-a
[23] europe-west2-b
[24] europe-west2-c
[25] europe-west3-a
[26] europe-west3-b
[27] europe-west3-c
[28] europe-west4-a
[29] europe-west4-b
[30] europe-west4-c
[31] northamerica-northeast1-a
[32] northamerica-northeast1-b
[33] northamerica-northeast1-c
[34] southamerica-east1-a
[35] southamerica-east1-b
[36] southamerica-east1-c
[37] us-central1-a
[38] us-central1-b
[39] us-central1-c
[40] us-central1-f
[41] us-east1-b
[42] us-east1-c
[43] us-east1-d
[44] us-east4-a
[45] us-east4-b
[46] us-east4-c
[47] us-west1-a
[48] us-west1-b
[49] us-west1-c
[50] us-west2-a
Did not print [2] options.
Too many options [52]. Enter "list" at prompt to print choices fully.
Please enter your numeric choice: 40ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.images.useReadOnly' permission for 'projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00'deeplock:~ copacetic$ # updated policy to 'compute viewer' and rerun the command
deeplock:~ copacetic$ gcloud compute instances create my-project1-1529728710719--zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
For the following instances:
- [my-project1-1529728710719--zone]
- [us-central1-f]
choose a zone:
[1] asia-east1-a
[2] asia-east1-b
[3] asia-east1-c
[4] asia-northeast1-a
[5] asia-northeast1-b
[6] asia-northeast1-c
[7] asia-south1-a
[8] asia-south1-b
[9] asia-south1-c
[10] asia-southeast1-a
[11] asia-southeast1-b
[12] asia-southeast1-c
[13] australia-southeast1-a
[14] australia-southeast1-b
[15] australia-southeast1-c
[16] europe-north1-a
[17] europe-north1-b
[18] europe-north1-c
[19] europe-west1-b
[20] europe-west1-c
[21] europe-west1-d
[22] europe-west2-a
[23] europe-west2-b
[24] europe-west2-c
[25] europe-west3-a
[26] europe-west3-b
[27] europe-west3-c
[28] europe-west4-a
[29] europe-west4-b
[30] europe-west4-c
[31] northamerica-northeast1-a
[32] northamerica-northeast1-b
[33] northamerica-northeast1-c
[34] southamerica-east1-a
[35] southamerica-east1-b
[36] southamerica-east1-c
[37] us-central1-a
[38] us-central1-b
[39] us-central1-c
[40] us-central1-f
[41] us-east1-b
[42] us-east1-c
[43] us-east1-d
[44] us-east4-a
[45] us-east4-b
[46] us-east4-c
[47] us-west1-a
[48] us-west1-b
[49] us-west1-c
[50] us-west2-a
Did not print [2] options.
Too many options [52]. Enter "list" at prompt to print choices fully.
Please enter your numeric choice: 40ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.images.useReadOnly' permission for 'projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00'I update the policy and rerun the command
deeplock:~ copacetic$ # updated policy to 'compute network viewer'
deeplock:~ copacetic$
deeplock:~ copacetic$ gcloud compute instances create my-project1-1529728710719--zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
For the following instances:
- [my-project1-1529728710719--zone]
- [us-central1-f]
choose a zone:
[1] asia-east1-a
[2] asia-east1-b
[3] asia-east1-c
[4] asia-northeast1-a
[5] asia-northeast1-b
[6] asia-northeast1-c
[7] asia-south1-a
[8] asia-south1-b
[9] asia-south1-c
[10] asia-southeast1-a
[11] asia-southeast1-b
[12] asia-southeast1-c
[13] australia-southeast1-a
[14] australia-southeast1-b
[15] australia-southeast1-c
[16] europe-north1-a
[17] europe-north1-b
[18] europe-north1-c
[19] europe-west1-b
[20] europe-west1-c
[21] europe-west1-d
[22] europe-west2-a
[23] europe-west2-b
[24] europe-west2-c
[25] europe-west3-a
[26] europe-west3-b
[27] europe-west3-c
[28] europe-west4-a
[29] europe-west4-b
[30] europe-west4-c
[31] northamerica-northeast1-a
[32] northamerica-northeast1-b
[33] northamerica-northeast1-c
[34] southamerica-east1-a
[35] southamerica-east1-b
[36] southamerica-east1-c
[37] us-central1-a
[38] us-central1-b
[39] us-central1-c
[40] us-central1-f
[41] us-east1-b
[42] us-east1-c
[43] us-east1-d
[44] us-east4-a
[45] us-east4-b
[46] us-east4-c
[47] us-west1-a
[48] us-west1-b
[49] us-west1-c
[50] us-west2-a
Did not print [2] options.
Too many options [52]. Enter "list" at prompt to print choices fully.
Please enter your numeric choice: 40ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.instances.create' permission for 'projects/my-project1-1529728710719/zones/us-central1-f/instances/my-project1-1529728710719--zone'
- Required 'compute.instances.create' permission for 'projects/my-project1-1529728710719/zones/us-central1-f/instances/us-central1-f'the policy has the ability to 'create' instances. what am I doing wrong?
0 -
Attempting to use 'my-project1-1529728710719
gcloud compute instances create my-project1-1529728710719--zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.images.useReadOnly' permission for 'projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00'
........
deeplock:~ copacetic$ # changed policy to 'compute viewer'
deeplock:~ copacetic$ gcloud compute instances create my-project1-1529728710719--zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi`
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.images.useReadOnly' permission for 'projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00'
.......
deeplock:~ copacetic$ gcloud compute instances create my-project1-1529728710719--zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.instances.create' permission for 'projects/my-project1-1529728710719/zones/us-central1-f/instances/my-project1-1529728710719--zone'
- Required 'compute.instances.create' permission for 'projects/my-project1-1529728710719/zones/us-central1-f/instances/us-central1-f'
0 -
It looks like you are missing a space after the instance name in your commands?
Perhaps try:
gcloud compute instances create my-project1-1529728710719 --zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi0 -
attempt-1
cut and paste the syntax from @jnavali Post but received the same ' Required compute.machine.Type.get' error message.
gcloud compute instances create my-project1-1529728710719 --zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
ERROR: (gcloud.compute.instances.create) Could not fetch machine type:
- Required 'compute.machineTypes.get' permission for 'projects/my-project1-1529728710719/zones/us-central1-f/machineTypes/custom-40-184320'attempt-2
changed role from 'compute viewer' to 'compute image user' but I'm still receiving a compute.machine.type.get error message.
gcloud compute instances create my-project1-1529728710719 --zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
ERROR: (gcloud.compute.instances.create) Could not fetch machine type:
- Required 'compute.machineTypes.get' permission for 'projects/my-project1-1529728710719/zones/us-central1-f/machineTypes/custom-40-184320reinitialized
Commands that require authentication will use copacetic@tradelabs.co by default
Commands will reference project 'angular-compass-201506' by default
Compute Engine commands will use region 'us-central1' by default
Compute Engine commands will use zone 'us-central1-f' by defaultattempt-3
added 'private log viewer' and 'compute engine adminv1' permissions. now receiving compute.images.use.ReadOnly'rror complained 'readonly' which was expected.. but I've tried just about all of the image policies
gcloud compute instances create my-project1-1529728710719 --zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.images.useReadOnly' permission for 'projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00'attempt-4
removed 'compute engine adminv1' and added 'compute network viewer'. Back to square 1.
gcloud compute instances create my-project1-1529728710719 --zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Required 'compute.instances.create' permission for 'projects/angular-compass-210506/zones/us-central1-f/instances/my-project1-1529728710719'I think I've tried all of the compute engine polices that can read and or create instances:
1. compute image user
2. compute instance adminv1
3. compute viewer
4. compute network viewerany and all help or feedback welcome. thank you
0 -
What login email address are you using on gcloud? Looks like you are not able to access the image.
0 -
short answer: 'copacetic@tradelabs.co'
longer answer: I have multiple addresses. This has been an ongoing issue from day-1, so I reached out to FL and Google to setup a access for a second address 'lorem*@gmail.com' to see if the error message was consistent. Since the error message turned out to be the same I've since continued with only copacetic for consistency.
I've also walked through each step in the cloud console with both addresses and turned on alpha - same net result... Is there a way to determine (remotely) what could possibly be wrong? I was really hoping to get beyond this step to start working on DCAE in particular.
Appreciate your help.
0 -
I've just enabled access for copacetic@tradelabs.co. Can you please try again? I'm also asking our engineering team to look at this. Please note that this course does not include DCAE.
0 -
Hi,
In the last message you posted you were using your project name as the instance name (though your first message had it correct).
gcloud compute instances create my-project1-1529728710719 --zone us-central1-f ....
I would suggest the following:
Set the project to your current project:
gcloud config set project
should be your project and NOT onap-177920. In your case, this should be my-project1-1529728710719Run the instance create now:
gcloud compute instances create onap-test-00 --zone .....
Also, please make sure you project has the permission to create the required resources.
Please let us know if you are still facing problem.
0 -
okay - I've tried many different combinations up to this point but none of them have worked. I will follow the directions in the most recent post and reply with the output/results.
0 -
Console Output
Last login: Sun Sep 2 11:19:37 on ttys000
gcloud auth login Your browser has been opened to visit: https://accounts.google.com/o/oauth2/auth?redirect_uri=http%3A%2F%2Flocalhost%3A8085%2F&prompt=select_account&response_type=code&client_id=32555940559.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fappengine.admin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcompute+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Faccounts.reauth&access_type=offline
WARNING:
gcloud auth login
no longer writes application default credentials.
If you need to use ADC, see:
gcloud auth application-default --helpYou are now logged in as [copacetic@tradelabs.co].
Your current project is [my-project1-1529728710719]. You can change this setting by running:
$ gcloud config set project PROJECT_IDgcloud config set project my-project1-1529728710719 Updated property [core/project]. gcloud config list --format='text(core.project)' # check that this worked core.project: my-project1-1529728710719
At this point ‘copacetic’ doesn’t have sufficient privileges to view IAM settings. Making the following updates.
remove - Compute Network Viewer
add - Compute Instance Adminv1
add - Editor
add - Organization AdministratorLogged out and back-in again and can now see permissions for my-project1-1529728710719
QuotasConfirmed quotas for us-central1
Enabling Cloud Shell - Alpha
trying to get real time feedback on cli syntaxgcloud alpha interactive Welcome to the gcloud interactive shell environment.
Cloudshell
gcloud compute instances create my-project1-1529728710719 --zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
Success
gcloud compute instances create my-project1-1529728710719 --zone us-central1-f --custom-cpu 40 --custom-memory 180 --min-cpu-platform "Intel Haswell" --image "https://www.googleapis.com/compute/v1/
projects/onap-177920/global/images/aarna-opnfv-euphrates-51-onap-amsterdam-05012018-00" --boot-disk-type "pd-standard" --boot-disk-size 600GB --local-ssd interface=scsi --local-ssd interface=scsi
Created [https://www.googleapis.com/compute/v1/projects/my-project1-1529728710719/zones/us-central1-f/instances/my-project1-1529728710719].
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
my-project1-1529728710719 us-central1-f custom (40 vCPU, 180.00 GiB) 10.128.0.2 35.194.23.43 RUNNING
$Thank you so much for the help! Going to get some rest and start fresh in the morning.
0
Categories
- All Categories
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 795 Linux Foundation IT Professional Programs
- 355 Cloud Engineer IT Professional Program
- 179 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 127 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 112 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 14 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 152 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 33 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 42 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 154 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 111 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 24 LFS268 Class Forum
- 29 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 9 LFW111 Class Forum
- 260 LFW211 Class Forum
- 182 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 743 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 507 Programming and Development
- 285 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)