Installing old tools in an Ubuntu 20.04.x LTS Virtual Machine - Part 1
Note: Edits made later on 2025-12-26 due to discovered typos and mistakes.
Installing old tools in an Ubuntu 20.04.x LTS Virtual Machine
One of the more daunting discoveries a computer engineer can make early in their carrier is that designs created with a multiple-years-old AMD/Xilinx FPGA tool version do not always automatically and quickly work with the latest tool versions. Additionally, the original multiple-years-old version of the tools do not necessarily function properly on the latest LTS Ubuntu release. The documentation specifies an exact set of releases of the supported Windows and Linux host operating systems for running the AMD Vivado, Vitis, and PetaLinux, tools. Typically, a released Linux version of the tools is only supported to run on an Ubuntu version that is the two newest LTS releases that are at least 6 months old, at the time of the AMD/Xilinx tools release. Years later, getting an archived project to install and work can be challenging.
The latest version of the completed revision -3 FPGA/APSoC designs posted on this GitHub website all use Vivado and Vitis 2021.2, which requires Ubuntu 20.04 or Ubuntu 18.04. It can be made to run on Ubuntu 22.04 with caution; and with a careful unsupported install of libtinfo5 can probably be made to run on Ubuntu 24.04. But what happens when Ubuntu releases 26.04 LTS? The backward compatibility is not a guarantee for AMD’s free-to-use program that is over 70 GiB to install for targeting the low cost FPGA/APSoC hardware.
Here, I present what should be a solution for users running one of the following host operating systems:
- Windows 11 Pro
- Ubuntu 24.04 LTS
- Fedora Atomic Desktop
I propose that for users of Windows 11 Pro, their best bet for compatibility is to install Ubuntu 20.04 LTS in their WSL2 subsystem. And then install prerequisites and the AMD/Xilinx tools within that WSL2 VM.
I also propose that for users of Ubuntu, installing the libvirt and virt-manager virtualization tools will provide better compatibility and KVM performance for doing the same, than a free commercial solution such as VirtualBox or VMware Workstation Pro could offer.
For Fedora Atomic Desktop, I also propose installing virt-manager with the QEMU Extension via Flatpak rather than an OStree RPM overlay to accomplish a libvirt install. These two required packages are readily available via the 3rd party Flathub repository.
So, let’s begin. How do we build the FPGA examples within a native-performance virtualization option, starting with the same version of AMD/Xilinx tools as the author used? Plus installing the 2022.1 tools used for the latest Digilent Inc. Zybo Z7-20 PetaLinux demo.
The primary example here will be libvirt on Ubuntu 24.04 LTS running on an upgraded HP Dev One budget workstation PC. The needed system specs are:
- 6-8 performance cores
- 32-64 GiB DDR4 RAM
- 2 TiB internal SSD with over 550 GiB free; or with caution, an external portable SSD with over 550 GiB space free. Just for the VM, not including downloads.
Be reminded that if you want top SSD performance, you should have 550 GiB + download sizes + 25% of your SSD size, total, free. SSDs can slow down when filled past 75% total capacity.
Installing virtualization tools on your operating system of choice
Installing WSL2 with Ubuntu 20.04 LTS on Windows 11 Pro
From within Windows Powershell:
wsl --install Ubuntu-20.04
You may need to run specific Powershell commands and/or Add or Remove Features for fully installing Hyper-V support, before trying to execute WSL2.
Installing libvirt and virt-manager on Ubuntu 24.04.3 LTS
On-line tutorials and guides may call the installation of libvirt one of the following list of names:
- Install
KVM - Install
KVM/QEMU - Install
libvirt - Install
virtualization
The following constitutes what resulted on my machine from following more than one on-line tutorial (links missing) to have virt-manager running libvirt with QEMU backend using KVM kernel engine:
$ dpkg-query --list | grep -i 'libvirt\|virtio\|virtual machine\|virtualization\|qemu\|spice' | grep -v -i llvm
ii gir1.2-libvirt-glib-1.0:amd64 5.0.0-2build3 amd64 GObject introspection files for the libvirt-glib library
ii gir1.2-spiceclientglib-2.0:amd64 0.42-2ubuntu2 amd64 GObject for communicating with Spice servers (GObject-Introspection)
ii gir1.2-spiceclientgtk-3.0:amd64 0.42-2ubuntu2 amd64 GTK3 widget for SPICE clients (GObject-Introspection)
ii ipxe-qemu 1.21.1+git-20220113.fbbdc3926-0ubuntu2 all PXE boot firmware - ROM images for qemu
ii ipxe-qemu-256k-compat-efi-roms 1.0.0+git-20150424.a25a16d-0ubuntu5 all PXE boot firmware - Compat EFI ROM images for qemu
ii libspice-client-glib-2.0-8:amd64 0.42-2ubuntu2 amd64 GObject for communicating with Spice servers (runtime library)
ii libspice-client-gtk-3.0-5:amd64 0.42-2ubuntu2 amd64 GTK3 widget for SPICE clients (runtime library)
ii libspice-server1:amd64 0.15.1-1build2 amd64 Implements the server side of the SPICE protocol
ii libvirglrenderer1:amd64 1.0.0-1ubuntu2 amd64 virtual GPU for KVM virtualization
ii libvirt-clients 10.0.0-2ubuntu8.10 amd64 Programs for the libvirt library
ii libvirt-daemon 10.0.0-2ubuntu8.10 amd64 Virtualization daemon
ii libvirt-daemon-config-network 10.0.0-2ubuntu8.10 all Libvirt daemon configuration files (default network)
ii libvirt-daemon-config-nwfilter 10.0.0-2ubuntu8.10 all Libvirt daemon configuration files (default network filters)
ii libvirt-daemon-driver-qemu 10.0.0-2ubuntu8.10 amd64 Virtualization daemon QEMU connection driver
ii libvirt-daemon-system 10.0.0-2ubuntu8.10 amd64 Libvirt daemon configuration files
ii libvirt-daemon-system-systemd 10.0.0-2ubuntu8.10 all Libvirt daemon configuration files (systemd)
ii libvirt-glib-1.0-0:amd64 5.0.0-2build3 amd64 libvirt GLib and GObject mapping library
ii libvirt-glib-1.0-data 5.0.0-2build3 all Common files for libvirt GLib library
ii libvirt-l10n 10.0.0-2ubuntu8.10 all localization for the libvirt library
ii libvirt0:amd64 10.0.0-2ubuntu8.10 amd64 library for interfacing with different virtualization systems
ii ovmf 2024.02-2ubuntu0.7 all UEFI firmware for 64-bit x86 virtual machines
ii python3-libvirt 10.0.0-1build1 amd64 libvirt Python 3 bindings
ii qemu-block-extra 1:8.2.2+ds-0ubuntu1.11 amd64 extra block backend modules for qemu-system and qemu-utils
ii qemu-system-common 1:8.2.2+ds-0ubuntu1.11 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-data 1:8.2.2+ds-0ubuntu1.11 all QEMU full system emulation (data files)
ii qemu-system-gui 1:8.2.2+ds-0ubuntu1.11 amd64 QEMU full system emulation binaries (graphical display and audio modules)
ii qemu-system-modules-opengl 1:8.2.2+ds-0ubuntu1.11 amd64 QEMU full system emulation binaries (OpenGL display modules)
ii qemu-system-modules-spice 1:8.2.2+ds-0ubuntu1.11 amd64 QEMU full system emulation binaries (spice display modules)
ii qemu-system-x86 1:8.2.2+ds-0ubuntu1.11 amd64 QEMU full system emulation binaries (x86)
ii qemu-utils 1:8.2.2+ds-0ubuntu1.11 amd64 QEMU utilities
ii spice-client-glib-usb-acl-helper 0.42-2ubuntu2 amd64 Helper tool to validate usb ACLs
ii spice-vdagent 0.22.1-4build3 amd64 Spice agent for Linux
ii virt-manager 1:4.1.0-3ubuntu0.1 all desktop application for managing virtual machines
ii virt-viewer 11.0-3build2 amd64 Displaying the graphical console of a virtual machine
ii virtinst 1:4.1.0-3ubuntu0.1 all utilities to create and edit virtual machines
ii virtiofsd 1.10.0-1 amd64 Virtio-fs vhost-user device daemon
Installing virt-manager with QEMU Extension on Fedora Atomic Desktop
On Fedora Atomic Kenoite I was able to enable the Flathub repository, and then:
flatpak install org.virt_manager.virt-manager
flatpak install org.virt_manager.virt-manager.Extension.Qemu
Run virt-manager from the menu. Then Add connection and select QEMU/KVM user session. The procedure from there to create and run a VM is nearly the same as with the host install on Ubuntu LTS.
Installing Ubuntu 20.04.6 within the VM
I recommend installing the default Ubuntu 20.04.x LTS image for the simple reason that the default Ubuntu desktop works best with the virtualization software, especially with a distribution as old as 20.04 LTS. My choice would normally have been Xubuntu 20.04 LTS; but the 2020 XFCE desktop has some bugs regarding resizing the virtual machine window while running.
Here’s a mirror in NY State USA where you can download 20.04.6 LTS:
https://mirrors.rit.edu/ubuntu-releases/20.04/
After the download, follow the normal procedure for validating that the DVD-ROM ISO is (a) intact and (b) not tampered with. This involves the commands sha256sum -c and gpg --recv-key and gpg --verify.
When creating the virtual machine, I recommend creating one or two virtio disks that total in space at 550 GiB or more. Make sure that your computer or an external disk have that much space, and that the virtual machine is configured to have its virtual disks reside on the correct SSD or HDD.
Knowing the tools’ APT package prerequisites and installing them
I recommend running the following package installs to prepare prerequisites for installing the AMD/Xilinx tools.
# Update to the latest
sudo apt update && sudo apt full-upgrade && \
sudo snap refresh && sudo apt autoremove
# Allow install of i386 packages.
sudo dpkg --add-architecture i386
# Select to not use dash as shell (must use full GNU Bash instead)
sudo dpkg-reconfigure dash
# Install additional expected prerequisites for Vivado, Vitis, PetaLinux.
sudo apt install build-essential libtinfo5 libtinfo-dev libncurses5 \
libncurses-dev zlib1g-dev zlib1g:i386 bison flex gawk autoconf automake \
make gcc g++ make libncurses5 libncursesw5 zlib1g-dev libssl-dev \
libffi-dev libxft2 libx11-6 libxext6 libxrender1 libxtst6 libxi6 libsm6 \
libice6 libfontconfig1 libfreetype6 libxrandr2 libxinerama1 libxcursor1 \
xauth xfonts-base x11-utils libstdc++6:i386 xterm net-tools libtool \
texinfo gcc-multilib
For Ubuntu or Fedora, reboot the VM.
For Windows, open Windows Powershell and run wsl --shutdown. Then afterward, open a fresh WSL2 VM Terminal.
Downloading the right AMD/Xilinx tools - install locally
To acquire the AMD/Xilinx 2021.2 FPGA tools:
- Navigate to amd.com and look for the Vivado download.
- Note that downloading Vivado or Vitis or both are the same installer and download.
- I recommend installing from the .tar.gz archive of the SFD installer, which is the Single File Download. This installer also works offline, not requiring an app installer login to amd.com .
- Note that amd.com will require you to create a profile and login for any downloads, and those downloads may not be available in some countries outside of the USA, due to Export Restrictions.
Here is the Vivado + Vitis installer I recommend:
Xilinx_Unified_2021.2_1021_0703.tar.gz
If you wish to build and run the PetaLinux demo for the Zybo Z7-20, you will need tools 2022.1 plus PetaLinux 2022.1. These are the installers I recommend:
Xilinx_Unified_2022.1_0420_0327.tar.gz
petalinux-v2022.1-04191534-installer.run
Make sure to copy-and-paste the MD5 checksums from the download page into a notebook prior to downloading. Then the command to check the MD5 of the downloaded manually, is the md5sum -b command. If the MD5 does not match, your download was corrupted or truncated during download. Note that these downloads are very large.
Mapping a shared folder between Host and Guest VM
I recommend extracting the Unified .tar.gz installers (also > 100 GiB), and then one-at-a-time, copying the folder into the Ubuntu 20.04 VM. Then run the installer from within that VM. Then delete the extracted SFD folder that was copied into the VM. Note that with virt-manager you can:
- enable shared memory in the VM (under the
Memorysection) - create a shared folder by adding hardware:
Filesystem - mount the shared folder inside the VM
For example, I can extract the downloads at /opt/Downloads on my host machine. I would point the Source path to this. Then, for Target path, I used the tag /media/sf_opt_Downloads. I also set Driver to virtio-9p.
Inside the Ubuntu 20.04 VM, the command to mount the share at /mnt would be:
mkdir ~/Downloads/
sudo mount -t 9p -o trans=virtio /media/sf_opt_Downloads /mnt/ -oversion=9p2000.L
For WSL2, just look at /mnt/DRIVELETTER, such as /mnt/c/Users/myuser/Downloads/.
Installing each tool, one-by-one
cp -ar /mnt/* ~/Downloads/
cd ~/Downloads/*Unified*2021.2*/
./xsetup
# When done with this installer
cd ~/Downloads/
rm -Rf ./*Unified*2021.2*/
During the installer, I recommend selecting the following install options only, as these are the options for all free features and only for budget FPGA/SoC hardware:
Install Unified Vitis. Select the following options:
- Yes to Vivado
- Yes to Vitis
- Yes to Vitis HLS
- Yes to IP Cache
- No to Model Composer
- No to Alevo/Edge Cards
- Yes to Kria SOMs
- Yes to Zynq-7000 series
- Yes to Zynq Ultrascale+, but not RFSoC
- Yes to 7-series, but not Virtex or Kintex
- No to Ultrascale
- No to Ultrascale+ other than perhaps Yes to Artix Ultrascale+
I typically install to /opt/Xilinx/ . You will need to have that folder created with sudo mkdir and sudo chown to your user account.
Installing the remaining Vitis dependencies, including cable drivers
sudo /opt/Xilinx/Vitis/2021.2/scripts/installLibs.sh
sudo /opt/Xilinx/Vitis/2022.1/scripts/installLibs.sh
# If you installed both 2021.2 and 2022.1
cd /opt/Xilinx/Vitis/2022.1/data/xicom/cable_drivers/lin64/install_script/install_drivers/
sudo ./install_drivers
cd -
# If you installed only 2021.2
cd /opt/Xilinx/Vitis/2021.2/data/xicom/cable_drivers/lin64/install_script/install_drivers/
sudo ./install_drivers
cd -
Cloning a Version 3 project and getting it to build in the Guest VM
TODO - in a future post
Considerations for RAM and CPU allocated to the Guest VM
I recommend at least 48 GiB of host RAM and 32 GiB allocated to the VM. You might get away with 32 GiB of host RAM and 16 GiB allocated to the VM.
I recommend the number of CPU cores and not threads as the number of single-core CPU sockets to allocated to the VM.
I also suggest that you will require over a half TiB allocated to the VM to use SFD downloads to install all version of the tools, and only for low-cost hardware support. Note that executing ./xsetup from /mnt/*Unified*2021.2*/ might not work. You will probably need to copy the very large install folder within the VM before running ./xsetup within it.
I have not yet tested USB drivers from WSL2 or libvirt VMs. (That is a later project.) You could also download the Web Installer 2025.2 and install Lab Edition for your current generation OS, and use the Lab tools to program the FPGA/APSoC examples after they have been built within the VM. This has not yet been tested. And the JTAG feature from within Vitis Classic would be missing.