Create a vSphere Base OS Image
Creating a base OS image from DVD ISO files is a one-time process. Building a base OS image creates a base vSphere template in your vSphere environment. The base OS image is used by Konvoy Image Builder (KIB) to create a VM template to configure Kubernetes nodes by the DKP vSphere provider.
Create the Base OS Image
For vSphere, a username and password is populated by
SSH_USERNAME and the user can use authorization via
SSH_PRIVATE_KEY_FILE environment variables and required by default by packer. This user should have administrator privileges. It is possible to configure a custom user and password when building the OS image, however, that requires the Konvoy Image Builder (KIB) configuration to be overridden. DKP advises not to use usernames and passwords for security reasons, but instead to use private and public keys. If that is not possible, passwords should be generated and a minimum of 20 characters long.
While creating the base OS image, it is important to take into consideration the following elements:
Storage configuration: D2iQ recommends customizing disk partitions and not configuring a SWAP partition.
Network configuration: as KIB must download and install packages, activating the network is required.
Connect to Red Hat: if using RHEL, registering with Red Hat is required to configure software repositories and install software packages.
Software selection: D2iQ recommends choosing Minimal Install.
DKP recommends to install with the packages provided by the operating system package managers. Use the version that corresponds to the major version of your operating system.
DKP advises not to use usernames and passwords for security reasons, but instead to use private and public keys. If that is not possible, passwords should be generated and a minimum of 20 characters long.
For each cluster you create using this base OS image, ensure you establish the disk size of the root file system based on:
The minimum DKP storage requirements.
The minimum storage requirements for your organization.
Clusters are created with a default disk size of 80 GB.
For clusters created with the default disk size, the base OS image root file system must be exactly 80 GB. The root file system cannot be reduced automatically when a machine first boots.
You can also specify a custom disk size when you create a cluster (see the flags of the Create new vSphere Cluster command). This allows you to use one base OS image to create multiple clusters that have different storage requirements.
Before specifying a disk size when you create a cluster, take into account:
For some base OS images, the custom disk size option has no effect on the size of the root file system. This is because some root file systems, for example, those contained in an LVM Logical Volume, cannot be resized automatically when a machine first boots.
The specified custom disk size must be equal to, or larger than the size of the base OS image root file system. This is because a root file system cannot be reduced automatically when a machine first boots.
For additional information and examples of KIB vSphere overrides, see this page: Base Image Override Files
The next step is to create a vSphere VM template that contains the CAPI and Kubernetes objects.
Refer to the vCenter and vSphere Client documentation for details.