As a DevOps engineer, you can use the vSphere VM web console to access and troubleshoot problematic VMs. Using the VM web console can be helpful when VMs are not accessible through the normal network, for example, when the guest OS failed to configure the correct network settings during first boot.

The VM web console becomes especially useful when you deploy VMs with configurable OVF properties. For more information, see Deploy VMs with Configurable OVF Properties in vSphere IaaS Control Plane.

Prerequisites

Have edit or owner permissions on the namespace where the problematic VM is deployed. For more information, see vSphere IaaS Control Plane Identity and Access Management.

Procedure

  1. Access your namespace in the Kubernetes environment.
  2. Verify that the VM is deployed.
    kubectl get vm -n namspace-name

    The output is similar to the following:

    NAME      POWERSTATE        AGE
    vm-name   poweredOn         175m
  3. Obtain the URL to the VM web console.
    kubectl vsphere vm web-console vm-name -n namspace-name
    Note: The command returns an authenticated URL to the VM's web console as output. If you don't use the URL within a non-changeable period of time, set to two minutes, the URL expires. After you open the URL to connect to the web console page, the session time is controlled by WebMKS and lasts longer.
  4. Click the URL and perform any necessary troubleshooting actions for your VM.