I am looking to move GCE instance or snapshot to different project I have access to. Is that something available in GCE?
There aren't any features by default that would allow you to move them to a different project. However, there are workarounds. The following is probably just one of many ways to do so.
To save a disk across projects you will need to use an image. If you can’t use the standard imagebundle tool, you can use the "dd" command. On a temporary disk that’s bigger than the one you want to image, run this:
$ dd if=/dev/disk/by-id/google-diskname of=disk.img bs=5M
You can then run the following to copy it over to Google Cloud Storage for example:
$ gsutil cp disk.img gs://yourbucket/your-image.img
And later, you can:
$ gsutil cat gs://yourbucket/your-image.img | \
dd of=/dev/disk/by-id/google-newdisk bs=5M
In summary, you can make an image of your disk, use GCS to send it to over to another project and then use the 'snapshot' on the newly created disk to have a ready image based on which you can create additional instances for that project.
PS: It is also possible to create custom images for use in GCE. If you create a properly configured custom image, you can have it uploaded to any project and create instances directly from it. See this article.
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