Introduction to SLES Minimal VM
- WHAT?
A high-level overview of SLES Minimal VM.
- WHY?
You want to know what SLES Minimal VM can do for you.
- EFFORT
10 minutes of reading time.
- GOAL
Get an understanding of what SLES Minimal VM is and what it can be used for.
- REQUIREMENTS
General familiarity with SUSE Linux Enterprise Server
1 Introduction to SLES Minimal VM #
SLES Minimal VM is a slimmed-down version of SUSE Linux Enterprise Server designed to act as a foundation for building systems for use in a data center, creating virtual application images and building appliances. It can be customized by installing only packages required for the specific use case. This means that there are fewer packages to manage and patches to apply. The limited selection of packages also makes the system more secure by reducing the attack surface.
2 SLES Minimal VM highlights #
SLES Minimal VM is available as preconfigured and ready-to-run virtual machine images.
While you can deploy the provided images as is, it is also possible to create customized SLES Minimal VM images using the supplied KIWI NG templates.
The supplied
jeos-firstboot
wizard runs on the first boot and allows you to configure basic settings, such as system locales and theroot
password.Instead of
jeos-firstboot
, SLES Minimal VM for OpenStack usescloud-init
for configuring OpenStack instances.You can establish an SSH connection to the running SLES Minimal VM instance without any further configuration.
The default network configuration is set to use DHCP.
The system automatically creates a Btrfs snapshot after the initial configuration has been completed. This means that you can easily revert all subsequent changes, if necessary.
SLES Minimal VM images use the
kernel-default-base
as the default kernel, which results in a smaller footprint.As openSUSE Leap SLES Minimal VM and SLES Minimal VM are similar, it is easy to migrate from the former to the latter.
3 Differences between SLES Minimal VM and SUSE Linux Enterprise Server #
There are several significant differences between SLES Minimal VM and SUSE Linux Enterprise Server.
- JeOS Firstboot
SLES Minimal VM comes with the JeOS Firstboot tool (except SLES Minimal VM for OpenStack, which uses cloud-init) that can be used to configure basic settings during the first boot. This includes keyboard layout, time zone and
root
password.- kernel-default-base
Because of size constraints, SLES Minimal VM images use the kernel-default-base as the default kernel. Since the kernel does not contain drivers for bare metal, this allows for a smaller footprint.
If a specific usage scenario requires any of the omitted modules, install the kernel-default package to get a full tree of the kernel modules. This is the same kernel used by a regular SUSE Linux Enterprise Server installation.
- No repositories by default
When installing a SUSE Linux Enterprise Server from the installation media, the system automatically sets the installation media as the default offline channel.
NoteBy default, the jeos-firstboot, jeos-licenses and live-langset-data packages do not receive updates. These packages are only required for the initial configuration of the system, and they can safely be removed or left untouched. If you prefer to keep them up to date, enable the Development Tools module.
- Zypper configuration
SLES Minimal VM is a slimmed-down version of SUSE Linux Enterprise Server. The reduction in size is achieved in part by enabling the following two options in
/etc/zypp/zypp.conf
:rpm.install.excludedocs = yes
(excludes all files marked as documentation from being installed by default) andsolver.onlyRequires = true
(disables installation of suggested and recommended packages by default).- Base packages
SLES Minimal VM images are built using the KIWI NG tool. KIWI NG's configuration files, called templates, list packages that must be included in the images. Keep in mind that packages listed in the template may pull required dependencies during the image building process. This means that the resulting image may contain more packages than those specified in the template.
- Disk layout
Unlike SUSE Linux Enterprise Server, which calculates an adjustable disk layout proposal during installation, SLES Minimal VM features the following fixed virtual image partitioning scheme:
2 MB BIOS boot
33 MB EFI system
24 GB Linux file system
To get additional disk space, you can either extend the existing disk from the virtual host or add a secondary disk to the virtual machine. If you choose the latter option, you must partition and format it manually.
- systemd-coredump disabled
systemd-coredump is disabled by default on SLES Minimal VM images. To collect application core dumps necessary for troubleshooting, follow these steps:
Install the systemd-coredump package, which contains
/usr/lib/sysctl.d/50-coredump.conf
.Reboot the system or use the
sysctl --system
command to enable core dumps.
For further information, refer to https://documentation.suse.com/sles/html/SLES-all/cha-tuning-systemd-coredump.html.
4 Obtaining SLES Minimal VM #
You can download the desired variant of SLES Minimal VM from the official Download page. The page offers the following SLES Minimal VM versions:
Fully virtual SLES Minimal VM for KVM and Xen
SLES Minimal VM for VMware
SLES Minimal VM for Microsoft Hyper-V
SLES Minimal VM for OpenStack
Paravirtual SLES Minimal VM for Xen
Fully virtual SLES Minimal VM for KVM for AArch64
By default, SLES Minimal VM does not have any repositories. You must register your system to access online repositories. Registration requires a paid subscription.
5 Examples of using SLES Minimal VM with QEMU #
You can try SLES Minimal VM by downloading a ready-made image from the official Download page. The exact procedure for creating a SLES Minimal VM-based virtual machine depends on the version you choose. Below are examples of how to create and configure a SLES Minimal VM instance with QEMU using either JeOS Firstboot or Combustion.
5.1 Running and configuring SLES Minimal VM manually using JeOS Firstboot #
Run the following command to create a SLES Minimal VM virtual machine in QEMU.
>
qemu-system-x86_64 \
-enable-kvm \
-m 1G \
-smp 1 \
-drive if=virtio,format=qcow2,file=IMAGE.qcow2 \
-nographic \
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
-device virtio-net-pci,netdev=net0
After the system is booted, JeOS Firstboot guides you through the initial system setup.
The SLES Minimal VM image comes with the en_US
locale
only. You can install and select the desired system locale after the
setup is completed by installing the glibc-locale
package and running the localectl set-locale
LANG=LOCALE
command (replace
LOCALE with the desired language locale,
for example, de_DE.UTF-8
).
Keep in mind that to do this, you need to have a SUSE subscription and
register the VM using the SUSEConnect -e
EMAIL -r
REGISTRATION_CODE
command.
As the first step, you are prompted to select the appropriate keyboard layout using the keyboard selection dialog.
Next, read and accept the License Agreement. You cannot proceed without accepting the license agreement.
Specify the desired time zone.
When prompted, specify and confirm the desired
root
password.As the last step, you are instructed to register your system. If you only plan to test SLES Minimal VM, you can skip registration.
After the initial configuration is completed, you can log in to the system as
root
, using the password you specified during the setup procedure.
After SLES Minimal VM has been successfully installed and registered, we highly recommend installing the latest available online updates.
5.2 Running and configuring SLES Minimal VM automatically using Combustion #
SLES Minimal VM comes with the Combustion configuration tool, which makes it possible to automatically configure the system on first boot using a dedicated script file. This can be particularly useful when you need to deploy multiple virtual machines with an identical initial configuration.
To trigger the Combustion tool in QEMU, use the
qemu
command with the fw_cfg
parameter, which specifies the location of the script
file.
To see how this works in practice, you can use a simple Combustion
script that automatically adds the root
user to the SLES Minimal VM
instance running in QEMU.
First, generate a hash of the desired root
password. This can be
done using the openssl passwd -6
command. Add the
following instruction to the script
file (replace
the example hash with the generated one):
echo 'root:$5$.wn2BZHlEJ5R3B1C$TAHEchlU.h2tvfOpOki54NaHpGYKwdNhjaBuSpDotD7' | chpasswd -e
Set up a new virtual machine based on SLES Minimal VM in QEMU using the
following command (replace IMAGE and
SCRIPT with the path name of the
.qcow2
image and the script
file):
>
qemu-system-x86_64 \
-enable-kvm \
-m 1G \
-smp 1 \
-drive if=virtio,format=qcow2,file=IMAGE.qcow2 \
-nographic \
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
-device virtio-net-pci,netdev=net0 \
-fw_cfg name=opt/org.opensuse.combustion/script,file=SCRIPT
Keep in mind that when Combustion is running, it does not provide any
feedback or output. The only indication that the configuration has been
performed correctly is the fact that the system does not launch
JeOS Firstboot tool, and you can log in to the system as root
using the password you generated earlier.
For more information on using Combustion, refer to https://documentation.suse.com/sle-micro/6.1/html/Micro-deployment-selfinstall-images/index.html#deployment-configuring-with-combustion.
6 Legal Notice #
Copyright© 2006–2024 SUSE LLC and contributors. All rights reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”.
For SUSE trademarks, see https://www.suse.com/company/legal/. All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its affiliates. Asterisks (*) denote third-party trademarks.
All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors, nor the translators shall be held liable for possible errors or the consequences thereof.