Skip to content

Commit 8a3b222

Browse files
authored
Merge pull request #123777 from anhvoms/patch-13
Adding accelerated networking udev rules for RHEL 7 and RHEL 8
2 parents 130693e + d88b705 commit 8a3b222

File tree

1 file changed

+63
-6
lines changed

1 file changed

+63
-6
lines changed

articles/virtual-machines/linux/redhat-create-upload-vhd.md

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ This section assumes that you've already obtained an ISO file from the Red Hat w
9999
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
100100
# This interface is transparentlybonded to the synthetic interface,
101101
# so NetworkManager should just ignore any SRIOV interfaces.
102-
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION=="add", ENV{NM_UNMANAGED}="1"
102+
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION!="remove", ENV{NM_UNMANAGED}="1"
103103
EOF
104104
```
105105
@@ -209,6 +209,19 @@ This section assumes that you've already obtained an ISO file from the Red Hat w
209209
NM_CONTROLLED=yes
210210
```
211211
212+
> [!NOTE]
213+
> When you use Accelerated Networking, the synthetic interface that's created must be configured to be unmanaged by using a udev rule. This action prevents `NetworkManager` from assigning the same IP to it as the primary interface. <br>
214+
215+
To apply it:<br>
216+
217+
```
218+
sudo cat <<EOF>> /etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules
219+
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
220+
# This interface is transparentlybonded to the synthetic interface,
221+
# so NetworkManager should just ignore any SRIOV interfaces.
222+
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION!="remove", ENV{NM_UNMANAGED}="1"
223+
EOF
224+
```
212225
1. Ensure that the network service starts at boot time:
213226
214227
```bash
@@ -402,7 +415,20 @@ This section assumes that you've already obtained an ISO file from the Red Hat w
402415
```bash
403416
sudo nmcli con mod eth0 connection.autoconnect yes ipv4.method auto
404417
```
405-
418+
419+
> [!NOTE]
420+
> When you use Accelerated Networking, the synthetic interface that's created must be configured to be unmanaged by using a udev rule. This action prevents `NetworkManager` from assigning the same IP to it as the primary interface. <br>
421+
422+
To apply it:<br>
423+
424+
```
425+
sudo cat <<EOF>> /etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules
426+
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
427+
# This interface is transparentlybonded to the synthetic interface,
428+
# so NetworkManager should just ignore any SRIOV interfaces.
429+
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION!="remove", ENV{NM_UNMANAGED}="1"
430+
EOF
431+
```
406432
1. Register your Red Hat subscription to enable the installation of packages from the RHEL repository:
407433
408434
```bash
@@ -644,7 +670,7 @@ This section shows you how to use KVM to prepare a [RHEL 6](#rhel-6-using-kvm) o
644670
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
645671
# This interface is transparently bonded to the synthetic interface,
646672
# so NetworkManager should just ignore any SRIOV interfaces.
647-
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION=="add", ENV{NM_UNMANAGED}="1"
673+
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION!="remove", ENV{NM_UNMANAGED}="1"
648674
EOF
649675
```
650676
@@ -834,7 +860,19 @@ This section shows you how to use KVM to prepare a [RHEL 6](#rhel-6-using-kvm) o
834860
PERSISTENT_DHCLIENT=yes
835861
NM_CONTROLLED=yes
836862
```
837-
863+
> [!NOTE]
864+
> When you use Accelerated Networking, the synthetic interface that's created must be configured to be unmanaged by using a udev rule. This action prevents `NetworkManager` from assigning the same IP to it as the primary interface. <br>
865+
866+
To apply it:<br>
867+
868+
```
869+
sudo cat <<EOF>> /etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules
870+
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
871+
# This interface is transparentlybonded to the synthetic interface,
872+
# so NetworkManager should just ignore any SRIOV interfaces.
873+
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION!="remove", ENV{NM_UNMANAGED}="1"
874+
EOF
875+
```
838876
1. Ensure that the network service starts at boot time:
839877
840878
```bash
@@ -1030,7 +1068,7 @@ This section assumes that you've already installed a RHEL VM in VMware. For info
10301068
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
10311069
# This interface is transparently bonded to the synthetic interface,
10321070
# so NetworkManager should just ignore any SRIOV interfaces.
1033-
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION=="add", ENV{NM_UNMANAGED}="1"
1071+
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION!="remove", ENV{NM_UNMANAGED}="1"
10341072
EOF
10351073
```
10361074
@@ -1180,7 +1218,19 @@ This section assumes that you've already installed a RHEL VM in VMware. For info
11801218
PERSISTENT_DHCLIENT=yes
11811219
NM_CONTROLLED=yes
11821220
```
1183-
1221+
> [!NOTE]
1222+
> When you use Accelerated Networking, the synthetic interface that's created must be configured to be unmanaged by using a udev rule. This action prevents `NetworkManager` from assigning the same IP to it as the primary interface. <br>
1223+
1224+
To apply it:<br>
1225+
1226+
```
1227+
sudo cat <<EOF>> /etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules
1228+
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
1229+
# This interface is transparentlybonded to the synthetic interface,
1230+
# so NetworkManager should just ignore any SRIOV interfaces.
1231+
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION!="remove", ENV{NM_UNMANAGED}="1"
1232+
EOF
1233+
```
11841234
1. Ensure that the network service starts at boot time:
11851235
11861236
```bash
@@ -1450,6 +1500,13 @@ This section shows you how to prepare a RHEL 7 distro from an ISO by using a kic
14501500
PERSISTENT_DHCLIENT=yes
14511501
NM_CONTROLLED=yes
14521502
EOF
1503+
1504+
sudo cat <<EOF>> /etc/udev/rules.d/68-azure-sriov-nm-unmanaged.rules
1505+
# Accelerated Networking on Azure exposes a new SRIOV interface to the VM.
1506+
# This interface is transparentlybonded to the synthetic interface,
1507+
# so NetworkManager should just ignore any SRIOV interfaces.
1508+
SUBSYSTEM=="net", DRIVERS=="hv_pci", ACTION!="remove", ENV{NM_UNMANAGED}="1"
1509+
EOF
14531510
14541511
# Deprovision and prepare for Azure if you are creating a generalized image
14551512
sudo cloud-init clean --logs --seed

0 commit comments

Comments
 (0)