From: negineri <negineri@sfc.wide.ad.jp>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager 2/2] fix #7100: ui: cloud-init: allow configuring /etc/hosts management
Date: Wed, 25 Nov 2026 06:26:08 +0900 [thread overview]
Message-ID: <20261124212608.12996-3-negineri@sfc.wide.ad.jp> (raw)
In-Reply-To: <20261124212608.12996-1-negineri@sfc.wide.ad.jp>
Expose cimanagehosts as a checkbox in the Cloud-Init panel, with the
enabled default matching qemu-server. Require VM.Config.Cloudinit to
edit or remove the option and submit an explicit zero when unchecked.
Requires the qemu-server patch adding cimanagehosts.
Signed-off-by: negineri <negineri@sfc.wide.ad.jp>
---
www/manager6/qemu/CloudInit.js | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js
index 0895d83a..fb053ca5 100644
--- a/www/manager6/qemu/CloudInit.js
+++ b/www/manager6/qemu/CloudInit.js
@@ -169,6 +169,7 @@ Ext.define('PVE.qemu.CloudInit', {
me.editorConfig.pveSelNode = me.pveSelNode;
let caps_ci = caps.vms['VM.Config.Cloudinit'] || caps.vms['VM.Config.Network'];
+ let canManageHosts = !!caps.vms['VM.Config.Cloudinit'];
/* editor is string and object */
me.rows = {
ciuser: {
@@ -269,6 +270,27 @@ Ext.define('PVE.qemu.CloudInit', {
},
defaultValue: '',
},
+ cimanagehosts: {
+ header: gettext('Manage /etc/hosts'),
+ iconCls: 'fa fa-file-text-o',
+ renderer: Proxmox.Utils.format_boolean,
+ defaultValue: 1,
+ never_delete: !canManageHosts,
+ editor: canManageHosts
+ ? {
+ xtype: 'proxmoxWindowEdit',
+ subject: gettext('Manage /etc/hosts'),
+ items: {
+ xtype: 'proxmoxcheckbox',
+ name: 'cimanagehosts',
+ uncheckedValue: 0,
+ value: 1,
+ fieldLabel: gettext('Manage /etc/hosts'),
+ labelWidth: 140,
+ },
+ }
+ : undefined,
+ },
ciupgrade: {
header: gettext('Upgrade packages'),
iconCls: 'fa fa-archive',
--
2.56.1
prev parent reply other threads:[~2026-11-24 21:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 21:26 [PATCH qemu-server/pve-manager 0/2] fix #7100: allow disabling cloud-init /etc/hosts management negineri
2026-11-24 21:26 ` [PATCH qemu-server 1/2] fix #7100: cloud-init: make /etc/hosts management configurable negineri
2026-11-24 21:26 ` negineri [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261124212608.12996-3-negineri@sfc.wide.ad.jp \
--to=negineri@sfc.wide.ad.jp \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox