RTL8153 Compile

  • XCP-ng Team

    Okay great ๐Ÿ™‚ Can you share with us all the modification you had to made? What can we do to have this integrated in XCP-ng? (ie not a too specific code ideally that would work with other network USB devices)


  • @olivierlambert

    Of course. Right now I just got enough information to start the modification on the script which I start tomorrow. In fact, all that is needed to get usbnics working properly in xapi is simply being able to identify usb locations. THAT'S IT! All NICs if you look in the logs are initially named side then because the rename script runs and after properly identifying it assigns a ethxx name which the api will work with. All this would take is an import command and a few if commands. I got the logic down so now it is just about editing, trial and error.

    Question regarding:

    import sys, logging
    from optparse import OptionParser, OptionGroup
    from os.path import join as joinpath, normpath, exists as pathexists
    from subprocess import Popen
        import cStringIO as StringIO
    except ImportError:
        import StringIO
    import xcp.logger as LOG
    from xcp.pci import PCI
    from xcp.net.biosdevname import all_devices_all_names
    from xcp.net.ip import ip_link_set_name
    from xcp.net.ifrename.logic import rename
    from xcp.net.ifrename.macpci import MACPCI
    from xcp.net.ifrename.static import StaticRules
    from xcp.net.ifrename.dynamic import DynamicRules
    from xcp.net.ifrename.util import niceformat
    from xcp.net.mac import MAC

    for the import command as my google fu was no help for the above xcp.net and xcp.pci what is it specifically referring to?
    What I have that down we simply need to add and import for usb then modify a few existing calls with the first being if device location = usb format then run the modify version of the script that would have the edited fields to pull the proper usb locations etc. For the vendor and device it would be best and most simple if we refer to the usbvidpid list it can simply call the info from an already large existing database which can also be easily updated and/or modified for an entry. Functionality wise all that is needed is those if commands to make a usb location referable. Then any usb NIC (so long as drivers provided) would be truly plug and play and we could use the existing config to chose a specific ethxx name based on MAC so they survive reboots without further editing anything.

    Got it is referring to the python libary / libs

  • Has there been any more work on this? I'm testing XCP-NG 8 beta and was hoping to try and test out similar usb nic?

  • This post is deleted!

  • This post is deleted!

  • Here's another willing script tester ๐Ÿ˜Ž

  • has enyone get this usb nic to work?

  • XCP-ng Team

    @Pen2 I think most people have ๐Ÿ™‚

    I think the rename script modification to recognize PCI and USB device was the key.

  • @r1 any way you can share how to do it? I have the same issue Iโ€™m with the usb 3 Ethernet Adapter I have.

  • XCP-ng Team

    @Professor-X-Tech please go though the thread once and share us the commands used, errors seen.

  • @r1

    Naming is showing incorrect like others, have reported.

    Let me know if you need anything else.

    listing and scanning the USB Nic - side-861-eth0

    2020-06-26 17_16_38-Clipboard.png

    interface-rename -l (Giving an Error.)

    xsconsole showing it but not connected




    dmesg with vendor ID


  • i find patch solution
    just make file /etc/udev/rules.d/70-persistent-net.rules
    and put your all nic in it like this:

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="6a:66:e8:33:0f:1c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="ed:8c:c1:ba:cb:b9", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="7c:3f:5f:fa:e4:a3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

    just change your own mac address. reboot and then xe pif-forget=(side-xxx uuid)
    and reboot.

  • @Pen2 Dude! you the man! lol thanks for this. ๐Ÿค™ saving this for the book so I don't forget in case it gets changed some day.

  • Don't forget to stop the dynamic NIC naming by adding net.ifnames=0 to the grub boot menu (see this article by Eric Eikrem). Worked for my USB-NIC (Startech, ASIX Electronics Corp. AX88179 USB 3.0 to Gigabit Ethernet) as described in Prevent USB-NIC device renaming - valid approach on xcp-ng?. Not sure if it really is mandatory to add the on-board NIC to the rules file as well, but I do it.

  • @gskger I had followed the article by Eric Eikrem and it did not work for me. Base on my understanding if you add the rules it wonโ€™t rename it to anything other then whatโ€™s in the static rules.

    Found this in a RHEL Forum:



  • @Professor-X-Tech I'm back to report that although it working, I am having issue with the USB 3 Nic. Don't have time to troubleshoot it but I will get to it and if I find anything to share I will.

Log in to reply

XCP-ng Pro Support

XCP-ng Pro Support