From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 4274E1FF066 for ; Tue, 24 Nov 2026 22:26:57 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 69ACD2153C; Tue, 24 Nov 2026 22:26:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sfc.wide.ad.jp; s=mail2; t=1795555598; bh=mfprMpXePSVkgguD1E51Mm6aaZ2S+xrSL53kOeZjtR0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NVvTBMguRyOiY4YETrTvMnWBOQHgGs5ae5FwaqovhPQ692POo/tu1Nt4ZwXUDPm5g BsXTqtMSV8jcYznD2nr6JJQEmuCcQK9jV++0d39f1d8oveqFHJfcYuAQHcn2toQv7V GUD20QDgzx6w1q6INQ6g1xSm8fus6xuzhIWfJMOeRYneCkENFRVcyOQr/5ckUFOBOF 5Rkbw6vxOT/WqDRMzAt9TlRw+WU9C6bXyUUGIOaPkUePSSqaXxTPnmY0ob63v0QLtr J+s6E7PYcjayVCmU5IYLHwjT0U5r0E+O3az3epabFxUo0bYdDK86rkY3F3EZ94uvEC 320BbYC17/8cw== From: negineri 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 Message-ID: <20261124212608.12996-3-negineri@sfc.wide.ad.jp> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261124212608.12996-1-negineri@sfc.wide.ad.jp> References: <20261124212608.12996-1-negineri@sfc.wide.ad.jp> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: DJASW3YOYOH5TL5HXKMTKYM7KAAR2RXW X-Message-ID-Hash: DJASW3YOYOH5TL5HXKMTKYM7KAAR2RXW X-MailFrom: negineri@sfc.wide.ad.jp X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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