This project is read-only.
1

Resolved

Feature Request: Validate that a username and password have been entered if talking to a vCenter Server, ESX/ESXi hosts, or VMware Server 2.0.

description

I would like to request that VMWareLib validate that a username and password have been entered if talking to a vCenter Server, ESX/ESXi hosts, or VMware Server 2.0.
 
From the VIX API docs for the Connect function:
login
Username for authentication on the remote machine. With VMware Workstation, VMware Player, and VMware Server 1.0.x, use NULL (C++), null (C#), or empty (VB) to authenticate as the current user on local host. With vCenter Server, ESX/ESXi hosts, and VMware Server 2.0, you must use a valid login. 
password
Password for authentication on the remote machine. With VMware Workstation, VMware Player, and VMware Server 1.0.x, use NULL (C++), null (C#), or Empty (VB) to authenticate as the current user on local host. With ESX/ESXi and VMware Server 2.0, you must use a valid login. 
 
So it seems that I cannot connect using windows authentication (by passing a null username and password) to a vcenter server or esxi host.
I may be mistaken, but I believe this is the cause of the following exception:
Insufficient permissions in host operating system
Exception: Vestris.VMWareLib.VMWareException
at Vestris.VMWareLib.VMWareInterop.Check(UInt64 errCode)
at Vestris.VMWareLib.VMWareJob.Wait[T](Object[] properties)
at Vestris.VMWareLib.VMWareJob.Wait[T](Object[] properties, Int32 index, Int32 timeoutInSeconds)
at Vestris.VMWareLib.VMWareJob.Wait[T](Int32 propertyId, Int32 timeoutInSeconds)
at Vestris.VMWareLib.VMWareVirtualHost.Connect(ServiceProviderType serviceProviderType, String hostName, Int32 hostPort, String username, String password, Int32 timeout)
at Vestris.VMWareLib.VMWareVirtualHost.ConnectToVMWareVIServer(Uri hostUri, String username, String password, Int32 timeoutInSeconds)
at Vestris.VMWareLib.VMWareVirtualHost.ConnectToVMWareVIServer(String hostName, String username, String password, Int32 timeoutInSeconds)
at Vestris.VMWareLib.VMWareVirtualHost.ConnectToVMWareVIServer(String hostName, String username, String password)
 
Thank you.

comments

icnocop wrote Feb 19, 2011 at 10:46 PM

I think the exception is ok, so maybe we can just add this requirement to the vmwaretasks xml documentation.

wrote Feb 22, 2011 at 8:23 AM

icnocop wrote Feb 22, 2011 at 9:01 AM

I've uploaded patch #8454 to resolve this issue.

wrote Mar 20, 2011 at 8:35 AM

wrote Feb 14, 2013 at 7:19 PM

wrote May 16, 2013 at 9:31 AM

wrote May 16, 2013 at 9:31 AM

wrote Jun 14, 2013 at 7:58 AM