Associate imported VM with IP pool address

When converting existing VMs to managed, is there no way to link them to an IP address in the pool the same as you’d do for a VM provisioned via Morpheus?

It’s possible to add a manual allocation to the pool but it isn’t associated with an instance, therefore if the instance is ever deleted the IP will still be reserved in the pool.

Via the API for querying addresses in a pool there is a refType and refId to relate the IP to a specific object - is there a way to set this manually for a VM that’s already got an address which has been imported to Morpheus?

So quickly testing the only mechanism I have found to achieve this is updating the information in the Morpheus Database.

Table: network_pool_ip
ref_type: ComputeServer
ref_id: ID of the server (not instance)
id: The ID of the actual synced reservation that was created externally in the IPAM

Example query:
update network_pool_ip set ref_type = "ComputeServer", ref_id = 33530 where id = 6875;

I would highly recommend backing up your database before doing any modifications.

1 Like

Thanks, so not really something we would do day-to-day. But presumably a drop-down could be added to the form or an additional parameter to the API to provide the ID of a server that could be added to those fields in the DB. Guess this is a new feature that would need development.

Correct. Ideally at the very least an API update would enable you to write a call to scrape a set or all brownfield vms.

I believe there was reasoning on why we don’t automatically map this association but others would have to speak to that.