1

I migrated an SLES image from AWS to GCP following this Guide. Recently I realized that the repositories aren't working due to the fact that the machine is not properly registered to SMT.

Since I don't have a respective license because source image is licensed to AWS in a Pay As You Go mode it means I am unable to have registered SLES in GCP after a successful migration.

So based on the types of licensing models available in GCP, I want to achieve OPTION 2: Bring your own image (SLES) with GCP provided licenses, with an image/instance already migrated to GCP from AWS. Anyone has any idea on how to achieve this solution?

This is the same issue as reported in https://groups.google.com/g/google-cloud-dev/c/uWWXaHuv3h8

  • What version of RHEL are you using ? To be able to use GCP provided license it has to be [6/7 or 11/12](https://cloud.google.com/migrate/compute-engine/docs/4.11/how-to/prepare-vms-servers/using-premium-os-licenses#prerequisites). – Wojtek_B Feb 26 '21 at 15:51
  • Actually it's suse SLES server not RHEL, i wanted to know if it would be possible to apply that option 2 to that type of image and how, if the machine is already inside our environment. – ricardo_dias Mar 01 '21 at 10:05
  • My bad - don't know why I was thinking about RHEL where you clearly said otherwise. Am I correct to assume that you want to keep your SLES instance (and don't have to undergo another migration) and additionally want it to have GCP's license ? Whats the `gcloud compute instances describe your_sles_vm_name --zone=your_vm_zone | grep license` output ? – Wojtek_B Mar 01 '21 at 14:12
  • Here, the results of that query: `licenses: - https://www.googleapis.com/compute/v1/projects/velospublic/global/licenses/veloslicense - key: license_type` – ricardo_dias Mar 01 '21 at 16:14

1 Answers1

0

What you're experiencing is expected behavior since there's no way to migrate pay-as-you-go AWS licence to GCP at this moment. The only guaranteed way is to move only your data to GCP and use similar licence.

However you can try fallowing solution. But that would mean cloning your VM's disk and attaching additional licence to it.

First yuu need to stop your SLES VM. Next you create a new image with the contentes of your VM's system disk and attach a proper license:

gcloud compute images create your_new_sles_image_name \
--source-disk=your_current_sles_disk_name \
--source-disk-zone=your_zone_here \
--licenses="https://www.googleapis.com/compute/v1/projects/suse-cloud/global/licenses/sles-12"`

I assume you're using SLES 12 but if it's version 15 just replace the name of the license in the gcloud command.

Now you can create a new disk out of this image and attach it to existing SLES VM (but first detach the old one) or go straight to creating new VM (if that's not an issue) and use this image as a template for a system disk.

The key here is the URI for the license. All the SUSE licenses for SLES are in the suse-cloud project and licenses for SLES For SAP are in the suse-sap-cloud project. The license names for SLES are sles-12 and sles-15 when SUSE Linux Enterprise Server version 15 is released later this year. For SLES For SAP the names are sles-sap-12 and sles-sap-15 when SLES 15 For SAP gets released.

With this the URI for SLES 15 For SAP would be

https://www.googleapis.com/compute/v1/projects/suse-sap-cloud/global/licenses/sles-sap-15

Next there's some actual configuration to do with your SLES - have a look at this page (where I got the initial idea from) and try going through the steps mentioned in the Option 2: More prep less fiddling once uploaded.

Wojtek_B
  • 1,013
  • 4
  • 14
  • Thank you very much for sharing that information, i had tried that method before but nonetheless i give it another go, and as for the steps you mentioned it created an image successfully i was able to create a disk with that image. i attach it to an existing SLES VM, but the problems start to arise once i start to perform the steps mentioned in the tutorial [Option 2: More prep less fiddling once uploaded.](https://www.suse.com/c/create-sles-demand-images-gce/) – ricardo_dias Mar 02 '21 at 16:04
  • Here it when i performed the pint command it doesn't show as expected all the servers are smt only, and in some cases it gives the flag `"regionserver-sles"` or `"regionserver-sap"` and not as expected `smt-sles` or `smt-sap`, and currently for my region europe-west3 there are no region servers are not available, only smt. This is the format: ` ` and this: `` – ricardo_dias Mar 02 '21 at 16:05
  • But i decided to try again with both ip's and only the second one with name region was working, so i used that one, and i get blocked in the step to register my system because in my case it gives the following message: Code: `SUSEConnect –url https://smt-gce.susecloud.net –instance-data instance_md.xml` Result:`Updating system details on https://smt-ec2.susecloud.net... SUSEConnect error: SocketError: getaddrinfo: Name or service not known` It should register to smt-gce not smt-ec2.. i changed the /etc/hosts according to the steps, i don't know why this is happening do you have suggestion? – ricardo_dias Mar 02 '21 at 16:19
  • Is it possible for you to just create a fresh SLES VM from GCP provided image and move your date & services there ? – Wojtek_B Mar 03 '21 at 13:22