Hi I am new to gcp I am trying to migrate an AMI to GCP. I was partly successful but now I am unable to create the image from the VMDK that I have uploaded to GCP bucket. Is it possible to create the Image?
The OS of the image is Ubuntu Linux version 12.04.5 LTS. I am aware that this version has reached EOL but as we can create and launch instances in AWS with whatsoever OS's is it not possible to do the same in GCP?
Yes, it is possible to create an image from a VMDK file that you have uploaded to a Google Cloud Storage bucket. Here's how you can do it:
Create a new instance in Google Compute Engine using a compatible image. Since the Ubuntu 12.04.5 LTS version has reached end-of-life, you may not be able to use it directly in GCP. Instead, you can use a newer version of Ubuntu, such as Ubuntu 16.04 or 18.04, and then upgrade it to the desired version.
Once the instance is running, attach the VMDK file that you uploaded to the Google Cloud Storage bucket as a new disk to the instance. You can use the "gsutil" command to copy the VMDK file from the bucket to the instance.
Mount the new disk to the instance and copy the contents of the VMDK file to the disk.
Create a new image from the disk using the "gcloud compute images create" command. Here's an example command:
gcloud compute images create my-image --source-disk my-disk --source-disk-zone us-central1-a --family=ubuntu-12-04
Replace "my-image" with a name for your new image, "my-disk" with the name of the disk you attached to the instance, and "us-central1-a" with the zone where your instance is running. The "family" parameter specifies the family of the image, which is useful for grouping related images together.
Note that while you can create and launch instances in GCP with various OS's, it is recommended to use supported and up-to-date versions to ensure security and compatibility. You may encounter issues with unsupported OS's or outdated versions.