diff --git a/docs/netlab/install.md b/docs/netlab/install.md index 564ea066b3..c3e8e51746 100644 --- a/docs/netlab/install.md +++ b/docs/netlab/install.md @@ -28,21 +28,27 @@ Run "netlab install" with no arguments to get install script descriptions ``` ```{tip} -Running multiple installation scripts with **‌netlab install** or **netlab install --all** might fail on some Ubuntu distributions due to background processes locking the APT repository directory. If you experience that problem, execute multiple **‌netlab install** commands (one per installation script). +* The installation scripts are tested on a fresh copy of Ubuntu/Debian VM. Don't expect miracles if you run them on a system with numerous custom-installed packages. +* Running multiple installation scripts with **‌netlab install** or **netlab install --all** might fail on some Ubuntu distributions due to background processes locking the APT repository directory. If you experience that problem, execute multiple **‌netlab install** commands (one per installation script). ``` ## Installation Scripts * The *ubuntu* script installs Python3 development components that might be needed for Ansible installation, common tools like **git** and **sshpass**, and XML libraries. * The *libvirt* script installs *libvirt* and supporting libraries/packages, *vagrant*, *vagrant-libvirt* plugin, and creates the *vagrant-libvirt* virtual network. + +```{warning} +Ubuntu 26.04 introduced Hardware Enablement (`-hwe`) version of `qemu-system-x86`. The installation script will try to detect that package and install the corresponding *‌libvirt* packages if the `-hwe` package is present on your system. +``` + * The *containerlab* script installs Docker Engine and *containerlab*. * The *ansible* script uses **pip3** to install the latest version of Ansible, networking libraries (*netaddr, paramiko, netmiko*), text parsing libraries (*testfsm, ttp, ntc-templates*), and a few other utility libraries (*jmespath, yamllint, yq*) * The *graph* script installs GraphViz and D2 software needed to generate graphs from _netlab_ topologies * The *grpc* script installs gRPC Python libraries needed to configure Nokia SR Linux and Nokia SR OS. -[^UT]: Tested on Ubuntu 22.04 and 24.04 +[^UT]: Tested on Ubuntu 22.04, 24.04, and 26.04 -[^DT]: Tested on Debian 12 (bookworm) +[^DT]: Tested on Debian 12 (bookworm) and 13 (trixie) You can display an up-to-date list of installation scripts with **netlab install** command: diff --git a/netsim/install/libvirt.sh b/netsim/install/libvirt.sh index e713491910..ab77410073 100755 --- a/netsim/install/libvirt.sh +++ b/netsim/install/libvirt.sh @@ -12,8 +12,19 @@ $SUDO apt-get install -y $FLAG_APT ebtables dnsmasq-base sshpass tree jq bridge- echo ".. common libraries installed" echo echo "Install libvirt packages" -$SUDO apt-get install -y $FLAG_APT libvirt-dev qemu-kvm cpu-checker virtinst -$SUDO apt-get install -y $FLAG_APT libvirt-daemon-system libvirt-clients +QEMU_SUFFIX="" +QEMU_PACKAGE="qemu-kvm" +if dpkg -s qemu-system-x86-hwe >/dev/null 2>&1; then + echo "Detected existing qemu-system-x86-hwe package" + QEMU_PACKAGE="qemu-system-x86-hwe" + QEMU_SUFFIX="-hwe" +elif apt-cache show qemu-system-x86 >/dev/null 2>&1; then + echo "Using qemu-system-x86 instead of qemu-kvm" + QEMU_PACKAGE="qemu-system-x86" +fi +$SUDO apt-get install -y $FLAG_APT $QEMU_PACKAGE libvirt-dev${QEMU_SUFFIX} +$SUDO apt-get install -y $FLAG_APT libvirt-daemon-system${QEMU_SUFFIX} libvirt-clients${QEMU_SUFFIX} +$SUDO apt-get install -y cpu-checker virtinst echo ".. libvirt packages installed" echo echo "Install vagrant" @@ -24,6 +35,14 @@ $SUDO rm /etc/apt/sources.list.d/vagrant.list 2>/dev/null set -e # add-apt-repository has been deprecated, doesn't work on Debian 11 and will be removed from Ubuntu 22 # changed to new method - ghostinthenet - 20220417 +# +# First, install GPG if it's missing +if ! command -v gpg >/dev/null; then + echo "Installing GPG" + $SUDO apt-get install -y gnupg2 +fi +# +# Next, add Vagrant repository curl -fsSL https://apt.releases.hashicorp.com/gpg | $SUDO gpg --dearmor -o /etc/apt/trusted.gpg.d/hashicorp-security.gpg $SUDO sh -c 'echo "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/vagrant.list' # @@ -37,11 +56,11 @@ cat <