From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 267781FF0B3 for ; Wed, 25 Nov 2026 00:49:55 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4213721633; Wed, 25 Nov 2026 00:49:52 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com, Stefan Hanreich 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 Message-ID: <179556383865.3713286.5524497606305493138.b4-ty@b4> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261124145651.335234-1-s.hanreich@proxmox.com> References: <20261124145651.335234-1-s.hanreich@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795564186266 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.022 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) KAM_LOTSOFHASH 0.25 Emails with lots of hash-like gibberish RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: PQLNDBW26CLF7WQETKDSC4BWL6ZSIBYF X-Message-ID-Hash: PQLNDBW26CLF7WQETKDSC4BWL6ZSIBYF X-MailFrom: t.lamprecht@proxmox.com 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: 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