1

When I try to import a vmdk file to GCP with gcloud compute images import command, I get

"googleapi: Error 400: Invalid value for field 'resource.networkInterfaces[0]': ''.

Subnetwork should be specified for custom subnetmode network".

The subnet mode in default network is set to "CUSTOM". that's why I am getting that msg.

Is there a way to specify network when I import the image? or specify the subnet information?

Community
  • 1
  • 1
user3739312
  • 87
  • 1
  • 1
  • 8
  • This does seems like a defect within the GCP platform. For further investigating this issue, I would recommend you to open a defect report using the [issue-tracker](https://cloud.google.com/support/docs/issue-trackers#search_for_or_create_bugs_and_feature_requests_by_product). While opening the report, try to mention all the details including the reproduction steps. I hope this helps you. – Digil Sep 24 '18 at 21:23
  • Please follow [this](https://issuetracker.google.com/116701145) public issue tracker link for further updates on this issue.You could provide your comments/suggestion over there as well. – Digil Sep 26 '18 at 15:51
  • thanks, I will follow that link for update. – user3739312 Sep 27 '18 at 12:37

1 Answers1

1

Suggestion:

This workaround worked for me, you can do it while this issue is still not solved:

  • create a temp project, a default auto network will be created automatically.
  • import the vmdk to the temp project
  • In your original project, create instance using the imported image.
  • Delete temp project

Note: Deleting the temp project will delete the imported image, but not the created instance.

Community
  • 1
  • 1
Sleem
  • 139
  • 1
  • 4