KVM & OpenVSwitch adds

This commit is contained in:
IntenseWebs
2025-07-30 10:44:12 -05:00
parent 3a6354c70a
commit ce86b87905
2 changed files with 84 additions and 16 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ lsmod | grep kvm
sudo dnf install virt-install virt-viewer -y sudo dnf install virt-install virt-viewer -y
sudo dnf install libvirt -y sudo dnf install libvirt -y
sudo dnf install virt-manager -y sudo dnf install virt-manager -y
#Almalinux10, RHEL 10, Rocky 10# dnf --enablerepo=crb install virt-manager #Almalinux10, RHEL 10, Rocky 10 # dnf --enablerepo=crb install virt-manager
sudo dnf install -y virt-top libguestfs-tools -y sudo dnf install -y virt-top libguestfs-tools -y
sudo systemctl start libvirtd sudo systemctl start libvirtd
sudo systemctl enable --now libvirtd sudo systemctl enable --now libvirtd
+83 -15
View File
@@ -1,28 +1,96 @@
https://cloudspinx.com/build-open-vswitch-from-source-on-rocky-almalinux-rhel/ # Install DEPENDENCIES: Fedora 42 RHEL 10, Rocky 10, Almalinux 10
https://docs.openvswitch.org/en/latest/intro/install/general/
# Install from Git - Clone Repository: Fedora 42 & Bash, /usr/local/etc/openvswitch /usr/local/var https://docs.openvswitch.org/en/latest/intro/install/general/
sudo dnf -y install epel-release https://cloudspinx.com/build-open-vswitch-from-source-on-rocky-almalinux-rhel/
sudo dnf config-manager --set-enabled crb
sudo dnf install @'Development Tools' rpm-build dnf-plugins-core # For RHEL 10/Rocky 10, Almalinux 10/Fedora systems these can be installed using dnf groupinstall "Development Tools"
sudo dnf -y install gcc make python3-devel openssl-devel \ # For Debian systems these can be installed using apt install build-essential
su - root
cd /usr/src/
dnf -y install epel-release
dnf config-manager --set-enabled crb
dnf groupinstall "Development Tools"
dnf install @'Development Tools' rpm-build dnf-plugins-core
dnf -y install gcc make python3-devel openssl-devel \
kernel-devel kernel-debug-devel rpm-build desktop-file-utils \ kernel-devel kernel-debug-devel rpm-build desktop-file-utils \
groff-base libcap-ng-devel numactl-devel selinux-policy-devel \ groff-base libcap-ng-devel numactl-devel selinux-policy-devel \
systemtap-sdt-devel unbound-devel unbound python3-sphinx \ systemtap-sdt-devel unbound-devel unbound python3-sphinx \
libbpf-devel libxdp-devel groff network-scripts libbpf-devel libxdp-devel groff network-scripts python-pyelftools \
sudo dnf install python3-sphinx python3-devel libxdp-devel \ pyelftools numactl-devel
dnf install python3-sphinx python3-devel libxdp-devel \
numactl-devel selinux-policy-devel systemtap-sdt-devel \ numactl-devel selinux-policy-devel systemtap-sdt-devel \
unbound unbound-devel unbound unbound-devel sparse
_____________________________________________________________________________
# Install DPDK - Download: Fedora 42
mkdir Repos && cd Repos https://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/
# VER=3.5.0 && wget https://www.openvswitch.org/releases/openvswitch-$VER.tar.gz https://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/
# cd openvswitch-$VER su - root
cd /usr/src/
wget https://fast.dpdk.org/rel/dpdk-24.11.2.tar.xz
tar xf dpdk-24.11.2.tar.xz
export DPDK_DIR=/usr/src/dpdk-stable-24.11.2
cd $DPDK_DIR
export DPDK_BUILD=$DPDK_DIR/build
meson build
ninja -C build
ninja -C build install
ldconfig
pkg-config --modversion libdpdk
# ONLY IF NEEDED # export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
_____________________________________________________________________________
# Install OVS from Git - Clone Repository: Fedora 42
https://docs.openvswitch.org/en/latest/intro/install/dpdk/
https://docs.openvswitch.org/en/latest/intro/install/general/
https://cloudspinx.com/build-open-vswitch-from-source-on-rocky-almalinux-rhel/
cd ../ovs # or cd /usr/src/ovs
su - root
cd/usr/src
git clone https://github.com/openvswitch/ovs.git # wget https://www.openvswitch.org/releases/openvswitch-$VER.tar.gz
cd ovs
git checkout v3.5.0
./boot.sh
./configure --with-dpdk=static
make
echo 'vm.nr_hugepages=2048' > /etc/sysctl.d/hugepages.conf
mount -t hugetlbfs none /dev/hugepages
# PRE-REQ CHECKS
grep -e 'vmx' /proc/cpuinfo
grep -e 'svm' /proc/cpuinfo
lscpu | grep Virtualization
lsmod | grep kvm
grep HugePages_ /proc/meminfo
dmesg | grep -e DMAR -e IOMMU
cat /proc/cmdline | grep iommu=pt
cat /proc/cmdline | grep intel_iommu=on
modprobe vfio-pci
/usr/bin/chmod a+x /dev/vfio
/usr/bin/chmod 0666 /dev/vfio/*
export DPDK_DIR=/usr/src/dpdk-stable-24.11.2
$DPDK_DIR/usertools/dpdk-devbind.py --bind=vfio-pci eth1
$DPDK_DIR/usertools/dpdk-devbind.py --status
_____________________________________________________________________________
# Install from Git - Clone Repository: Fedora 42 & Bash, /usr/local/etc/openvswitch /usr/local/var
su - root
cd/usr/src
git clone https://github.com/openvswitch/ovs.git git clone https://github.com/openvswitch/ovs.git
cd ovs cd ovs
git checkout v3.5.0 git checkout v3.5.0
./boot.sh ./boot.sh
./configure ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --enable-shared
# ./configure
make rpm-fedora make rpm-fedora
# make rpm-fedora RPMBUILD_OPT="--with dpdk --without check" # make rpm-fedora RPMBUILD_OPT="--with dpdk --without check"
@@ -34,7 +102,7 @@ ovs-vsctl show
cd rpm/rpmbuild/RPMS/x86_64 cd rpm/rpmbuild/RPMS/x86_64
ls -al ls -al
-------------------------------------- _____________________________________________________________________________
sudo systemctl enable --now openvswitch sudo systemctl enable --now openvswitch