VMware Cloud Community
viShukla
Contributor
Contributor

Assigning IP address using Network Profile in Aria Automation

I want to assign IP address from network profile internal IP ranges which I have already defined to the vms deployed from the blueprint automatically. I am new to aria automation so having some trouble doing so. How can I do that?

Reply
0 Kudos
6 Replies
bdamian
Expert
Expert

Just be sure that you use the correct tag pointing to the Network with internal IPAM and set assignment: static in the Machine part of the YAML

formatVersion: 1
inputs: {}
resources:
  Server:
    type: Cloud.vSphere.Machine
    properties:
      image: Ubuntu_20.04
      flavor: small
      networks:
        - network: ${resource.VMNetwork.id}
          assignment: static
  VMNetwork:
    type: Cloud.Network
    properties:
      networkType: existing
      constraints:
        - tag: net:mynetwork

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
Reply
0 Kudos
viShukla
Contributor
Contributor

Hi @bdamian ,

I have already set the assignment as static and used the correct tag as you have shown but after creation the vm is still not taking IP from the ranges defined. I am not sure what the issue is. Do I need to do some specific settings in vm template used in the blueprint too? Below is my code:

viShukla_0-1698501928957.png

Reply
0 Kudos
xian_
Expert
Expert

Do you have vm tools installed on the image?

Reply
0 Kudos
viShukla
Contributor
Contributor

Yes

Reply
0 Kudos
bdamian
Expert
Expert

Please deploy a VM from the same VM template just using vCenter and use a customization spec to set a specific IP. Did this work?

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
kjellcomputer
Enthusiast
Enthusiast

On your Cloud_vSphere_Machine_1 object you need to specify which customization spec in vSphere to use so that during provision the IP that Aria Automation assigns get's configured on your deployment.

https://docs.vmware.com/en/VMware-Aria-Automation/8.14/Using-Automation-Assembler/GUID-87ECCC3B-C3EA...

Remember that this requires perl on your image so that the VMware Tools service can configure your linux host. Another approach is to use cloud-init:

https://docs.vmware.com/en/VMware-Aria-Automation/8.14/Using-Automation-Assembler/GUID-FB1E4A8E-B310...

 

Reply
0 Kudos