'Custom Script') pass variables - define hostname"}]}">
解决了

云 - init(创建VM>'自定义脚本')传递变量 - 定义主机名

  • 2020年10月12日
  • 5个答复
  • 1972年的观点

大家好,

有谁知道在通过Prism元素中创建AHV时,是否可以将变量传递到“自定义脚本” /云 - 输入部分?

Ideally, I’d like to use the REST API to create (clone) a VM from a template, and pass a ‘Custom Script’ perhaps from an ADSF path, that is able to configure the guest’s Hostname / FQDN based off the VM’s name specified in the REST API call.

IPAM和一些基本的Cloud-Init配置正在工作,只是试图确定设置主机名的最佳方法!

'Custom Script') pass variables - define hostname","prefixId":"beantwoord","contentType":"question","views":1972},"phrases":{"Forum":{"topic.helpfulness.text":"Did this topic help you find an answer to your question?","topic.helpfulness.thanks":"Thanks for your feedback","topic.helpfulness.indicator":"found this helpful"}}}">
该主题已关闭以供评论

5个答复

UserLevel 6
徽章 +5

嗨,Justinl123,

你看过吗?这个帖子?它有用还是您想要的不是您想要的?

嘿,Alona,

有点儿。我想编程创建带有名称xyz的VM,还将该名称xyz放在主机名:自定义脚本的字段(即云端)。这样,我们可以调用脚本,例如10次并递增主机名,即XYZ01,XYZ02,XYZ03,…,VM将适当地命名,以及来宾主机名。

这样,我们可以通过在主机名前缀中运行一个通过一个脚本来一次淘汰n个数量的VM。

这个更符合我想做的事情,但没有冷静的整合。当我有机会时,我将查看还构建的REST API调用脚本,Base64用匹配的主机名编码Cloud-Init“用户数据”部分。

UserLevel 6
徽章 +5

我懂了!还有这个KBAHV:Ubuntu云图像VM创建选项2通过使用卷发通过Prism Central通过REST API调用创建和配置VM。

啊,yep,恰好使用包装器脚本围绕它自动化步骤,从而接受主机名的参数!

非常感谢!

UserLevel 6
徽章 +5

伟大的!很高兴这很有帮助:)

Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu