NIC SR-IOV
Voir le nombre MAX de VF supportées
root@proxmox:~# cat /sys/class/net/enp8s0f1np1/device/sriov_totalvfs
Voir combien de VF sont actives actuellement
root@proxmox:~# cat /sys/class/net/enp8s0f1np1/device/sriov_numvfs
Créer des VF temporaire
Exemple : créer 4 VF
root@proxmox:~# echo 4 > /sys/class/net/enp8s0f1np1/device/sriov_numvfs
Créer des VF
On crée un service :
root@proxmoxve:~# vi /etc/systemd/system/sriov-x710.service
Contenu :
[Unit] Description=Enable SR-IOV on Intel X710 After=systemd-modules-load.service Before=pve-guests.service [Service] Type=oneshot ExecStart=/bin/sh -c 'echo 4 > /sys/class/net/enp8s0f1np1/device/sriov_numvfs' RemainAfterExit=yes [Install] WantedBy=multi-user.target
Puis on active le service ;
systemctl daemon-reload systemctl enable sriov-x710 systemctl start sriov-x710
Créer des VF avec adresses MAC fixes
On crée un service :
root@proxmoxve:~# vi /etc/systemd/system/sriov-x710.service
Contenu :
[Unit] Description=Enable SR-IOV on Intel X710 After=systemd-modules-load.service Before=pve-guests.service [Service] Type=oneshot ExecStart=/bin/bash -c ' echo 0 > /sys/class/net/enp8s0f1np1/device/sriov_numvfs sleep 1 echo 4 > /sys/class/net/enp8s0f1np1/device/sriov_numvfs sleep 1 ip link set enp8s0f1np1 vf 0 mac 02:00:00:10:01:00 ip link set enp8s0f1np1 vf 1 mac 02:00:00:10:01:01 ip link set enp8s0f1np1 vf 2 mac 02:00:00:10:01:02 ip link set enp8s0f1np1 vf 3 mac 02:00:00:10:01:03 ' RemainAfterExit=yes [Install] WantedBy=multi-user.target
Puis on active le service ;
systemctl daemon-reload systemctl enable sriov-x710 systemctl start sriov-x710