From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 20F801FF173 for ; Tue, 30 Jul 2024 10:12:17 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B1E6037FB8; Tue, 30 Jul 2024 10:12:17 +0200 (CEST) Message-ID: <4b27af7c-7f5d-4338-b5ed-c6eff557b283@proxmox.com> Date: Tue, 30 Jul 2024 10:12:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Thomas Lamprecht , Proxmox VE development discussion References: <20240729151931.363107-1-m.limbeck@proxmox.com> <8f73a3b4-2baf-40ac-8230-b804cb85a6d0@proxmox.com> Content-Language: en-US From: Mira Limbeck In-Reply-To: <8f73a3b4-2baf-40ac-8230-b804cb85a6d0@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.326 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [readthedocs.io, cloudinit.pm] Subject: Re: [pve-devel] [PATCH v2 qemu-server] fix 4493: cloud-init: fix generated Windows config X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 7/29/24 19:22, Thomas Lamprecht wrote: > Am 29/07/2024 um 17:19 schrieb Mira Limbeck: >> cloudbase-init, a cloud-init reimplementation for Windows, supports only >> a subset of the configuration options of cloud-init. Some features >> depend on support by the Metadata Service (ConfigDrive2 here) and have >> further limitations [0]. >> >> To support a basic setup the following changes were made: >> - password is saved as plaintext for any Windows guests (ostype) >> - DNS servers are added to each of the interfaces >> - SSH public keys are passed via metadata >> >> Network and metadata generation for cloudbase-init is separate from the >> default ConfigDrive2 one so as to not interfere with any other OSes that >> depend on the current ConfigDrive2 implementation. >> >> [0] https://cloudbase-init.readthedocs.io/en/latest/index.html >> >> Signed-off-by: Mira Limbeck >> --- >> v2: >> - unchanged >> >> v1: >> >> DNS search domains are not handled at all by the cloudbase-init ENI >> parser. >> The password is used for the Admin user specified in the >> cloudbase-init.conf inside the guest. Specifying a different user does >> not work. This would require rewriting the userdata handling as >> described in #5384 [1] which is a breaking change. Userdata generation >> is currently shared between all implementations, but the new one could >> be made cloudbase-init only for now. >> >> To know if the password needs to be unencrypted, we have to check the >> `ostype`. For this we need access to the config. That's why I moved the >> `cipassword` handling inside $updatefn. >> >> When no `citype` is specified, it will default to `configdrive2` on >> Windows. The check requires `ostype` to be set correctly. >> Any other `citype`s may not work correctly if used for cloudbase-init. >> >> The docs patch adds a section on how to configure a Windows guest for >> cloudbase-init. > > certainly not a clear-cut, but IMO most above might be even fine for the > commit message as (advanced) background and hints for future dev/support > engineers debugging CI on windows. > Since a v3 is required for the docs patch, I'll add those parts to the commit message in a v3. > >> diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm >> index abc6b14..d4ecfac 100644 >> --- a/PVE/QemuServer/Cloudinit.pm >> +++ b/PVE/QemuServer/Cloudinit.pm >> @@ -8,6 +8,8 @@ use Digest::SHA; >> use URI::Escape; >> use MIME::Base64 qw(encode_base64); >> use Storable qw(dclone); >> +use JSON; >> +use URI; > > Using that module would need adding `liburi-perl` as dependency, and I did not check > closely but quite probably also as build-dependency. > > I can fleece that in on applying though, but I'd like some T-b tag (and would naturally > appreciate any R-b one) before applying this one. > I just noticed, we already have a `use URI::Escape` which is all that's needed for the changes here, so adding `use URI` is not required. I'll check and add the liburi-perl dependency in a v3 then. Thanks! _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel