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.

StackUser_py
  • 283
  • 2
  • 4
  • 14
  • 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 02 '15 at 09: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 02 '15 at 09:17
  • You would have to do a [scripted install of ESXi](http://pubs.vmware.com/vsphere-60/topic/com.vmware.vsphere.install.doc/GUID-870A07BC-F8B4-47AF-9476-D542BA53F1F5.html) (like everyone else does) rather than simply copying an unconfigured VM template. – Michael Hampton Oct 02 '15 at 09:23
  • Yea, I thought so, was just wondering if anything existing for such scenarios. – StackUser_py Oct 02 '15 at 10:10

0 Answers0