Create a Custom Image in GCP:
How to Create Custom Image and VM from it:-
- Go to Google Console:
— Compute Engine
— VM Instances
— Create Instances
- Go to Compute
— VM Instances
— Images
— Create image
— Name — instance1
— Source — disk
— Source disk — Select instance1
— Location — Multi-regional (aisa)
✅ Keep instance running
— Create
- Go to Compute Engine:
— Create instance
— Name
— Region - asia-south1
— Boot disk Change - Custom images
— Select your image
— Create instance
Using Cloud shell:
Disable auto-delete option for the disk
$ gcloud compute instances set-disk-auto-delete vm_name --no-auto-delete --disk=source_disk_name
$ gcloud compute images create img-name --source-disk=source_disk_name --source-disk-zone=zone_name --storage-location=us --force
$ gcloud compute images describe image_name
$ gcloud compute images delete image_name
🙏 thanks
ConversionConversion EmoticonEmoticon