Thanks, This is what I am doing now and I use virt-customize to customize these 
images.

It seems simple enought

wget -Otesting-sixs-orig.qcow2 
https://cloud.debian.org/images/cloud/trixie/daily/latest/debian-13-genericcloud-amd64-daily.qcow2
qemu-img resize testing-sixs-orig.qcow2 400G
cp testing-sixs-orig.qcow2 testing-sixs.qcow2
virt-resize --expand /dev/sda1 testing-sixs-orig.qcow2 testing-sixs.qcow2
virt-customize -a testing-sixs.qcow2 -v -x -attach extra-packages.iso 
--commands-from-file testing-sixs.commands
virt-sparsify --in-place testing-sixs.qcow2

$ cat testing-sixs.commands
hostname data-analysis
timezone Europe/Paris
root-password password:xxxxxxxxxxxxxxxxx
firstboot-command useradd -m -p yyyyyyyyyyyyyyyy -s /usr/bin/bash guest
firstboot-command adduser guest sudo
write /etc/apt/sources.list:deb http://deb.debian.org/debian testing main 
contrib non-free non-free-firmware
run install.sh
update
install 
ase,bornagain,fontconfig-config,gdm3,gedit,gnome-core,pyfai,pymca,python3-natsort,python3-tables,python3-xrayutilities,silx,spyder,sudo,systemd-timesyncd,libhkl5,binoculars,ghkl
edit /etc/gdm3/daemon.conf: s/#  AutomaticLoginEnable/AutomaticLoginEnable/
edit /etc/gdm3/daemon.conf: s/#  AutomaticLogin = user1/AutomaticLogin = guest/
firstboot-command systemctl stop gdm3
firstboot-command systemctl start gdm3
write /etc/dconf/profile/user:user-db:user
append-line /etc/dconf/profile/user:system-db:local
mkdir /etc/dconf/db/local.d
write /etc/dconf/db/local.d/00-app-menu:[org/gnome/shell]
append-line 
/etc/dconf/db/local.d/00-app-menu:enabled-extensions=['apps-m...@gnome-shell-extensions.gcampax.github.com']
firstboot-command dconf update

I would be interested by a cloud-init equivalent, just to evaluate both 
solutions.

cheers

Fred

Reply via email to