Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 246286

Re: I Need help, How to configure IP addresses of VMs with PowerCLI

$
0
0

There are a number of things that can go wrong as described in the Set-VMGuestNetworkInterface cmdlet help description:

This cmdlet configures the network settings of a virtual machine using VMware Tools. The cmdlet allows IP and routing configuration. You can modify Wins settings only for Windows virtual machines. The cmdlet sends a remote script which executes inside the virtual machine in the context of the specified user account. This cmdlet supports only Windows XP 32 SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit and Redhat Enterprise 5 operating systems.

To run this cmdlet against vCenter Server/ESX/ESXi versions earlier than 5.0, you need to meet the following requirements:
*You must run the cmdlet on the 32-bit version of Windows PowerShell.
*You must have access to the ESX that hosts the virtual machine over TCP port 902.
*For vCenter Server/ESX/ESXi versions earlier than 4.1, you need VirtualMachine.Interact.ConsoleInteract privilege. For vCenter Server/ESX/ESXi 4.1 and later, you need VirtualMachine.Interact.GuestControl privilege.

 

To run this cmdlet against vCenter Server/ESXi 5.0 and later, you need VirtualMachine.GuestOperations.Execute and VirtualMachine.GuestOperations.Modify
privileges.


 

Does the command give an error message and can you show that to us?

 

If you are not using an account that has rights in your vSphere environement then you have to specify credentials in your command. For example:

 

$GuestCredential=Get-CredentialGet-VMHostMY_ESX_HOST |Get-VMMachinedetest1 |Get-VMGuestNetworkInterface-GuestCredential$GuestCredential |Where-Object {$_.name -eq"Local Area Connection"} |Set-VMGuestNetworkInterface-IPPolicystatic-Gateway192.168.1.1-Netmask255.255.255.0-Ip192.168.1.5-Verbose-GuestCredential-GuestCredential$GuestCredential

Viewing all articles
Browse latest Browse all 246286

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>