Skip to main content
Skip table of contents

Create a vSphere Virtual Machine Template


  • Users need to create a base OS image in vSphere before starting this procedure.

  • Build image with Konvoy Image Builder (KIB)

If using GPU, prepare an OS image for your NVIDIA GPU nodepool, using the Konvoy Image Builder instructions here: KIB for GPU

Create a vSphere Template for Your Cluster from a Base OS Image

Using the base OS image created in a previous procedure, DKP creates the new vSphere template directly on the vCenter server.

  1. Set the following vSphere environment variables on the bastion VM host:

    export VSPHERE_SERVER=your_vCenter_APIserver_URL
    export VSPHERE_USERNAME=your_vCenter_user_name
    export VSPHERE_PASSWORD=your_vCenter_password


  2. Copy the base OS image file created in the vSphere Client to your desired location on the bastion VM host, and make a note of the path and file name.

  3. Create an image.yaml file and add the following variables for vSphere. DKP uses this file and these variables as inputs in the next step.

    download_images: true
    build_name: "rhel-79"
    packer_builder_type: "vsphere"
    guestinfo_datasource_slug: ""
    guestinfo_datasource_ref: "v1.4.0"
    guestinfo_datasource_script: "{{guestinfo_datasource_slug}}/{{guestinfo_datasource_ref}}/"
      cluster: ""
      datacenter: ""
      datastore: ""
      folder: ""
      insecure_connection: "false"
      network: ""
      resource_pool: ""
      template: "base-rhel-7.9"
      vsphere_guest_os_type: "rhel7_64Guest"
      guest_os_type: "rhel7-64"
      # goss params
      distribution: "RHEL"
      distribution_version: "7.9"
    # Use following overrides to select the authentication method that can be used with base template
    # ssh_username: ""  # can be exported as environment variable 'SSH_USERNAME'
    # ssh_password: "" # can be exported as environment variable 'SSH_PASSWORD'
    # ssh_private_key_file = "" # can be exported as environment variable 'SSH_PRIVATE_KEY_FILE'
    # ssh_agent_auth: false  # if set to true, ssh_password and ssh_private_key will be ignored


  4. Create a vSphere VM template with your variation of the following command:

    konvoy-image build images/ova/<image.yaml>

    The Konvoy Image Builder uses the values in image.yaml and the input base OS image to create a vSphere template that contains the required artifacts needed to create a Kubernetes cluster. Give the file a suitable name using this suggested naming convention: creator-ova-vsphere-OS-ver-k8sver-unique_identifier. As an example, the filename you create might resemble dkp-ova-vsphere-rhel-79-1.24.6-1646938922.

    NOTE: To build an image in a GPU environment, use the overrides/nvidia.yamland see the referenced link KIB for GPU.

  5. DKP creates the new vSphere template directly on the vCenter server.

  6. Next steps are to deploy a DKP cluster using your vSphere template.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.