This is the code I am using to connect. From the servicecontent I cannot see the OVFManager
Function VCLogin(ByVal connection As VCConnectionDetails) As VCConnectionDetails
ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(AddressOf ValidateCertificate)
connection_state_string = "no_errors"
Try
VCConnection.Url = "https://" + connection.server + ":" + connection.port + "/sdk/vimService"
Catch ex As Exception
'MsgBox("There has been an error")
connection_state_string = "Error Connecting: Wrong Username, Password, Server or Port"
'End
End Try
VCConnection.CookieContainer = New System.Net.CookieContainer
VCConnection.Timeout = 20000
Dim MO As New VimApi.ManagedObjectReference
Dim RootFolder As New VimApi.ManagedObjectReference
MO.Value = "ServiceInstance"
MO.type = "ServiceInstance"
Try
SC = VCConnection.RetrieveServiceContent(MO)
Catch ex As Exception
'MsgBox("Error connecting, wrong IP?")
connection_state_string = "Error Connecting: Wrong Username, Password, Server or Port"
'End
End Try
connection.RootFolder = SC.rootFolder
connection.CustomFieldManager = SC.customFieldsManager
Dim session As New VimApi.UserSession
MO.Value = "SessionManager"
MO.type = "SessionManager"
Try
session = VCConnection.Login(MO, connection.username, connection.password, "en")
Catch ex As Exception
'MsgBox("Error with login. Wrong username or password?")
connection_state_string = "Error Connecting: Wrong Username, Password, Server or Port"
'End
End Try
Return connection
End Function
If you found this helpful, please consider awarding points