public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Mira Limbeck <m.limbeck@proxmox.com>
To: Friedrich Weber <f.weber@proxmox.com>,
	Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server] fix 4493: cloud-init: fix generated Windows config
Date: Mon, 22 Jul 2024 12:01:49 +0200	[thread overview]
Message-ID: <d21b6c7a-3822-48ed-a289-46861b08bd2b@proxmox.com> (raw)
In-Reply-To: <59295e1a-b33f-4c81-b12f-c20b00288017@proxmox.com>

Thank you for testing it!

On 7/18/24 17:51, Friedrich Weber wrote:
> On 09/07/2024 17:12, Mira Limbeck wrote:
>> 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.
> 
> I tested the following:
> 
> - Install cloudbase-init beta in a Windows 2022 Server VM
> - Shutdown VM
> - Attach cloudinit drive, set network config
> - Start VM
> - After some time, Windows renames itself to the VM name and reboots
> - Network config gets applied after some time (see below)
> 
> One thing I noticed: Without modifying the the standard in-guest
> cloudbase-init configuration, it takes ~2min until cloudbase-init does
> anything (in particular apply the network config). Apparently
> cloudbase-init tries to find an HTTP server with the cloudinit data
> first, and only looks into the configdrive after a timeout.
> 
> To avoid that, Mira suggested to change `metadata_services` [1] in the
> cloudbase-init config to
> `cloudbaseinit.metadata.services.configdrive.ConfigDriveService`.
> Indeed, with this setting the network config gets applied immediately on
> boot. It may be nice to add this to the documentation.
>
I'll add the `metadata_services` config option to the docs as well in a v2.

> I'm not sure if the default behavior of changing the hostname to match
> the VM name is something that Windows admins expect? Should the docs
> mention more prominently how to disable this?

I'd say it makes sense to use the VM name as hostname. This keeps the
names in sync and makes it easy to match one to the other.
Would you like to make it configurable via VM config instead? Or what
would you expect?

> 
>> There seems to be an issue with the network adapter. Whenever the guest
>> is shutdown and started again it finds a new network adapter. Rebooting
>> instead of shutting down doesn't show the same behavior.
>>
>> I'm not sure yet why this happens, but it seems to be caused by
>> cloudbase-init.
> 
> I couldn't reproduce this issue so far (using a virtio NIC).



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


      reply	other threads:[~2024-07-22 10:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 15:12 Mira Limbeck
2024-07-09 15:12 ` [pve-devel] [PATCH docs] cloudinit: add Windows cloudbase-init section Mira Limbeck
2024-07-10 14:35 ` [pve-devel] [PATCH qemu-server] fix 4493: cloud-init: fix generated Windows config Mira Limbeck
2024-07-18 15:51 ` Friedrich Weber
2024-07-22 10:01   ` 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=d21b6c7a-3822-48ed-a289-46861b08bd2b@proxmox.com \
    --to=m.limbeck@proxmox.com \
    --cc=f.weber@proxmox.com \
    --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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal