Sometimes there is requirement to migrate vm images from GCP account to another. Sometime they have organization configured or sometimes not. We will see how to transfer images in that case. I am providing steps.
First we will upload vm disk in storage account and create image out of it.
Login into GCP console, create Cloud storage account with private access. Upload the disk or image
I am creating image in Project,sagar-project-2 under sagarcloudguru.in organization. You have to look for image service. It is available under compute engine service –> Storage –> image. Click on import image.. Below screen will appear
you will notice that image is ready to use.
Image transfer across GCP accounts with Organization
Click on sagarcloudguru.in Orgnization, go to IAM. Provide Orgnization viewer permission to user from another organization. This Use’s email addresses and domains must be associated with an active Google Account, Google Workspace account, or Cloud Identity account.
Go to another orgnization. Go to image service of the project where you want create image. Click on import image. Provide name to image, select source as image, search for organization, then project and select image-2 from drop down. You can select Multi-regional or regional based on your use case. I have selected Mumbai region for showing demo. Provide image description if you want. Click on create, new image will be created in 5-10 min depending on size. You can go and verify it. Your image will be ready for use.
Image transfer across different GCP accounts without Organizations
When you have not orgnization set, still you want to migrate image between them. Process will be same as mentioned above. Only thing is that you need to give project viewer permission to user of another GCP account as shown below.
You will notice, two different project will be visible under no Org. Both Project belongs to different Billing account.
When you go to another GCP account, login with user account who has permission on remote project. Go to image services, click on import image. While selecting image of another GCP account, click on No-orgnization, select remote project where image is available to import. You have to select correct project to migrate image.
Hope this article will help you to migrate resources between GCP account without any Organizations configured or with existing Organizations