Can't create a new instance...could not fetch resource?

3,014 views
Skip to first unread message

joseph...@providence.org

unread,
Jun 1, 2018, 6:31:14 PM6/1/18
to gce-discussion
Trying to create a instance from within a instance running in a VPC that I started using the console.  Most other gcloud commands work, except for the this one.  The command and error I'm running are:

gcloud compute instances create test
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
 - Invalid value for field 'resource.networkInterfaces[0].network': 'https://www.googleapis.com/compute/v1/projects/XXXXXX/global/networks/default'. The referenced network resource cannot be found.

Any guess as to what is wrong?

joseph...@providence.org

unread,
Jun 2, 2018, 3:50:42 PM6/2/18
to gce-discussion
Nevermind,  The trick was to specify --network and --subnet.  Speaking of which, how does one set this as the default?

Dinesh (Google Platform Support)

unread,
Jun 2, 2018, 4:34:18 PM6/2/18
to gce-discussion
Hi Joseph,

From your post, I understand your issue is resolved by specifying --network and --subnet. You may want to look complete description of this command[1] along with different flag options. 

As suggested in the document[1] under the --network flag, If neither (network and subnet) is specified, this defaults to the "default" network. 

Please let me know if this answers to your query?

Regards,
Dinesh 

joseph...@providence.org

unread,
Jun 4, 2018, 10:17:55 AM6/4/18
to gce-discussion
Thanks. May I suggest improving the error message and/or the documentation?  The wording "If neither is specified, this defaults to the "default" network." isn't entirely clear.   Perhaps something as simple as 
"If neither is specified, this defaults to the network assigned the name "default"".  

Dinesh (Google Platform Support)

unread,
Jun 4, 2018, 4:38:56 PM6/4/18
to gce-discussion
The given error message correctly point-out that asked resource ('resource.networkInterfaces[0].network':) could not be fetched. Please elaborate what improvement you suggesting for the error message. 

As far as documentation wording is concerned, you may want to click on "Send feedback" on the top right corner of the documentation page to submit your feedback. I hope it helps?
Reply all
Reply to author
Forward
0 new messages