This section describes the steps to configure a virtual machine for vSphere Container Storage Plug-in.

To configure VMs by using the govc command-line tool.

Prerequisites

Ensure to configure all VMs that form the Kubernetes cluster.
  • Install VMware tools on the node virtual machines. For more information about installation, see Installing and upgrading VMware Tools in vSphere.
  • Set the disk.EnableUUID parameter to TRUE for each node VM. This is necessary so that VMDK always presents a consistent UUID to the VM. This allows the disk to be mounted properly.
    • In the vSphere Client, right click VM > Edit Settings > VM Options > Advanced > Edit Configuration.
  • Upgrade the VM Hardware version to 15 or higher.
    • In the vSphere Client, right click VM > Compatibility > Upgrade VM Compatibility.
  • Node VMs should use VMware Paravirtual SCSI (PVSCSI) controllers.
    • If Node VMs primary disk is on a different controller, it should be moved to VMware Paravirtual SCSI (PVSCSI) controllers.

Procedure

  1. Install govc on your devbox/workstation.
  2. Obtain VM paths.
    $ export GOVC_INSECURE=1
      $ export GOVC_URL='https://<VC_Admin_User>:<VC_Admin_Passwd>@<VC_IP>'
    
      $ govc ls
      /<datacenter-name>/vm
      /<datacenter-name>/network
      /<datacenter-name>/host
      /<datacenter-name>/datastore
    
      // To retrieve all Node VMs
      $ govc ls /<datacenter-name>/vm
      /<datacenter-name>/vm/<vm-name1>
      /<datacenter-name>/vm/<vm-name2>
      /<datacenter-name>/vm/<vm-name3>
      /<datacenter-name>/vm/<vm-name4>
      /<datacenter-name>/vm/<vm-name5>
  3. To enable disk UUID, run the following command for all node VMs that are part of the Kubernetes cluster.
    govc vm.change -vm '/<datacenter-name>/vm/<vm-name1>' -e="disk.enableUUID=1"
  4. To upgrade the VM hardware version of node VMs to 15 or higher, run the following command for all node VMs that are part of the Kubernetes cluster.
     govc vm.upgrade -version=15 -vm '/<datacenter-name>/vm/<vm-name1>'