public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pve-devel@lists.proxmox.com, Stefan Hanreich <s.hanreich@proxmox.com>
Subject: applied: [PATCH container/manager/qemu-server 0/6] persist auto-generated MAC addresses of guest network devices
Date: Wed, 25 Nov 2026 00:45:45 +0100	[thread overview]
Message-ID: <179556383865.3713286.5524497606305493138.b4-ty@b4> (raw)
In-Reply-To: <20261124145651.335234-1-s.hanreich@proxmox.com>

On Tue, 24 Nov 2026 15:56:44 +0100, Stefan Hanreich wrote:
> A guest network device without a MAC address is valid for qemu-server
> and pve-container, which generate a random one each time they parse the
> device. The API always stores one, but manual edits and restored
> backups can lack it, as can containers created with pve-container
> 3.0-8 to 3.0-10.
> 
> Since libpve-cluster-perl 9.1.11, such a container fails to start, as
> the setup code reads datacenter.cfg from pmxcfs for the random MAC
> address, from within the container's root:
> 
> [...]

Applied, thanks! I made some changes, please cross-check that they hold
up.

Folded into your patches:
- container: make add_missing_hwaddrs() skip a network device that does
  not parse or is empty, instead of failing on it. Otherwise, restoring
  a backup with such a netN line would abort after the extraction.
- qemu-server: skip templates when adding missing MAC addresses on
  start. vzdump "starts" a template to back it up, but without its
  network devices, so writing a MAC address into its config made no
  sense.

Added as separate commits, for restart migration of containers:
- after a failed migration, start the container again with its current
  config. The old one still had the migrate lock, which the new MAC
  address write could then put back into the config again.
- keep the pending changes that stopping the container applied, instead
  of writing the old config back, which made them pending again.

[pve-container] applied to pve-container.git (master)
[1/3] setup: do not read datacenter.cfg inside the container's root
      https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=904e71b9477843dd9727dcff10fab6e3e70caae2
[2/3] start: persist a MAC address for network devices without one
      https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=c520dd6f7bd415fe9f204db06ca2289e5fda1c19
[3/3] restore: add missing MAC addresses of the backup config
      https://git.proxmox.com/?p=pve-container.git;a=commitdiff;h=de82290683368c40db7ea5cc62acc24bcdadab15

[pve-manager] applied to pve-manager.git (master)
[1/1] ui: lxc: network: handle network devices without a MAC address
      https://git.proxmox.com/?p=pve-manager.git;a=commitdiff;h=7bdaea774e30e2de86e6d8da5092af37e373e907

[qemu-server] applied to qemu-server.git (master)
[1/2] start: persist a MAC address for network devices without one
      https://git.proxmox.com/?p=qemu-server.git;a=commitdiff;h=3413b049edb68940531f36a505cf7f46343b53f0
[2/2] restore: add missing MAC addresses of the backup config
      https://git.proxmox.com/?p=qemu-server.git;a=commitdiff;h=985bab4af222f5dd37c1ec26c61338ea2f8801f5




      parent reply	other threads:[~2026-11-24 23:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 14:56 [PATCH container/manager/qemu-server 0/6] persist auto-generated MAC addresses of guest network devices Stefan Hanreich
2026-11-24 14:56 ` [PATCH pve-container 1/6] setup: do not read datacenter.cfg inside the container's root Stefan Hanreich
2026-11-24 14:56 ` [PATCH pve-container 2/6] start: persist a MAC address for network devices without one Stefan Hanreich
2026-11-24 18:06   ` Dominik Csapak
2026-11-24 14:56 ` [PATCH pve-container 3/6] restore: add missing MAC addresses of the backup config Stefan Hanreich
2026-11-24 14:56 ` [PATCH qemu-server 4/6] start: persist a MAC address for network devices without one Stefan Hanreich
2026-11-24 18:06   ` Dominik Csapak
2026-11-24 14:56 ` [PATCH qemu-server 5/6] restore: add missing MAC addresses of the backup config Stefan Hanreich
2026-11-24 14:56 ` [PATCH pve-manager 6/6] ui: lxc: network: handle network devices without a MAC address Stefan Hanreich
2026-11-24 18:06 ` [PATCH container/manager/qemu-server 0/6] persist auto-generated MAC addresses of guest network devices Dominik Csapak
2026-11-24 18:38   ` Dominik Csapak
2026-11-24 19:09   ` Stefan Hanreich
2026-11-24 23:45 ` Thomas Lamprecht [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=179556383865.3713286.5524497606305493138.b4-ty@b4 \
    --to=t.lamprecht@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.hanreich@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