ubuntu netplan force speed and duplex?

tl5k5

Well-Known Member
Jul 28, 2017
62
1
48
52
Hello,
I'm working through an issue with VirtIO NIC drivers on Ubuntu 22.04.
I need ethtools to recognize the VirtIO NIC of 10000 and duplex as Full instead of Unknown!:
Code:
# ethtool ens18
Settings for ens18:
        Supported ports: [  ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: Unknown!
        Duplex: Unknown! (255)
        Auto-negotiation: off
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Link detected: yes

Of course, when I manually edit with ethtool the change works until I reboot:
Code:
ethtool -s enp0s18 speed 10000 duplex full autoneg off

Is there a way to add speed and duplex to Ubuntu's netplan yaml? Google is not revealing an answer.
Thanks!