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. For more information about images in vSphere vCenter, refer to VMware documentation.
Create the Base OS Image
For vSphere, a username and password is populated by SSH_USERNAME
and the user can use authorization via SSH_PASSWORD
or 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.
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.
Disk Size
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 Resource Requirements.
The minimum storage requirements for your organization.
Defaults
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.
Customization
You can also specify a custom disk size when you create a cluster (see the flags available for use with the vSphere Create 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.
In VMware Cloud Director, the base image determines the minimum storage available for the VM.
For additional information and examples of KIB vSphere overrides, see this page: Image Overrides
If using Flatcar, the documentation from Flatcar regarding disabling or enabling autologin in the Base OS Image is found here: In a vSphere or Pre-provisioned environment, anyone with access to the console of a Vitrual Machine(VM) has access to the core operating system user. This is called autologin. To disable autologin, you add paramaters to your base Flatcar image. The ways to do this are described in the Flatcar documentation: https://www.flatcar.org/docs/latest/installing/cloud/vmware/#disablingenabling-autologin and https://www.flatcar.org/docs/latest/setup/customization/other-settings/#adding-custom-kernel-boot-options. Refer to the vCenter and vSphere Client documentation for details.