How to connect to a VM on ESXi by command line?

You can use vmware vsphere client tool (https://my.vmware.com/web/vmware/info/slug/datacenter_cloud_infrastructure/vmware_vsphere/5_5) to connect to the esxi host. By using that tool, you can see consoles of the VMs which running in it