Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMware/QEMU x86 - Advanced networking missing and no firmware updates due to mismatched board_id and board_name checks. #1089

Closed
Marx1 opened this issue Feb 5, 2024 · 5 comments
Labels
new hardware support waiting for feedback Waiting for feedback from issuer

Comments

@Marx1
Copy link
Contributor

Marx1 commented Feb 5, 2024

What is the hardware/platform

Vmware ESXI 7.0 update 3
Unraid 6.12.6

Links

https://unraid.net
https://vmware.com

Additional context

I have multiple servers, one runs Unraid (QEMU Virtualization) and I just setup a VMware 7.0 u3 on a Dell R530.

When I had AREDN installed and running on the QEMU it was reporting an "UNSUPPORTED DEVICE" and wold not let me update as it could not find an image. I talked with Tim KN6PLV a little bit about it; but at the time it was just something I was playing with. On that server I had a directly-mapped network card so the VM ran in single interface mode.

Fast forward to today - I'm in the middle of building a dedicated ESXi server (because of various reasons) on my Dell R530. I was able to migrate the image I had on the Unraid box to a VMDK, booted it, and wanted to add the additional interfaces to make it a NAT gateway for services running on the server.

I ran into issues with connecting, and ran down the rabbit hole of getting a temporary IP and could connect to the web interface - It no longer showed "unsupported device" but I couldn't configure the extra ports. I dug into github issues/requests and found #995 .

After hours of searching/testing I found the potential cause of all of this -

For firmware updates
In /www/cgi-bin/admin line 290

if profile.id == board_type or ((board_type == "qemu-standard-pc-i440fx-piix-1996" or board_type == "VMware, Inc. VMware Virtual Platform") and profile.id == "generic" and profile.target == "x86/64") then

The board type is hard checked to be "qemu-standard-pc-i440fx-piix-1996" or "VMware, Inc. VMware Virtual Platform" AND the type must be "generic"

This is causes issues with QEMU - in . /etc/board.json and the scripts it uses to check in /usr/local/bin shows Unraid shows "qemu-standard-pc-q35-ich9-2009" This is due to unraid the default is Q35 for linux, not i440.

Unraid (qemu):
image

To fix this I think it should regex match "qemu" and "vmware". If you're running AREDN in vms the chances are you know what you're doing.

For the advanced networking, It's a similar issue:

in /usr/lib/lua/aredn/nav/admin/65advancednetwork.lua (

if board == "mikrotik,hap-ac2" or board == "mikrotik,hap-ac3" or board == "qemu-standard-pc-i440fx-piix-1996" or board == "glinet,gl-b1300" or board == "VMware, Inc. VMware Virtual Platform" then
)
we're hard coded to check for it i440fx agian.

same in /www/cgi-bin/advancednetwork line 64:

["qemu-standard-pc-i440fx-piix-1996"] = default_n_port_layout,

On the VMware side, for the advanced networking

For both of these in 65advancednetwork.lua line 1 we check call aredn.hardware.get_board_type(), this actually returns the "id line from /etc/boards.json:

function hardware.get_board_type()

But this is incorrect based on what text is hard set in /usr/lib/lua/aredn/nav/admin/65advancednetwork.lua (

if board == "mikrotik,hap-ac2" or board == "mikrotik,hap-ac3" or board == "qemu-standard-pc-i440fx-piix-1996" or board == "glinet,gl-b1300" or board == "VMware, Inc. VMware Virtual Platform" then
- that's looking for "VMware, Inc. VMware Virtual Platform" not "vmware-inc-vmware-virtual-platform"

Vmware:
image

With all of this I see two problems -

  1. The image will always default to the 1-port config, because it never matches stuff properly . I think this is the real cause of Network configuration is wiped and replace under 3.23.12.0 #995
  2. QEMU and VMware can change the board ID - I know the dev team doesn't want to support every config for X86 out there. It's good to say that if you're running on x86 you're not the average AREDN user.

Therefore I suggest - drop the board types for virtual/x86 platforms, and switch to a regex/match for "vmware" and "qemu"

This also plays into supernodes, running it on x86 hardware is probably going to be a good idea in the future;

@aanon4
Copy link
Contributor

aanon4 commented Feb 5, 2024

If you have a moment to check the changes in #1090 that would be great.

@aanon4 aanon4 added the waiting for feedback Waiting for feedback from issuer label Feb 5, 2024
@Marx1
Copy link
Contributor Author

Marx1 commented Feb 5, 2024

Looks pretty good, I wasn't sure exactly where it was all used; but this should help with things. Thanks!

@aanon4
Copy link
Contributor

aanon4 commented Feb 5, 2024

Actually ... I'm going to make another pass at this, instead collapsing all the qemu-* and vmware* to simple qemu and vmware generics much earlier. Stay tuned.

@aanon4
Copy link
Contributor

aanon4 commented Feb 5, 2024

#1091

Marx1 added a commit to Marx1/documentation that referenced this issue Feb 6, 2024
adjusted after testing changes made in aredn/aredn#1089
@Marx1
Copy link
Contributor Author

Marx1 commented Feb 6, 2024

I manually built the code today, I can confirm this is working as expected. Thanks!

image
image
image

One item I noticed is you can't set DtD to be untagged; so you still need to be able to pass vlans to the VM; most hypervisors can do this; but we may want to enable allowing it to be untagged on virutal machines. I'll put a FR in later for that. For now; it's working.

@Marx1 Marx1 closed this as completed Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new hardware support waiting for feedback Waiting for feedback from issuer
Projects
None yet
Development

No branches or pull requests

2 participants