VMware Cloud Community
bug_juice
Contributor
Contributor
Jump to solution

How do i determine my ESX IP with vMA?

Hi,

I'd like to find out what my ESX host's IP is from within vMA but i don't see a esxcfg-vswif command in vMA. Is there another way when connected to an ESX host via vMA to get the IP of vswif0?

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

You can get this using the vSphere APIs, but it's not available in any canned VMware script because you should not be configuring the vswif interface remotely, especially if you only have one.

Though if you want to query it, here is a script I just wrote that gets you what you need:

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

0 Kudos
3 Replies
Texiwill
Leadership
Leadership
Jump to solution

Hello,

Use the Perl SDK to query the HostSystem entities. An example of this is within the vGhetto repository on sourceforge.net


Best regards,
Edward L. Haletky VMware Communities User Moderator, VMware vExpert 2009

Now Available: 'VMware vSphere(TM) and Virtual Infrastructure Security'[/url]

Also available 'VMWare ESX Server in the Enterprise'[/url]

Blogging: The Virtualization Practice[/url]|Blue Gears[/url]|TechTarget[/url]|Network World[/url]

Podcast: Virtualization Security Round Table Podcast[/url]|Twitter: Texiwll[/url]

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
bug_juice
Contributor
Contributor
Jump to solution

Don't suppose you know which script has that sample in it? :smileygrin:

0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

You can get this using the vSphere APIs, but it's not available in any canned VMware script because you should not be configuring the vswif interface remotely, especially if you only have one.

Though if you want to query it, here is a script I just wrote that gets you what you need:

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos