From nobody Wed Jun 24 21:46:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1781241505; cv=none; d=zohomail.com; s=zohoarc; b=KTwVRprKHZeXql8CAWaigJYqancAojvZBn92zBlFCjdL4OUs0TLtD7MTe5KI3ykCwEVPbBEJgb/QcgNLmNp8zSL7RmTLT/bN6VyZAbGjFlS05nD9DDC+AL/9sgvoP8oLmo8FiIU7j8jLLJAWGTu1/XBWSZgumJaGy/OAvmby3R8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781241505; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=pr+i0lORFK6xXK+IQoxbs9W3cQxJbzdtK1K35O/QOVw=; b=Wc1qajOAkSQyfMh/aj9wLrTBA3fwnl8dQVhcHn9yx0PdaWCaB8Y/A8PoHG626PZHO7pg7gGvRZH1P/FyE/9pdqmUiY8SZvECsDKjWyH4imvksoJMLOLMtLKgXeyDzD9e0hAX3hrxfJC2moGCBfIyeb1Pl61NTinuCwvU2MeI5oQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 17812415049691003.6121822195176; Thu, 11 Jun 2026 22:18:24 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 9F5EF41B90; Fri, 12 Jun 2026 01:18:23 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id AF6C341D08; Fri, 12 Jun 2026 01:16:34 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2F96541C32; Fri, 12 Jun 2026 01:16:25 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id BB1F041CC5 for ; Fri, 12 Jun 2026 01:16:00 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-w_uLKfrzO2uWbqC81ZGY0Q-1; Fri, 12 Jun 2026 01:15:58 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 558F219560BC for ; Fri, 12 Jun 2026 05:15:57 +0000 (UTC) Received: from rsmigiel-thinkpadx1carbongen11-remote-csb.redhat.com (unknown [10.44.48.59]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 691BA180058F; Fri, 12 Jun 2026 05:15:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781241360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pr+i0lORFK6xXK+IQoxbs9W3cQxJbzdtK1K35O/QOVw=; b=RNRAgM+7YiQ4ujEwzYpRF7qcQUHJH7LD2IEd+JCAIZptvru+n7vAuRlnSUoaAgITvmwXVr jkzKpNesirhkD5HykljxGBGUEweN9qc6rOl0UhBI6FZiLab1pf98rvxAoaITRL64kU4od9 sjJxcs9DqqtNQnf0AfY01AfAxCcdV3M= X-MC-Unique: w_uLKfrzO2uWbqC81ZGY0Q-1 X-Mimecast-MFC-AGG-ID: w_uLKfrzO2uWbqC81ZGY0Q_1781241357 To: devel@lists.libvirt.org Subject: [PATCH v2 1/2] lxc: Assign aliases to filesystem devices Date: Fri, 12 Jun 2026 07:14:58 +0200 Message-ID: <20260612051542.753412-2-rsmigiel@redhat.com> In-Reply-To: <20260612051542.753412-1-rsmigiel@redhat.com> References: <20260612051542.753412-1-rsmigiel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: wwB0bOETpuRyFItFKokr5ZRCZ9B3z1MnFFfWcIUwdPI_1781241357 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WYQGVXAGIOZFPMMEFOQYKILEZE27PCQS X-Message-ID-Hash: WYQGVXAGIOZFPMMEFOQYKILEZE27PCQS X-MailFrom: rsmigiel@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Radoslaw Smigielski X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Rados=C5=82aw_=C5=9Amigielski_via_Devel?= Reply-To: rsmigiel@redhat.com X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781241505661158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Radoslaw Smigielski LXC domains did not assign device aliases to filesystem devices during domain startup. Only console devices received aliases. This change assigns aliases in the format 'fs0', 'fs1', etc. to all filesystem devices during domain startup, following the same pattern used for console devices. Before this patch, virsh dumpxml showed filesystem devices without aliases: After this patch, filesystem devices have auto-generated aliases: This is a prerequisite for fixing bug #63 (loop device path length limitation), where filesystem device aliases will be used to compose synthetic lo_file_name references in the format "libvirt-$UUID-$DEVALIAS". Related: https://gitlab.com/libvirt/libvirt/-/work_items/63 Signed-off-by: Radoslaw Smigielski --- src/lxc/lxc_process.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 2c0bcb9dd3aa..aae9fcc9dfd1 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1350,6 +1350,12 @@ int virLXCProcessStart(virLXCDriver * driver, vm->def->consoles[i]->info.alias =3D g_strdup_printf("console%zu",= i); } =20 + VIR_DEBUG("Setting up filesystem aliases"); + for (i =3D 0; i < vm->def->nfss; i++) { + g_free(vm->def->fss[i]->info.alias); + vm->def->fss[i]->info.alias =3D g_strdup_printf("fs%zu", i); + } + VIR_DEBUG("Setting up Interfaces"); if (virLXCProcessSetupInterfaces(driver, vm->def, &veths) < 0) goto cleanup; --=20 2.54.0 From nobody Wed Jun 24 21:46:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1781241557; cv=none; d=zohomail.com; s=zohoarc; b=ZAyHu7T+1SzQlVA7Qk+wdTNi7+D+I+7RBFFQVPwH1+1QU2LVR//2TVCRip8zjusbJPpGlmsMH3wTRNtVwZvR0b81vzF+ddAphHlLfN2CqbJgOgDCCfig4J5IUeakobiafI/5kFR/DUM3Jbn8Am8/Aja0ydXzc3barsW7go3z6M0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1781241557; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=3xM+xaSh8wDR/JWlKgQmIkLtVP3br7UEvXiqd1h3Ae4=; b=Nr4yNULeLDZIlkCh3ol3ZMZU2PHU9kWZrjVPvCoSeSCXkVjE3TxgoLmb4o/rMtFsXNagrKdRWPjnHqhrk0dmJ0e1BTi6dv7jwqByNekrKjbrwtH0llMfruGXdY8wHowjnMH4MISJlGIGEcGAtxSNIyl3b92/wfyLaBFrcHAvtig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1781241557781382.37535383726447; Thu, 11 Jun 2026 22:19:17 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 946EA41AC6; Fri, 12 Jun 2026 01:19:16 -0400 (EDT) Received: from [172.19.199.4] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id D04C541C91; Fri, 12 Jun 2026 01:17:18 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 1032941B50; Fri, 12 Jun 2026 01:17:09 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id BF52341CE9 for ; Fri, 12 Jun 2026 01:16:04 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-gDKYnAVFMMG60lmaZ0bNsA-1; Fri, 12 Jun 2026 01:16:02 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 872E61956070 for ; Fri, 12 Jun 2026 05:16:01 +0000 (UTC) Received: from rsmigiel-thinkpadx1carbongen11-remote-csb.redhat.com (unknown [10.44.48.59]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9BC46180058F; Fri, 12 Jun 2026 05:16:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_PASS autolearn=no autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781241364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3xM+xaSh8wDR/JWlKgQmIkLtVP3br7UEvXiqd1h3Ae4=; b=H4XnUl/0oW1KXhiEKf8V3HbJ7Lp2wRoO2kaBgHAy/Gc3W0ZDZSRYrhMYziZNW++VV0UvKh AYltfLfm4fZAtmsledGl/Nw3ooVoZai4e1ZxWz2UwfYPxsK6h1RmycshRx8K4339hg4aHQ tmRGIyn4aEeU0PxwNfouKqQC9tChS/E= X-MC-Unique: gDKYnAVFMMG60lmaZ0bNsA-1 X-Mimecast-MFC-AGG-ID: gDKYnAVFMMG60lmaZ0bNsA_1781241361 To: devel@lists.libvirt.org Subject: [PATCH v2 2/2] lxc: Assign aliases to network interface devices Date: Fri, 12 Jun 2026 07:14:59 +0200 Message-ID: <20260612051542.753412-3-rsmigiel@redhat.com> In-Reply-To: <20260612051542.753412-1-rsmigiel@redhat.com> References: <20260612051542.753412-1-rsmigiel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 2tahxdVd_2FlvooY7IQQnzo7RhahjVC5OmY5_nrux20_1781241361 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: OQTQSMXGPOYW3TA36C4UZVJSVJFBAWYU X-Message-ID-Hash: OQTQSMXGPOYW3TA36C4UZVJSVJFBAWYU X-MailFrom: rsmigiel@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Radoslaw Smigielski X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Rados=C5=82aw_=C5=9Amigielski_via_Devel?= Reply-To: rsmigiel@redhat.com X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1781241559940158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Radoslaw Smigielski LXC domains did not assign device aliases to network interface devices during domain startup. This change assigns aliases in the format 'net0', 'net1', etc. to all network interfaces during domain startup, following the same pattern used for console and filesystem devices. Before this patch, virsh dumpxml showed network interfaces without aliases: After this patch, network interfaces have auto-generated aliases: This ensures all LXC device types (consoles, filesystems, and network interfaces) have consistent alias assigned. Signed-off-by: Radoslaw Smigielski --- src/lxc/lxc_process.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index aae9fcc9dfd1..f93f3f05c394 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -1356,6 +1356,12 @@ int virLXCProcessStart(virLXCDriver * driver, vm->def->fss[i]->info.alias =3D g_strdup_printf("fs%zu", i); } =20 + VIR_DEBUG("Setting up network interface aliases"); + for (i =3D 0; i < vm->def->nnets; i++) { + g_free(vm->def->nets[i]->info.alias); + vm->def->nets[i]->info.alias =3D g_strdup_printf("net%zu", i); + } + VIR_DEBUG("Setting up Interfaces"); if (virLXCProcessSetupInterfaces(driver, vm->def, &veths) < 0) goto cleanup; --=20 2.54.0