VM Image Builder Scripts
https://github.com/simula/nornet-vmimage-builder-scripts
This repository contains Virtual Machine (VM) image building scripts, to automatically generate freshly installed VM images for different projects and purposes, like minimal servers, basic console setups, development environments, as well as full desktop machines. The scripts use Packer (https://www.packer.io).
As part of the VM setup process, it is also possible to set custom bootsplashes and desktop/screen locker/login background images for customisation.
- Packer (get up-to-date version from https://www.packer.io, the Ubuntu-provided package or snap is out-of-date!)
- CMake, ExifTool, Gimp, GraphicsMagick, Noto Fonts, for building the background images. Basically (on a Ubuntu/Debian system):
sudo apt install -y cmake fonts-noto gimp graphicsmagick libimage-exiftool-perl
. Take a look at the scripts 20-kde and 30-development for installing the dependencies.
To start a VM build, run one the the "make" scripts:
./make-<PROJECT>
with e.g. "minimal", "basic", "development", "kde", "kde+development", "hipercontracer", etc.!
See further details about the different VM hypervisor variants, systems, and projcts (choice of packages to install) below!
The VirtualBox images use optimised settings for display, network and storage. Two disk layouts are available: 3-disks (separate disks for /, /home, and swap) and 1-disk (one disk for everything).
VMs for usage in Proxmox. They are basically like the VirtualBox variant, with the QEMU Guest Agent installed.
The QEMU images use optimised settings for display, network and storage. Two disk layouts are available: 3-disks (separate disks for /, /home, and swap) and 1-disk (one disk for everything). These images are mainly useful for OpenStack, for which the layout should be 1-disk.
VMs for usage in vSphere. They are basically like the VirtualBox variant, with the Open VM Tools installed.
Containers for usage in Docker.
The following operating systems are currently supported as VM guests:
Details can be found in the directories installer and http.
General settings:
- Base: Ubuntu Server ISO
- EFI boot
- Using BTRFS for / and /home, with subvolumes @ and @home
- Added Launchpad PPA dreibh/ppa (https://launchpad.net/~dreibh/+archive/ubuntu/ppa/+packages)
- Purged and blocked snapd. To install snapd again, remove /etc/apt/preferences.d/block-snapd.pref!
General settings:
- Base: Debian Netinstall ISO
- EFI boot
- Using BTRFS for / and /home, with subvolumes @ and @home
General settings:
- Base: Fedora Core Netinstall ISO
- EFI boot
- Using XFS for / and /home
- Added COPR PPA dreibh/ppa (https://copr.fedorainfracloud.org/coprs/dreibh/ppa/)
General settings:
- Base: FreeBSD installation ISO
- EFI boot
- Using ZFS for / and /home
Details can be found in the directory projects.
The minimal installation for the system with the settings described above. This project is meant mainly for testing purposes. In most cases, you want the Basic project instead!
Provided packages:
- Bash (shell)
- cURL (download tool)
- Git (revision management)
- GnuPG (cryptography for signature checks)
- Ping (network connectivity check)
- Sudo (privileged command execution)
- Virt-What (identification of virtualisation environment)
Further properties:
- /etc/os-release with operating system information exists
- Bash as default shell
- Explicit Congestion Notification (ECN, RFC 3168) enabled
- Stream Control Transmission Protocol (SCTP, RFC 4960) enabled
- SSH server enabled
- Hardened SSH server and client settings (weak algorithms disabled)
- UTF-8 character encoding
- Enabled automatic installation of updates
The "Basic" installation is based on the Minimal installation.
It must contain the following packages:
- Base64 (base64 tool)
- BIND Tools (DNS testing, particularly dig and delv commands)
- BWM-NG (simple bandwidth monitor)
- BZip2 (compression tool)
- EthTool (Ethernet card configuration tool; on Linux systems only!)
- Fail2Ban (prevent brute-force SSH attacks)
- GDisk (GPT partitioning tool)
- GrowPart (Partition growing tool; on Linux systems only!)
- IDN (Internationalised Domain Names command line tool)
- GNU Parallel (Parallel job execution)
- GNU Wget (download tool)
- HiPerConTracer (high-performance network tracing tool)
- HTop (process monitor)
- Joe (editor)
- JQ (JSON editing tool)
- NMap (network testing tool)
- Manual page utilities (manual page viewer)
- NetPerfMeter (network performance metering tool)
- NetPlan (network configuration; on Linux systems only!)
- OpenSSL (Cryptography and TLS toolkit)
- Ping, Traceroute, ifconfig (basic networking tools)
- PLocate ("locate" command for finding files)
- PwGen (password generator)
- Python (Python 3 interpreter)
- RSPLIB RSerPool Tools (RSerPool testing tools)
- RSync Tools (file synchronisation)
- SubNetCalc (address calculator)
- System-Tools (system information on login)
- Tree (tree view of directory hierachy)
- T-Shark (packet sniffer, CLI-version for Wireshark)
- UUID (UUID generator)
The "KDE" installation is based on the Basic installation.
It must contain the following packages:
- The KDE Plasma Desktop with Oxygen theme and SDDM
- Dia (drawing tool)
- Firefox (web browser)
- FractGen (fractal generator)
- LibreOffice (office suite)
- Gimp (graphics editing tool)
- Inkscape (drawing tool)
- Kate (editor)
- Kile (LaTeX editor)
- Konsole (console)
- Noto Fonts (Noto fonts, complete UTF-8 character range)
- Okular (file viewer, e.g. for PDF)
- R (statistical computing suite)
- Strawberry Music Player (audio player)
- Wireshark (packet sniffer, GUI version)
Further properties:
- Configured KDE and SDDM login manager
- Configured 4 virtual desktops
- Configured switchable keyboard layouts
- Configured Konsole keyboard shortcuts
- Configured Firefox (hardened settings, enhanced privacy settings, as well as some add-ons like NoScript, uBlock Origin, etc.)
- Configured Wireshark (predefined filters, coloring rules, etc.)
- Ubuntu 22.04+: Firefox is installed from PPA mozillateam/ppa (https://launchpad.net/~mozillateam/+archive/ubuntu/ppa/+packages), instead of using the Snap package.
The "Development" installation is based on the Basic installation.
It must contain the following packages:
- BC (arbitrary precision calculator language)
- CLang (CLang C and C++ compilers)
- CMake (build tool)
- ExifTool (EXIF metadata editing tool for images)
- GhostScript (PostScript interpreter and fonts)
- GNU Autotools (Autoconf/Automake/Libtool) (basic build tools)
- GNU Bison (parser generator)
- Flex (lexical analyser generator)
- GNU GCC/G++, GNU Make, GNU Debugger (compilers, debugger and make tool)
- GraphicsMagick (image conversion)
- PkgConfig (metainformation about installed libraries)
- Python (Python 3 interpreter, tools and PIP package management)
- ShellCheck (checker tool for shell scripts)
- Valgrind (debugging tool)
- YamlLint (checker tool for YAML)
- RepRepro (DEB repository build tool; on Linux systems only!)
- PBuilder (DEB build tool; on Linux systems only!)
It must contain the following libraries and development files:
- BOOST C++ Libraries (portable C++ libraries)
- SCTP development files (if needed)
Further properties:
- Password-less sudo calls. ⚠WARNING: Development settings are intended for developers only!
- Wireshark as regular user is allowed. ⚠WARNING: Development settings are intended for developers only!
- Source packages enabled from package manager (if available)
The "KDE+Development" installation is based on the KDE and Development installation.
Basic for general-purpose server usage, particularly for working with NorNet purposes.
Basic NorNet VMs for general-purpose desktop usage. They base on the NorNet images, with additional KDE desktop.
Basic for general-purpose desktop usage, particularly for working with NEAT. They base on the NorNet-Desktop images, with NEAT packages and build environment.
Features:
- NEAT installed (NEAT library as well as NEAT sockets API library).
- Source repositories cloned under ~/src. Build dependencies are already installed.
Basic for general-purpose desktop usage, particularly for working with RSerPool, based on the KDE+Development installation.
Features:
- RSPLIB installed.
- RSerPoolDemo-Tool installed.
- Source repositories cloned under ~/src. Build dependencies are already installed.
These are SimulaMet desktop VMs, based on the KDE+Development installation.
Features:
- Some SimulaMet-related source repositories cloned under ~/src.
Basic for general-purpose desktop usage, particularly for working with 5gVINNI. They base on the NorNet images.