Add a secondary IP on the same network card

Description:
Hello,
Is there any option/best approach to add a secondary IP on the same network card from Morpheus and reserve the IP in the network IP pool?
If we add the secondary IP from the operating system, Morpheus will not know that the IP is taken.
We would like to know what is the best approach on this specific scenario.
Thanks,
Augustin Farcas


Example/Use case(s):
There are some environments where developers want to add multiple IP addresses from the same VLAN(network segment) on the same network card. Usually this is required when they want to configure multiple services on the same port.


Hi, welcome!

Without thinking too much about it, it feels like you could use an operational workflow, with tasks to create the IP address on the VM and then reserve it in the IP pool via the Morpheus API.

Catalog Item/Form, offering a list of available IPs, list of target VMs, and providing there is connectivity to the VM via Agent/SSH/WinRM that feels like it would would work and offer the developers a simple order experience.

BTW Your question has been added in ideas, I wonder based on the subject/question if that was the intention?

Hello,

We want to allow the Virtual Machine owners to do it as a “self service”.
What we want to achieve is:

  • Read the existing network of the VM
  • Get the next free IP from the network pool (same network associated on the VM)
  • Reserve the IP in the network pool
  • Assign the IP in the operating system or send email/list the IP, so the VM owner can configure it in the operating system

I added this in the “ideas” because it was suggested by Morpheus support team in a meeting.

BTW, can you share with me the API call to reserve an IP in a network pool?

Thanks,
Augustin Farcas

If the API endpoint is not there to reserve the IP address, this approach won’t work. I will check.

1 Like

This endpoint allows you to reserve a IP address from a Pool: Create a Network Pool IP Address

To specify what IP you want to reserve you send the following

{
  "networkPoolIp": {
    "hostname": "my-hostname",
    "ipAddress": "192.168.0.70"
  }
}

If you want to get first available you need to leave out the “ipAddress” from the payload

{
  "networkPoolIp": {
    "hostname": "my-hostname"
  }
}
1 Like