Hi,
I am New to VMWare
I had created VM's from template.All these newly created VM's having the same system name & IP address(static)
I have to set uniq IPaddres for these VM's .
I am executing below mentioned Commands through vSphere PowerCLI
1.Connect-VIServer –Server <Server IPAddress> –Protocol https –User <UID> –Password <pwd>
2.Get-VMGuestNetworkInterface -VM testVM -HostUser root -HostPassword pwd123 -GuestUser Administrator -GuestPassword pwd2345
3.Set-VMGuestNetworkInterface -VMGuestNetworkInterface Local Area Connection -HostUser root -HostPassword pwd123 -GuestUser Administrator -GuestPassword pwd2345-Netmask 255.255.255.0 -Gateway 10.10.10.1 -ip 10.10.10.11
I am getting below mentioed error after executing the command mentioned in point 3
Set-VMGuestNetworkInterface : Cannot bind parameter 'VmGuestNetworkInterface'.
Cannot convert value "Local Area Connection" to type "VMware.VimAutomation.ViCo
re.Types.V1.VM.Guest.VMGuestNetworkInterface". Error: "Invalid cast from 'Syste
m.String' to 'VMware.VimAutomation.ViCore.Types.V1.VM.Guest.VMGuestNetworkInter
face'."
At line:1 char:53
+ Set-VMGuestNetworkInterface -VMGuestNetworkInterface <<<< "Local Area Connec
tion" -HostUser root -HostPassword pwd123 -GuestUser Administrator -GuestPassw
ord pwd2345 -Netmask 255.255.255.0 -Gateway 10.10.10.1 -ip 10.10.10.11
After Executing the command mentioned line 2 i am getting below mentioned output
WARNING: 2 columns do not fit into the display and were removed.
VM NetworkAdapter Name IP
-- -------------- ---- --
testVM Network adapter 2 Local Area Connection 2 169.254.194.55
testVM Network adapter 1 Local Area Connection 169.254.200.201
testVM isatap.{E0C1C55C-D756-...
testVM isatap.{5BD23E53-ABB4-...
Please do let me know how to fix this issue
I tried out with below values for <VMGuestNetworkInterface>
i..Local Area Connection (with double quotes & without quotes)
ii.Local Area Connection 2 (with double quotes & without quotes)
iii.Network adapter ((with double quotes & without quotes)
Do let me know What value I need to pass for the argument "VMGuestNetworkInterface"
And let me know whether I am following correct process or not for changing the IPaddress? Else let me know the best practice/solution to sort out this issue.
Note: I am using OS 'WIndows 2008 R2 Standard" SP1
Regards,
Babu