Hi, if I can add some suggestions, just some ideas that you might find helpful.
Typically in the UI of the console what you see is scoped to the project you currently have selected, which is why you donât see machine images in other projects, despite having permission.
If you want to use âmachine-imagesâ (and note these are different to custom images, see: https://cloud.google.com/compute/docs/machine-images for a nice comparison table) to move/copy VMs between projects. Then you could do one of two things, both require a little use of the âgcloudâ command line tool, which is easily accessible from Cloud Shell - the icon â>_â in the top right of the UI in a browser.
These approaches assume your user you are logged into the console with has required access to both projects to access VMs as well as create VMs and machine-images.
Option 1. Create the machine-image in the ânewâ project, sourcing the VM you want to copy in the âoldâ project. Once done, you will have a usable machine-image listed in the UI console of your ânewâ project and you can provision a new VM (or several) from it in the usual way. To create a machine image in your ânewâ project referencing the VM in the âoldâ project, open up Cloud Shell and run these two commands:
a. Get the source link of the VM you want to create an image for, running the following command will give you a self link URL we can use when we create the image in step b:
gcloud compute instances describe VMNAME --zone=ZONE --project=OLDPROJECT --format=âvalue(selfLink)â
Replacing all the red items with the variables that relate to your environment.
b. Create a new machine-image in your new project referencing the URL above with the following:
gcloud compute machine-images create IMAGENAME --source-instance=SOURCE-VM-URL --project=NEWPROJECT
Again replacing the variables in red, using the source VM URL from step a.
At this point you should have a machine-image in your ânewâ project that you can provision new VMs from in the UI as normal.
Option 2. Alternatively, you can do the other way round, you can create the machine-image in your âoldâ project, then create a new VM in the ânewâ project referencing that image. In this case you could create the image in the UI as you did previously, but you would need to use the âgcloudâ command to provision the VM as follows:
a. Get the source link of the machine-image you want to use from the âoldâ project (note you would have already needed to create it of course), similar to above, this will give you a self link URL we can give to the command when we create the VM to reference the image:
gcloud compute machine-images describe IMAGENAME --project=OLDPROJECT --format=âvalue(selfLink)â
b. Create a new VM referencing that machine-image - note that this exact command may vary depending on what configuration you want to apply to the new VM - for example if you want to specify which network it should join, so this is just an example - which will use the âdefaultâ network :
gcloud beta compute instances create NEWVMNAME --source-machine-image=SOURCE-IMAGE-URL --zone=ZONE --project=NEWPROJECT
As above, replacing the variables in red with values that make sense for your environment and using the image URL from the first command.
Hope that gives some suggestions as to a route to take. I think if you are more comfortable with the UI, then I would go option 1 - simply because there are many more options/variables when provisioning a VM, that it might be more convenient to use the UI for that, compared to the process to capture the VM image which is comparatively simple command.
Hope that helps,
Alex