Step 0: create snapshot from desired disk, example name: disk-snapshot-20171026
Step 1: copy the selfLink from snapshot’s equivalent REST response: projects/another-project/global/snapshots/disk-snapshot-20171026
Note: One can get the link via the following command:
1 |
gcloud compute snapshots list --project=another-project --uri |
Step 2: execute the following command (replace current-project and asia-east1-a with your own project and zone, respectively)
1 2 3 |
gcloud compute disks create disk1 --project=current-project \ --source-snapshot=projects/another-project/global/snapshots/disk-snapshot-20171026 \ --zone=asia-east1-a |
&