VMware Cloud Community
ReazBaksh
Contributor
Contributor

Two or more instances of vimclient

I'm writing a C# application that needs to access two or more vSphere hosts, not vCenter. I can connect to all fine and list the VM's but when I query a VM it takes the vimClient information from the last connected vShere host. Is there a way to retain the VM host information with each VM?

I am using the following to connect to host 1:

Client_1.Connect(logon.esxiLogonURL(IP_1.Text)); 
Client_1.Login(logon.esxiLogonUser(username_1.Text), logon.esxiPassword(password_1.Text));

and the following to connect to host 2

Client_2.Connect(logon.esxiLogonURL(IP_2.Text)); 
Client_2.Login(logon.esxiLogonUser(userName_2.Text), logon.esxiPassword(password_2.Text));

Any idea on how I can do this?

Thanks

Reply
0 Kudos
0 Replies