-
Notifications
You must be signed in to change notification settings - Fork 113
Bug: Attaching existing disk when creating a new VM #107
Comments
The input for the You can refer to the method's documentation here: https://cloud.google.com/nodejs/docs/reference/compute/0.10.x/Zone#createVM |
Thanks for your input. I've tried passing the expected JSON directly but get the same error. Also, I don't see any property by the name "source" on the Disk resource documentation which is what is expected by the REST API as per the error I get. Can you help me with how to get a reference to an existing disk and pass it to the zone.createVM method? There is no documentation for this. Thanks. |
Sorry for my mistake, it looks like our docs aren't correct. We don't expect a We will update our docs to point there instead. |
Yes, the documentation at https://cloud.google.com/nodejs/docs/reference/compute/0.10.x/Zone#createVM is incorrect. I made this work by passing raw JSON to the zone.createVM method as below:
More config options for the disks property can be found at https://cloud.google.com/compute/docs/reference/rest/v1/instances/insert. Hope this helps others! |
This is probably a bug. I am trying to create a new VM by attaching an existing disk to it. But I get the
Invalid value for field 'resource.disks[0].source': ''. Source url of disk is missing.
error when running below code. Get the same error when I pass disk.get() results to the zone.createVM() method if at all that helps. Can someone help? I have a deadline to meet on this piece of functionality. You can also check https://stackoverflow.com/questions/50968528/create-a-new-vm-by-attaching-an-existing-disk-using-node-js-client-library-for-g for discussions on this so far. Thanks in advance!The text was updated successfully, but these errors were encountered: