ESXi PCI device Realtek PCIe Wireless Network Adapter configured in Photon OS - dcasota/photonos-scripts GitHub Wiki
In ESXi, adding a PCI device to a vm makes e.g. a PCIe Wireless Ethernet Adapter available to the vm operating system.
Here a short recipe how to configure a Realtek wireless network adapter in Photon OS.
- Install the prerequisites to install additional drivers. With Photon OS 5.0, more drivers will be built-in included.
tdnf install usbutils pciutils wpa_supplicant git make build-essential linux-api-headers linux-devel linux-firmware dkms
#realtek 8852
git clone https://github.com/lwfinger/rtw89.git
cd ./rtw89
make
make install
modprobe -v rtw_8852ae
lsmod | grep 8852
# realtek8821
cd ../
git clone https://github.com/tomaspinho/rtl8821ce
cd ./rtl8821ce
./dkms-install.sh
lsmod | grep 8821
- Enable wpa_supplicant and configure the wifi network scan settings (wlan0)
systemctl enable [email protected]
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
wpa_cli
> add_network 0
> set_network 0 ssid "MYSSID"
> set_network 0 psk "passphrase"
> enable_network 0
> save_config
> quit
- Configure the wifi network ip settings e.g. for dhcp
cd /etc/systemd/network/
cp 99-dhcp-en.network 98-dhcp-wl.network
chmod 644 98-dhcp-wl.network
sed "s/Name=e/Name=wlan/" 99-dhcp-en.network > 98-dhcp-wl.network
systemctl restart systemd-networkd
networkctl status wlan0