public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Mira Limbeck <m.limbeck@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH v2 qemu-server] fix 4493: cloud-init: fix generated Windows config
Date: Tue, 30 Jul 2024 10:12:13 +0200	[thread overview]
Message-ID: <4b27af7c-7f5d-4338-b5ed-c6eff557b283@proxmox.com> (raw)
In-Reply-To: <8f73a3b4-2baf-40ac-8230-b804cb85a6d0@proxmox.com>

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 <m.limbeck@proxmox.com>
>> ---
>> 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


      reply	other threads:[~2024-07-30  8:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 15:19 Mira Limbeck
2024-07-29 15:19 ` [pve-devel] [PATCH v2 docs] cloudinit: add Windows cloudbase-init section Mira Limbeck
2024-07-29 15:29   ` Shannon Sterz
2024-07-29 17:22 ` [pve-devel] [PATCH v2 qemu-server] fix 4493: cloud-init: fix generated Windows config Thomas Lamprecht
2024-07-30  8:12   ` Mira Limbeck [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=4b27af7c-7f5d-4338-b5ed-c6eff557b283@proxmox.com \
    --to=m.limbeck@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal