-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Playbook to deploy test VM #35
Comments
For virtual machines supported by libvirt we can use https://docs.ansible.com/ansible/latest/collections/community/libvirt/virt_module.html#ansible-collections-community-libvirt-virt-module |
we also need a kickstart file |
to create an anaconda iso which boots the kickstart file, lorax might be the thing to use |
I did a fresh bluefin install from iso image. This is what gets created
# Generated by Anaconda 39.32.6
# Generated by pykickstart v3.48
#version=DEVEL
# Use graphical install
graphical
%pre
#!/bin/sh
set -oue pipefail
DEFAULT_URL="ghcr.io/ublue-os/silverblue-main:39"
for ARG in `cat /proc/cmdline`; do
if [[ "${ARG}" =~ ^imageurl= ]]; then
URL="${ARG#*=}"
fi
done
URL=$(echo "${URL:-${DEFAULT_URL}}" | tr "[:upper:]" "[:lower:]")
RELEASE="$(sed "2q;d" "/run/install/repo/.discinfo")"
[[ "${RELEASE}" -eq "39" ]] && RELEASE="latest"
readonly RELEASE
readonly ARCH="$(sed "3q;d" "/run/install/repo/.discinfo")"
cat << EOL > /tmp/ks-urls.txt
ostreecontainer --url="${URL}" --no-signature-verification
url --url="https://download.fedoraproject.org/pub/fedora/linux/releases/${RELEASE}/Everything/${ARCH}/os/"
EOL
%end
# Keyboard layouts
keyboard --vckeymap=ch-legacy --xlayouts='ch (legacy)'
# System language
lang en_US.UTF-8
# OSTree container setup
ostreecontainer --no-signature-verification --url="ghcr.io/ublue-os/bluefin:latest"
# Generated using Blivet version 3.8.1
ignoredisk --only-use=vda
# System bootloader configuration
bootloader --append="rd.luks.options=discard" --location=mbr --boot-drive=vda
autopart
# Partition clearing information
clearpart --none --initlabel
# System timezone
timezone Europe/Zurich
#Root password
rootpw --lock
user --groups=wheel --name=bluefin --gecos="bluefin" some modification and templating needed, but i think this might work |
with podman version > 5.0 its possible to build a bootable disk image. I currently can't test since my machine is still on GTS with podman 4.9. Maybe someone could give this a shot? I can't test before next week or so. |
I'm currently not able to build an image: ❯ sudo podman run \
--rm \
-it \
--add-host=registry.ublue.local:192.168.100.253 \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v $(pwd)/config.json:/config.json \
-v $(pwd)/output:/output \
quay.io/centos-bootc/bootc-image-builder:latest \
--tls-verify=false --type qcow2 \
registry.ublue.local/bluefin:latest The Building the image fails with: Generating manifest manifest-qcow2.json
Error: cannot build manifest: cannot get rootfs type for container: failed to run bootc install print-configuration: exit status 1, stderr:
ERROR Loading configuration: No bootc/install config found; this operating system must define a default configuration to be installable
2024/06/03 11:05:21 error: cannot build manifest: cannot get rootfs type for container: failed to run bootc install print-configuration: exit status 1, stderr:
ERROR Loading configuration: No bootc/install config found; this operating system must define a default configuration to be installable Maybe it's because of podman v4.9 and not 5. But I haven't found a per-requisite for this in the README.md. I have to investigate further |
To figure out if this is a podman version issue I followed the example: sudo podman pull quay.io/centos-bootc/centos-bootc:stream9
sudo podman run \
--rm \
-it \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v $(pwd)/output:/output \
-v /var/lib/containers/storage:/var/lib/containers/storage \
quay.io/centos-bootc/bootc-image-builder:latest \
--type qcow2 \
--local \
quay.io/centos-bootc/centos-bootc:stream9 The build was successful: ⏱ Duration: 34s
manifest - finished successfully
build: 0752f47e3c09c849c232fe0205b3cd06f1a7e32deb38d29da2e58d39ab9fe2ad
image: bcca9f3dae637050a91cc8e526275623b9f1cc7ad505192ac54805590f70aaa9
qcow2: 85a8dc3f2ed40f98caa5b128f91f89da4f6c4fdc511294ce1b8210c0d45c2c0d
vmdk: a3529f2be1bfbeac2adc5067ae49b7a7cb78a314379f620968b36e7330f3e008
ovf: 9dfc3bc1a8e43bf34ff307031a2aef03c9fd3b63fd18196a1b7f46f8f566fc14
archive: 372fb0dbce6827353d6ea6df3d5b7ca67000a5473d1408974d907cc1a1762d44
Build complete!
Results saved in
Trying the same with the bluefin image results in `ERROR Loading configuration: No bootc/install config found; this operating system must define a default configuration to be installable. @castrojo any chance we can get a |
I have a few tasks I created for testing my images locally. |
According to ublue-os/main#572 bootc is not in the image yet. I'll keep an eye on it but i think this should be the way to go for smoothe deployment in a libvirt test vm |
still not working with sudo podman run \
--rm \
-it \
--privileged \
--pull=newer \
--security-opt label=type:unconfined_t \
-v $(pwd)/config.toml:/config.toml:ro \
-v $(pwd)/output:/output \
-v /var/lib/containers/storage:/var/lib/containers/storage \
quay.io/centos-bootc/bootc-image-builder:latest \
--type qcow2 \
--rootfs btrfs \
--local \
ghcr.io/ublue-os/bluefin:latest
Generating manifest manifest-qcow2.json
2024/11/11 10:52:57 error: cannot build manifest: initializing dnf in 5d1c7f350fa427d1fa1a83414787176165c157ddafa30036394001e0bd4ce9cd container failed: exit status 2
output:
error: unrecognized subcommand 'check'
Usage: yum [OPTIONS] <COMMAND>
For more information, try '--help'. there seams to be something odd happening with |
Describe the feature
I'd like this project to be enhanced with a playbook which will set up a test VM where the built images can be tested because that's what this project is about. On-premises Universal Blue.
It should at least support Virtual machine manger. That's what we have available in bluefin-dx. Maybe a LXC setup would be nice too or if possible in a container directly. There's Windows in Docker so why not ublue in docker?
The text was updated successfully, but these errors were encountered: