Saturday, December 5, 2026

Agama Unattended deployments of Tumbleweed's KVM Guests via dedicated Python Multi-Threaded Web Server

 An advantage of using a dedicated Python MultiThreaded Web Server on a Local Area Network (LAN) for unattended openSUSE Tumbleweed VM deployments is the elimination of network-induced installation timeouts through localized, concurrent delivery of large repository payloads. During automated or unattended installations, multiple virtual machines frequently request package repositories, installation images (iso), or custom configuration XML files at the exact same moment. This post an immediate follow up for https://lxer.com/module/newswire/view/369366/index.html

 Extract linux and initrd from loop mounted  agama-installer.x86_64-25.0.0-openSUSE-Build11.31.iso :

Path to Python web-root is /srv/agama ( in particular case ), see https://lxer.com/module/newswire/view/369366/index.html

1. On dedicated Python Web  Server host create a temporary mount point

# mkdir -p /mnt/agama

2. Mount the local ISO as a loop device
# mount -o loop \
/home/boris/Downloads/agama-installer.x86_64-25.0.0-openSUSE-Build11.31.iso \
/mnt/agama
3. Copy the boot assets directly into your Python Web Server directory # cp /mnt/agama/boot/x86_64/loader/linux /srv/agama # cp /mnt/agama/boot/x86_64/loader/initrd /srv/agama 4. Unmount the ISO and clean up the mount point # umount /mnt/agama # rmdir /mnt/agama

 Copy as root agama-installer.x86_64-25.0.0-openSUSE-Build11.31.iso to /srv/agama as well

Finally linux, initrd, agama-installer.iso and profile.json ( see
https://lxer.com/module/newswire/view/369006/index.html )
would be located under /srv/agama on dedicated Python Web Server (192.168.0.17 for instance )

root@server45fedora:/srv/agama# hostnamectl
    Static hostname: server45fedora
          Icon name: computer-desktop
            Chassis: desktop 🖥
  Chassis Asset Tag: To be filled by O.E.M.
         Machine ID: c97053a998854caa9178705b31914bc3
            Boot ID: 624fdebbe84c4f499ecbf8084e7030cc
       Product UUID: af95be8a-eace-8515-aaa1-00d861d9318b
   Operating System: Fedora Linux 45 (Server Edition)
        CPE OS Name: cpe:/o:fedoraproject:fedora:45
     OS Support End: Wed 2027-12-08
OS Support Remaining: 1y 1d                                
             Kernel: Linux 7.3.6-300.fc45.x86_64
       Architecture: x86-64
    Hardware Vendor: Micro-Star International Co., Ltd.
     Hardware Model: MS-7C37
    Hardware Serial: To be filled by O.E.M.
   Hardware Version: 3.0
   Firmware Version: H.60
      Firmware Date: Wed 2019-11-06
       Firmware Age: 7y 1month   

root@server45fedora:/srv/agama# ll
total 1105296
-rw-r--r--. 1 root root 967354368 Dec  5 17:22 agama-installer.x86_64-25.0.0-openSUSE-Build11.31.iso
-rw-r--r--. 1 root root 146467884 Dec  5 15:46 initrd
-rw-r--r--. 1 root root  17992048 Dec  5 15:46 linux
-rw-r--r--. 1 root root      2306 Dec  5 17:58 profile.json

root@server45fedora:/srv/agama# sudo ss -tulpn | grep 8080
tcp   LISTEN 0      4096                              0.0.0.0:8080      0.0.0.0:*    users:(("python3",pid=3115,fd=3))
root@server45fedora:/srv/agama# ps -ef | grep 3115
boris       3115       1  0 09:36 ?        00:00:00 /usr/bin/python3 /usr/local/bin/agama-proxyV2.py

 On any host on the LAN following CLI for virt-install would deploy for you Tumbleweed KVM Guest . Memory size, number of vcpus , vda size may be tuned as you actually need

#!/bin/bash
virt-install \
  --name tw-unattended-Guest07 \
  --memory 16000 \
  --vcpus 4 \
  --osinfo opensusetumbleweed \
  --disk pool=default,size=150,bus=virtio,format=qcow2 \
  --network bridge=bridge0,model=virtio \
  --graphics spice,listen=127.0.0.1 \
  --location http://192.168.0.17:8080,kernel=linux,initrd=initrd \
 --extra-args "root=live:http://192.168.0.17:8080/agama-installer.x86_64-25.0.0-openSUSE-Build11.31.iso \
inst.auto=http://192.168.0.17:8080/profile.json"
 (--extra-args *)

 Deployment started on remote host with KVM Hypervisor installed

localhost:~ # ./virtSetup03
WARNING  No display detected. Not running virt-viewer.
WARNING  No console to launch for the guest, defaulting to --wait -1

Starting install...
Retrieving 'linux'                                                       |  17 MB  00:00:01
Retrieving 'initrd'                                                      | 140 MB  00:00:12
Allocating 'tw-unattended-Guest09.qcow2'                                 | 150 GB  00:00:02
Creating domain...                                                       |         00:00:00


Domain is still running. Installation may be in progress.
Waiting for the installation to complete.
 Using --graphics spice increase CPU utilization but avoids step related with XML profile fixes in post installation phase.



REFERENCES

(*) Assisted by Google AI 

No comments:

Post a Comment