VMware Cloud Community
Boberts
Contributor
Contributor

IP Address showing as Allocated for destroyed machine

I have run into a situation where a machine has been destroyed and is no longer in my managed items, but the there is still an IP address allocated to it in the network profile.  I have tried to reclaim it, but the button is grayed out.  Does anyone have any idea how to manually reclaim this address?

Thanks,

Ann

0 Kudos
3 Replies
poorem
Enthusiast
Enthusiast

Ann,

Which version of vRA is this for?

0 Kudos
Boberts
Contributor
Contributor

My apologies.  It’s version 7.1

0 Kudos
admin
Immortal
Immortal

You can directly modify the database to mark the IP address as unallocated. Here is a SQL script to help, although it needs mofiying.

SELECT IPAddress.ID

,StaticIPv4NetworkProfileID

,StaticIPv4RangeID

,VirtualMachineID

,Hostname

,IPv4Address

,IPSortValue

,StaticIPv4AddressState

,NetworkInterfaceCardOffset

FROM StaticIPv4Address AS IPAddress

JOIN StaticIPv4NetworkProfile AS NetworkProfile

ON IPAddress.StaticIPv4NetworkProfileID = NetworkProfile.ID

That should show you all IP addresses, however you can add a where clause and specify the IP address. Once you see where it is, you can update the StaticIPv4AddressState to 1, either manually by editing the table (please close it afterwards) or by running a SQL update query.

The where clause would be...

WHERE IPv4Address = 'x.x.x.x'

There is no reason for the join but i just grabbed the query to demonstrate.

Oli

0 Kudos