4

In general, my goal is to get the IP of a VM that doesn't have VMTools installed, by it's name.

The docs of FindByIp says

The IP address for a virtual machine is the one returned from VMware tools, ipAddress .

(from https://github.com/vmware/pyvmomi/blob/master/docs/vim/SearchIndex.rst)

So I'm wondering if it's this information is even accessible? And if so - how can I get to it by the VM's name?

user5908639
  • 51
  • 2
  • 6

1 Answers1

1

To get an instance through the name of a VM, use ContainerView to find the same name in every VM list. Then, after obtaining an instance of the VM,

vm.guest.ipAddress

See Using ContainerView.

JioHooney
  • 51
  • 3