你好
- 我在Nutanix AOS上安装了Ubuntu 20.04 LTS,该安装用作模板
- 此Ubuntu Tempate安装是一种基本的Ubuntu安装(单击基本安装,安装云)
- 现在,我希望用户能够从此Ubuntu模板中部署新的VM作为克隆,并通过“自定义脚本”选项通过PRISM GUI中的云输入脚本。
不幸的是,这不起作用 - 创建克隆期间未应用“自定义脚本”云指令。
我是否必须在Ubuntu模板安装中修改某些内容(例如cloud-Init DataSource或Similiar,/etc/cloud/cloud.cfg或erthing)?
我看现有文档(云,nutanix,ubuntu)等的地方都不重要。
过去,我有一个工作示例,centos 7与nutanix,cloud -init和通过prism元素中的自定义脚本选项部署 - 但我无法与ubuntu一起运行它
P.S
我知道这篇文章https://portal.nutanix.com/page/documents/kbs/details?targetId=ka00e00000000000000cshjcas- 但这不是我需要的 - 我不想让创建VM的用户访问ACLI-他们只能在我的环境中通过Prism Element GUI工作,因此我必须使用上述Ubuntu模板的克隆过程来完成此操作。。
最好的答案BGS
Steps that are necessary for Ubuntu 20.04 LTS (*if* you have a Ubuntu 20.04 Basic Installation which you have set up normally as a Guest and which you want to use as a Source for Clones and adjustement via cloud-init) :<\/p>
\u00a0<\/p>
- apt purge cloud-init (clean up Template Installation from existing cloud-init)<\/li>\t
- rm -rf \/etc\/cloud (clean up Template Installation from existing cloud-init)<\/li>\t
- rm -rf \/run\/cloud-init (clean up Template Installation from existing cloud-init)<\/li>\t
- apt install cloud-init (install cloud-init newly)<\/li>\t
- dpkg-reconfigure cloud-init (select ConfigDrive, None as Options)<\/li>\t
- systemctl enable cloud-init.service<\/li>\t
- shutdown Template VM (and use it as Source VM for Clone in Prism)<\/li>\t
- Clone the template VM via \u201cCustom Script\u201d option and pass your cloud-init user-data stuff<\/li><\/ol>
\u00a0<\/p>
This is the basic outline. Maybe there would be an easier way - i hate cloud-init<\/div>\u00a0<\/p>
\u00a0<\/div>查看原件\u00a0<\/p>","className":"post__content__best_answer"}">