Recreating a VM on a different GCP project How can I transfer a disk snapshot across projects in Google Cloud Platform projects

0 votes

I am having a VM instance  in project A in GCE. I want to make a brand new instance that supported this VM in another project B.
I know that I could spawn a new instance via a disk snapshot but, is there any option to transfer such a snapshot across project?
What's the way to transfer a disk snapshot across projects in Google Cloud Platform projects?
Is there an improved way to reach this aside from employing a docker image?

Oct 16, 2019 in GCP by Karan
• 19,610 points
5,489 views

1 answer to this question.

0 votes

You could probably follow these steps to create a mirror VM in another project:

Firstly, create a snapshot of the boot disk of the source VM instance

Then, create a disk which is based on this snapshot in the target project

gcloud compute disks create vm-prod-disk --source-snapshot \
 https://www.googleapis.com/compute/v1/projects/<source-\
 project>/global/snapshots/<source-vm-snapshot> --project target-project

Last step is to create a VM based on the new disk from step 2

gcloud compute instances create vm-prod-duplicate \
--project target-project --disk name=vm-prod-disk,boot=yes

This should do!

answered Oct 16, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
1 answer
0 votes
1 answer

How can I find out who created a project in GCP?

You could probably use Stackdriver Cloud Audit ...READ MORE

answered Oct 9, 2019 in GCP by Sirajul
• 59,230 points
2,481 views
0 votes
1 answer

How do I disable suspend a project in Google Cloud?

Shutting down a project within the console releases all ...READ MORE

answered Oct 16, 2019 in GCP by Sirajul
• 59,230 points
5,651 views
0 votes
1 answer

Creating a SQL Server instance using Google Compute engine.

Google Compute Engine provides public images preconfigured with ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points
2,922 views
0 votes
1 answer
0 votes
1 answer

How do i install gcloud compute?

The gcloud compute command-line tool enables you to easily ...READ MORE

answered Sep 23, 2019 in GCP by Sirajul
• 59,230 points

edited Jun 16, 2023 by Khan Sarfaraz 1,262 views
0 votes
1 answer
0 votes
1 answer

How do I create a Google Cloud Platform (GCP) account?

In order to access the services provided ...READ MORE

answered Sep 20, 2019 in GCP by Sirajul
• 59,230 points
2,774 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP