Prepare the virtual machine template¶
Change the directory to the
kaas-bootstrap
folder.Download the ISO image of the required operating system (OS):
Ubuntu 20.04 DVD ISO from Ubuntu images
RHEL 7.8, 7.9, or 8.4 TechPreview DVD ISO from the RedHat Customer Portal
Technology Preview: CentOS 7.9 DVD ISO from the CentOS mirrors
Export the following variables:
The path to the downloaded ISO file.
The vSphere cluster name.
The OS name:
rhel
orcentos
.The OS version:
7.8
,7.9
, or8.4
TechPreview for RHEL;7.9
for CentOS.Optional. The
virt-who
user name and password for RHEL deployments.
For example, for RHEL:
export KAAS_VSPHERE_ENABLED=true export VSPHERE_RO_USER=virt-who-user export VSPHERE_RO_PASSWORD=virt-who-user-password export VSPHERE_PACKER_ISO_FILE=$(pwd)/iso-file.dvd.iso export VSPHERE_CLUSTER_NAME=vsphere-cluster-name export VSPHERE_PACKER_IMAGE_OS_NAME=rhel export VSPHERE_PACKER_IMAGE_OS_VERSION=7.9
Prepare the virtual machine template:
./bootstrap.sh vsphere_template
In
templates/vsphere/machines.yaml.template
, define the following parameters:rhelLicense
RHEL license name defined in
rhellicenses.yaml.template
, defaults tokaas-mgmt-rhel-license
. Remove or comment out this parameter for CentOS and Ubuntu deployments.
diskGiB
Disk size in GB for machines that must match the disk size of the VM template. The minimum and default size is 120 GB. For a bigger disk space to be available for cluster machines, set up and use a VM template with the corresponding disk size.
template
Path to the VM template prepared in the previous step.
Sample template:
spec: providerSpec: value: apiVersion: vsphere.cluster.k8s.io/v1alpha1 kind: VsphereMachineProviderSpec rhelLicense: <rhelLicenseName> numCPUs: 8 memoryMiB: 24576 diskGiB: 120 template: <vSphereVMTemplatePath>
Also, modify other parameters if required.