Tuesday, May 1, 2018

openSUSE Leap 42.3 on Google Cloud Platform (GCP)

Blogging... I'm glad I started in 2008, it is like having a diary that you can never misplace... and reading some old entries can bring back wonderful memories, as I recall and review the course of my life from this, albeit narrow, technology perspective.

Anyway, its been a good 4+ years since my last entry and the longest hiatus... glad and grateful to say that I am now working for Google.  My personal Linux passion is still very much alive and personal bias towards all things SUSE (more openSUSE since 2011).

Problem Statement:

So, it is May 2018 and I am little disappointed that openSUSE Leap did not make it to the out-of-the-box public images on Google Cloud Platform (GCP).  However, it is listed in the "Community supported images" category.

PS:  I'm placing my vain hope that Leap 15 will make it though...

This blog entry describes the steps to create a vanilla openSUSE Leap 42.3 VM on GCP and thereafter, create a custom image from this said VM so you can easily/quickly create openSUSE Leap 42.3 VMs for other workloads in the future through the GCP Web Console.

From this point on, I will assume you have a GCP account and therefore access to GCP consoles etc.  It is not difficult to start with Google Cloud Platform, just go to https://cloud.google.com/free/ to get a Free Tier account.

Create an openSUSE Leap 42.3 VM on GCP:

  1. Login to your GCP console and your project (default or otherwise).
  2. From Menu (top-left),  Compute Engine -> VM instances
  3. Note that openSUSE is not listed as an Operating System image when you try to create a new VM.  This is well documented at the Images section of the Compute Engine topic.
  4. Launch the Cloud Shell within the console, on the top-right.
  5. Find the available community supported openSUSE Leap image with the following command input to the Cloud Shell. 
    • gcloud compute images list --project opensuse-cloud --no-standard-images 
  6. Create a VM with the openSUSE Leap 42.3 image in the Singapore datacenter (or any Zones that is closest to you)

  7. SSH into your newly created openSUSE Leap 42.3 VM to download and apply the latest updates/patches.  Click the SSH button (see screenshot above).
    • Once you SSH into your VM,  zypper up.
  8. Reboot the VM to test all updates are working.
    • Reboot:  sudo reboot.  You will lose SSH connection, naturally.
    • Sign back in via SSH button... it may take a few tries as the VM is rebooting.
    • Sign out of SSH:  exit
  9. Shutdown the VM.  Select the VM (checkbox) from the Console and Click STOP.

Create a custom image in your GCP Project for Re-use later:

  1. From the GCP console, navigate to Compute Engine -> Images
  2. Click [+] CREATE IMAGE 
  3. Put in the name of your new image (eg. my-opensuse-leap-423) and select Source as Disk and Source disk as the boot disk from the right VM (eg. osleap423).
    • (Optional) You can click the command line link at the bottom to note the equivalent Cloud Shell command.  This is useful if you want to script actions for future re-use and not use the web-console.
  4. Once your custom image is created, you will be able to select it for the next VM you wish to create.
Enjoy! :-)


  1. After a few hours of frustration, your post is very helpful. At last i can install openSUSE in my GCP cloud.

  2. Question the image installs but my username doesnt have root. Whats the root for the image?

    1. By default doesn't have password for root account. Uses 'sudo passwd' to set up a new password and you will can use 'su' command to change for root user using the new password recently settled.

  3. This was very Helpful! Now I don't have to pay a usage fee for SLES.

  4. Great article, after read for hours on GCP documentation and be lost in so many hyperlinks this save a few more hours.