How to recreate a google compute engine VM from one project in another project

0 votes
How to recreate a google compute engine vm from one project (that is in production) to another project?
Nov 14, 2019 in GCP by anonymous
• 19,610 points
1,120 views

1 answer to this question.

0 votes

Since I cannot turn off the source VM because it is currently in use in a production environment, I have to use the following steps to create a mirror VM in another project:

1) Create a snapshot of the boot disk of the source VM

2) Create a disk 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

3) 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
answered Nov 14, 2019 by Sirajul
• 59,230 points

Related Questions In GCP

0 votes
1 answer

How to delete a project from Google Cloud Console

First of all, select the project you ...READ MORE

answered Apr 18, 2018 in GCP by kurt_cobain
• 9,350 points
2,892 views
+1 vote
2 answers

How to open a port on google compute engine

You need to set the firewall rule ...READ MORE

answered Jul 10, 2019 in GCP by K sagar
3,961 views
0 votes
1 answer

How to disable creating users in Google compute engine ?

You can stop a GCE instance from adding accounts ...READ MORE

answered Oct 16, 2019 in GCP by Sirajul
• 59,230 points
1,065 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,899 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,248 views
0 votes
1 answer
0 votes
1 answer
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