Check Free IP addresses in Network Pool in Cloud Director (KB#00094)

Overview

This is actually not a big deal when you can check this in cloud director GUI and you would see number of articles to explain this from GUI. But, if there is no option to check the IP address allocation from GUI then it would be far difficult for you if you only work with GUI. My customer reported me that he can't see the assigned or allocated IP addresses and had to ping each and every IP address to check whether its allocated or not. It is actually a headache.

Issue

Two issues were there

1. Checking IP allocation for external network is restricted to System Administrator. My customer was tenant administrator and wanted to check this which is not possible due to product design.
2. If you are System Administrator, you might not get any option to extract the list of IP addresses to store with you or use in excel for quick filter and highlight of free IP addresses etc..
3. Checked on VMware Cloud Director versin 10.1.2

Solution 

Credit goes to powershell here. I could create below script which easily could give you the results. Just copy below output and then paste it into powershell screen from where you can access your cloud director environment.

#

$vcd = Read-Host "Enter vCD url to connect"

Connect-CIServer $vcd

$network = Read-Host "Enter the name of network here"

$ExtNet = Get-ExternalNetwork -Name $network

$ExtNet.ExtensionData.Configuration.IpScopes.IpScope.allocatedipaddresses.IpAddress | Out-GridView

#

Below is sample out-


let's verify the sample output from GUI-


Let me know if you have any thought around it. 

Thank you.

 

0 Comments:

Post a comment