1

Is there a way to configure the management interface of a nested ESXi Guest over PowerCLI?

I'm looking to automate the configuration of a nested ESXi VM for testing customer configurations / clusters. I see that the Get-EsxCli command seems to do what I want, i.e.

$esxcli = Get-EsxCli -VMHost "YourHost"

$esxcli.network.ip.interface.ipv4.set(-i vmk1 -I 10.27.51.143 -N 255.255.255.0 -t static)

However I see the host must already exist in vCenter, so from a templated VM with no networking this isn't possible.

I think Set-VMGuestNetworkInterface is only valid for Windows guests.

  • 2
    Why don't you have the freshly installed ESXi grab an IP address via DHCP? After it's up and accessible you can then reconfigure it with a static address. – Michael Hampton Oct 2 '15 at 9:08
  • Worst case scenario yes, this would work. However it's just another service to run. Ideally if it could just be scripted straight off the bat, this would be preferred. :) – StackUser_py Oct 2 '15 at 9:17
  • You would have to do a scripted install of ESXi (like everyone else does) rather than simply copying an unconfigured VM template. – Michael Hampton Oct 2 '15 at 9:23
  • Yea, I thought so, was just wondering if anything existing for such scenarios. – StackUser_py Oct 2 '15 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.