public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox-ve-rs 1/2] fix #7584: ve-config: guest: add missing network interface models
Date: Fri,  9 Oct 2026 11:00:03 +0200	[thread overview]
Message-ID: <20261009090006.104013-2-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20261009090006.104013-1-s.hanreich@proxmox.com>

Add models defined in qemu-server to the enum that is parsing the
network interface property string. This prevents the parser from
failing to parse valid network interface names that are accepted by
the qemu-server API. In practice, the e1000e model was the most likely
culprit since it is exposed in the UI.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 proxmox-ve-config/src/guest/vm.rs | 37 ++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/proxmox-ve-config/src/guest/vm.rs b/proxmox-ve-config/src/guest/vm.rs
index 5c3bbb86..cebcb9e6 100644
--- a/proxmox-ve-config/src/guest/vm.rs
+++ b/proxmox-ve-config/src/guest/vm.rs
@@ -22,6 +22,16 @@ pub enum NetworkDeviceModel {
     E1000,
     Vmxnet3,
     RTL8139,
+    E100082540em,
+    E100082544gc,
+    E100082545em,
+    E1000e,
+    I82551,
+    I82557b,
+    I82559er,
+    Ne2kIsa,
+    Ne2kPci,
+    Pcnet,
 }
 
 proxmox_serde::forward_deserialize_to_from_str!(NetworkDeviceModel);
@@ -36,6 +46,16 @@ impl FromStr for NetworkDeviceModel {
             "rtl8139" => Ok(NetworkDeviceModel::RTL8139),
             "vmxnet3" => Ok(NetworkDeviceModel::Vmxnet3),
             "veth" => Ok(NetworkDeviceModel::Veth),
+            "e1000-82540em" => Ok(NetworkDeviceModel::E100082540em),
+            "e1000-82544gc" => Ok(NetworkDeviceModel::E100082544gc),
+            "e1000-82545em" => Ok(NetworkDeviceModel::E100082545em),
+            "e1000e" => Ok(NetworkDeviceModel::E1000e),
+            "i82551" => Ok(NetworkDeviceModel::I82551),
+            "i82557b" => Ok(NetworkDeviceModel::I82557b),
+            "i82559er" => Ok(NetworkDeviceModel::I82559er),
+            "ne2k_isa" => Ok(NetworkDeviceModel::Ne2kIsa),
+            "ne2k_pci" => Ok(NetworkDeviceModel::Ne2kPci),
+            "pcnet" => Ok(NetworkDeviceModel::Pcnet),
             _ => bail!("Invalid network device model: {s}"),
         }
     }
@@ -79,7 +99,22 @@ impl ApiType for QemuNetworkDevice {
     .additional_properties(true)
     .key_alias_info(KeyAliasInfo::new(
         "model",
-        &sorted!(["e1000", "rtl8139", "virtio", "vmxnet3"]),
+        &sorted!([
+            "e1000",
+            "rtl8139",
+            "virtio",
+            "vmxnet3",
+            "e1000-82540em",
+            "e1000-82544gc",
+            "e1000-82545em",
+            "e1000e",
+            "i82551",
+            "i82557b",
+            "i82559er",
+            "ne2k_isa",
+            "ne2k_pci",
+            "pcnet",
+        ]),
         "macaddr",
     ))
     .schema();
-- 
2.47.3





  reply	other threads:[~2026-10-09  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09  9:00 [PATCH proxmox-ve-rs 0/2] fix network interface name parsing Stefan Hanreich
2026-10-09  9:00 ` Stefan Hanreich [this message]
2026-10-09  9:00 ` [PATCH proxmox-ve-rs 2/2] ve-config: guest: add fallback enum variant Stefan Hanreich

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=20261009090006.104013-2-s.hanreich@proxmox.com \
    --to=s.hanreich@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