VMware Cloud Community
dimwoo
Contributor
Contributor

Login to individual ESX hosts with powercli - I just don't want to

Hi,

I am experimenting with powercli on an ESX 4.0.0 environment with VSphere client  v5.0 and Powercli 4.1 with VIX 1.10.xxx.

I want to automate a cloning process. In testing I logon to my vsphere server with the Connect-VIServer -Server xxxxxxx -User xxxxx -Password xxxxx command. Then I try a Get-VMGuestNetworkInterface -VM xxxxxxxx command to query info about the network settings of a vm running Windows 2008 Server.

The command then prompts for both a HOST id and password and a GUEST id and password. The Host id and pass seems to be for whichever ESX host is currently running the vm. This is a pain in the ass as I don't have and account for each ESX host, just my vsphere login - which has all the rights I need to manually clone, change settings etc.

This document  http://www.vmware.com/support/developer/PowerCLI/PowerCLI50/html/Invoke-VMScript.html   says in reference to get-vmguest commands:

" Specify the password you want to use for authenticating with the host. You need to specify host credentials only if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you have installed is earlier than 1.10. "
So I have upgraded my powercli to 4.1 with VIX of 1.10.something. But I'm still prompted  to login to a host when I run the command.
I am working for a 3rd party and it is a big ask to request individual ESX host logins, and I'm not sure what level of permissions they require.
Can anyone advise what I'm doing wrong? Why can't powercli use the vsphere authentication I've already logged in with connect-vi? I accept I need to provide a guest os password but attaching to individual ESX hosts seems redundant.

Thanks!

0 Kudos
2 Replies
dimwoo
Contributor
Contributor

Hi,

I was really hoping for some help with this, I hope I've stated the question clearly.

The account I use to authenticate to the vsphere client with the vi-connect command is an AD account, presumably defined in VSphere security to give me passthrough rights to the vmware environment. According to the documentation link above Powercli 4.1 and VIX 10.100.x should allow me to run the get-vmguestnetworkinterface command without neededing to additionally login to the ESX server hosting the vm. But I'm still being prompted to do so, and can't because I don't have an account to use on the ESX hosts.

Could it be that the AD account I use for VSphere doesn't have the required permissions to run get-vmguestnetworkinterface, and so I'm being prompted to login to the ESX server? If so what permissions are required? I don't have access to vsphere security so I can't see what rights I do have.

Any help gratefully received!

0 Kudos
dimwoo
Contributor
Contributor

Got some feedback about this in the powercli forum.

0 Kudos