In compute engine, How can I move an instance from project A to project B?
I have two projects, and both have the same owner. I looked at all the interfaces inside the console, but I could not find a way.
Click on your project's row to select your project from the list of resources. Note that you must not click on the name of the project, which takes you to the project's IAM page. Click on the options menu (the vertical ellipsis) in the row and click Move.
In the Google Cloud console, go to the Filestore Instances page. Click the instance ID of the instance you want to edit. On the Instance details page, click Edit to go to the Edit instance page. Change the instance description, IP-based access control rules, and capacity as needed.
Click the VM Instance you want to clone. Click "Create Machine Image" at the top. From Machine Images on the left, open your new image and click "Create VM Instance"
This can be done fairly easily now, with the caveat that when you create the VM in the other project it cannot be done through the UI but rather must be done using the gcloud
tool. And google even has a page to document how.
First, you need to either create an image or a snapshot of the disk used in the VM. You can do this through the Console UI or the gcloud utility. Google's documentation does a good job of explaining how to do it, but the TLDR is:
Once that has been completed, use the gcloud tool with the other project to create your new VM. To find out/verify the name of the disk image:
gcloud compute images list --project [IMAGE_PROJECT]
then create the vm (add any additional options you need):
gcloud compute instances create [INSTANCE_NAME] --image [IMAGE_NAME] --image-project [IMAGE_PROJECT]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With