This is a brief tutorial on how you can create a Red Hat Enterprise Linux cloud image for Googles Compute Engine. These instructions are meant for a Linux hosts which runs KVM.
1. Download the GCE Tools google-cloud-sdk so you can create and upload the future image. You will need to have internet connection as the tool will comunicate with GCE’s api.
2. Untar the Google cloud SDK
[root@host191 ~]# cd google-cloud-sdk/
3. Install the SDK. You will need to be able to communicate to the outside world here as well as visit a website
4. Once installed build your linux VM. Create a qcow2 disk. You will have to convert the disk later on to raw format.
Google also supports meta data service so you can install cloud-init as well which you can find in the rhel-7-server-rh-common-rpms. Once your done you can shutdown your vm and convert it into raw. IMPORTANT, the name of your disk needs to be disk.raw .
6. Convert the image to raw. The image needs to be named disk.raw
7. Tar it up.
8. If there is no data store create one. Rhelimages is my datastore name
9. Upload the tarball to the gce storage
10. Create the compute image. Once done you will be able to create GCE compute instances from that image.