|
| 1 | +# RedHat Enterprise Linux |
| 2 | + |
| 3 | +Cloud providers which are listed below, support using rhel as an operating system option: |
| 4 | + |
| 5 | +- AWS |
| 6 | +- Azure |
| 7 | +- GCE |
| 8 | +- KubeVirt |
| 9 | +- Openstack |
| 10 | +- vSphere |
| 11 | + |
| 12 | +#### AWS: |
| 13 | +For amazon web service cloud provider, First of all the RHEL gold image AMIs have to be enabled from the |
| 14 | +[RedHat Customer Portal](https://access.redhat.com/public-cloud/aws) (this requires a [cloud-provider subscription](https://access.redhat.com/public-cloud)). |
| 15 | +.Afterwards, new images will be added to the aws account under EC2-> Images-> AMIs-> Private Images. Once the images are available in the aws account, |
| 16 | +the image id for rhel(at the moment we only support 8.x.x versions) should be then added to the `MachineDeployment` spec to the field `ami`. |
| 17 | + |
| 18 | +#### Azure |
| 19 | +RedHat provides images for Azure, [documentation](https://access.redhat.com/articles/uploading-rhel-image-to-azure) is available on RH customer portal. |
| 20 | +The `MachineDeployment` field `.spec.template.spec.providerSpec.value.cloudProviderSpec.imageID` should reference the ID of the uploaded VM. |
| 21 | + |
| 22 | +**Note:** |
| 23 | +Azure rhel images starting from 7.6.x don't support cloud-init as their documentation states [here](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/using-cloud-init#rhel). |
| 24 | +Thus, custom images can be used with a cloud-init pre-installed to solve this issue. Follow this [documentation](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cloudinit-prepare-custom-image) |
| 25 | +to prepare an image with cloud-init support. |
| 26 | + |
| 27 | +#### GCE |
| 28 | +RedHat also provides Gold Access Image for GCE and those can be fetched just like aws and azure. The `MachineDeployment` field `.spec.template.spec.providerSpec.value.cloudProviderSpec.customImage` should reference the ID of the used image. |
| 29 | + |
| 30 | +**Note:** |
| 31 | +Same as for Azure, rhel images in GCE don't support cloud-init. Thus, custom images can be used with a cloud-init pre-installed |
| 32 | +to solve this issue. Follow this [documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_red_hat_enterprise_linux_8_on_public_cloud_platforms/assembly_deploying-a-rhel-image-as-a-compute-engine-instance-on-google-cloud-platform_deploying-a-virtual-machine-on-aws) to upload custom rhel |
| 33 | +images in order to use it for running rhel instances. |
| 34 | + |
| 35 | +#### KubeVirt |
| 36 | +In order to create machines which run rhel as an operating system in KubeVirt cloud provider, the image should be available and fetched |
| 37 | +via an endpoint. This endpoint should be then added to the `MachineDeployment` field `.spec.template.spec.providerSpec.value.cloudProviderSpec.sourceURL`. For more information about |
| 38 | +the supported images please refer to this documentation from KubeVirt CDI [here](https://kubevirt.io/2018/containerized-data-importer.html) |
| 39 | + |
| 40 | +#### Openstack |
| 41 | +Once RHEL images(e.g: Red Hat Enterprise Linux 8.x KVM Guest Image) is uploaded to openstack, the image name should be used in |
| 42 | +the `MachineDeployment` field `.spec.template.spec.providerSpec.value.cloudProviderSpec.image`. |
| 43 | + |
| 44 | +#### vSphere |
| 45 | +To rhel os for vSphere instance, a template for the rhel machine should be created or a clone from a rhel machine. To upload rhel |
| 46 | +image to vSphere, follow these steps to create instances from a cloned machine: |
| 47 | + |
| 48 | +- Download Red Hat Enterprise Linux 8.x KVM Guest Image from Red Hat Customer Portal. |
| 49 | +- The image has the format `qcow2` thus should be converted to `vmdk` by running the command: `qemu-img convert -f qcow2 rhel.qcow2 -O vmdk newRHEL.vmdk` |
| 50 | +- Run `vmkfstools -i myImage.vmdk outputName.vmdk -d thin To ensure that the` to ensure that, the `vmdk` is ESXi compatible. |
| 51 | +- Upload the image to vSphere Datastore. Preferably use [`govc`](https://github.com/vmware/govmomi/blob/master/govc/USAGE.md#datastoreupload) |
| 52 | +- Once the image is uploaded create a new instance using that image. During the machine creation process, at the `Customize Hardware` |
| 53 | +step, press on ADD NEW DEVICE and select Existing Hard Disk. |
| 54 | +- In the Existing Hard Disk wizard select the rhel image file and then create the instance. |
| 55 | +- Use the instance name to clone rhel machine by updating the `MachineDeployment` field `.spec.template.spec.providerSpec.value.cloudProviderSpec.templateVMName`. |
0 commit comments