How to assign a user input IP address to VM during provisioning

Hi Team,

We have a requirement to create a catalog where user will give the Hostname and IP address of a server. I am able to configure the hostname from the user input but I am not getting a option for IP address. Request you to suggest how we can add a user input IP address to server during server provision from Morpheus.

Thanks
Rakesh Gupta

Hi @RakaBhai1 you need to enable “Allow IP Override” checkbox on edit network settings

Create the catalog using the configuration setting and when you select the network make sure you select the static dropdown and a box to enter IP address will be shown. Use an input to replace the variable with the static IP address in the config.

Thanks,
Anish.

Hi @aabraham ,

Thanks for the solution. I will try and let you know.

Thanks
Rakesh Gupta

@aabraham ,

Hi Anish,

As suggested , I have implemented the same but the machine taking IP from DHCP still. Also the VM get stuck on network wait phase and failed. Any suggestions.

Thanks

@aabraham Can you provide the sample code of this request. I am also having the same issue

Just tested in my labs and it works. Below is the networkInterfaces array in my catalog config

 "networkInterfaces": [
    {
      "primaryInterface": true,
      "network": {
        "id": "network-4",
        "hasPool": false,
        "idName": "VLAN0002 - Internal Server 2"
      },
      "ipMode": "static",
      "showNetworkPoolLabel": false,
      "showNetworkDhcpLabel": false,
      "ipAddress": "<%= customOptions.ipAddress %>",
      "ipAddressName": "",
      "displayName": ""
    }
  ],