Virtual Allan 09月29日
云模板中动态与静态IP分配
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了如何在一款云模板中实现动态和静态IP分配,包括网络配置和IP地址管理。

I have a custom that needed to have a Cloud template where it was possible to use both automatic and static IP assignment for the network on the deployment of VM’s

The requirements for this is to configured Network Profiles and also have configured IP Ranges on the networks.

The static Assigned address needs to be inside the IP Range on the network, when assigning the IP Address statically it also registers the Address as used in the IPAM.

I have build in a lot of check in the forms validation on the Service Broker, I have not taking this into this blog, I will maybe later write about that.

Here is a sample of a Cloud Template that uses this.

formatVersion: 1inputs  VLAN:    type: string  ipAddress:    type: string    default: Automatic    pattern: '^((Automatic)$|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))$'resources:  VM:    type: Cloud.vSphere.Machine    properties:      imageRef: W2K22-TMPL      size: small      customizationSpec: vRA8_in_domain_local      networks:        - network: ${resource.Network1.id}          assignment: static          address: ${input.ipAddress != 'Automatic' ? input.ipAddress:""}  Network1:    type: Cloud.vSphere.Network    properties:      networkType: existing      constraints:        - tag: vra.network.vlan:${input.VLAN}

NOTE: All other IP setting like domain, search domain, DNS server, IP mask, Gateway and etc. are taken from the network configuration in Aria Automation.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

云模板 IP分配 网络配置
相关文章