VMware Cloud Community
DanielThomson
Enthusiast
Enthusiast
Jump to solution

vCloud network allocated addresses

I am looking for some assistance. I am scripting the allocation of IP's for VM's deployed to a org network backed by a specific external network.

Currently I am running:

$extnet = get-externalnetwork "externalnetworkname"

I then want to get the list of IP's from this network that have been allocated to VM's already:

$AllocatedIps = $extnet.ExtensionData.GetallocatedAddresses().IpAddres.IPAddress

I thought this was working, until I started picking up duplicate IP allocations.

It turns out this only returns the first 128 allocated IP addresses. (Currently I have a possible 939 available IP addresses on this external network)

How can I return the full list of IP addresses that have already been allocated?

0 Kudos
1 Solution

Accepted Solutions
DanielThomson
Enthusiast
Enthusiast
Jump to solution

ok, so it appears I may have more joy using this:

$AllocatedIPs = $extnet.ExtensionData.configuration.ipscopes.ipscope.allocatedipaddresses.ipaddress

If I do a count on this it currently matches the 157 allocated IP's. So I will update my script and then feedback regarding whether this issue has bene resolved.

View solution in original post

0 Kudos
2 Replies
DanielThomson
Enthusiast
Enthusiast
Jump to solution

ok, so it appears I may have more joy using this:

$AllocatedIPs = $extnet.ExtensionData.configuration.ipscopes.ipscope.allocatedipaddresses.ipaddress

If I do a count on this it currently matches the 157 allocated IP's. So I will update my script and then feedback regarding whether this issue has bene resolved.

0 Kudos
DanielThomson
Enthusiast
Enthusiast
Jump to solution

I can confirm this has resolved the issue I was having with manual IP assignments.

0 Kudos