From 23d34b8d5de460a2c76a6dee08169d809b274ba0 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 19 Aug 2021 12:06:32 +0200 Subject: [PATCH] add --nochroot execution in %post refactor references add instructions to use livecd-creator to create iso file add instruction for using qemu-kvm to test the iso file --- leaves/ldhamd.cfg | 25 +++++++++++++++++++++++-- leaves/ldhimd.cfg | 26 +++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/leaves/ldhamd.cfg b/leaves/ldhamd.cfg index ca842af..e90a4bb 100644 --- a/leaves/ldhamd.cfg +++ b/leaves/ldhamd.cfg @@ -15,5 +15,26 @@ # Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : # ksflatten -c ldhamd.cfg -o flat-ldhamd.cfg -%include ldhmd.cfg # A live desktop hypervisor machine -%include bamd.cfg # Specific virtualization configuration for AMD (tm) CPUs \ No newline at end of file +# An ISO file can be created using the following command as *root*: +# livecd-creator -c flat-ldhamd.cfg --fslabel=ldhamd +# livecd-creator is part of the livecd-tools package + +# The resulting ISO can be tested with qemu-kvm, using the following command as *root*: +# qemu-kvm -m 2048 -vga virtio -display gtk,gl=on ldhamd.iso + +%include ldmd.cfg # A base for a live desktop minimal machine +%include bhmd.cfg # A base hypervisor +%include bhamd.cfg # Specific virtualization configuration for AMD (tm) CPUs + +%packages --exclude-weakdeps + +virt-manager + +%end + +%post --nochroot # Beginning of %post section. Those commands are executed outside the chroot environment + +usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvirt group to allow it to interact with the guest-hypervisor. + +%end + diff --git a/leaves/ldhimd.cfg b/leaves/ldhimd.cfg index 7a7ebd8..87fe28a 100644 --- a/leaves/ldhimd.cfg +++ b/leaves/ldhimd.cfg @@ -5,7 +5,7 @@ # / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ # /_/ /____/ -# What ? This kickstart file bootstraps a live desktop hypervisor configured for Intel(tm) CPU and Intel(tm) Graphics. +# What ? This kickstart file bootstraps a live desktop hypervisor configured for Intel(tm) CPU and Intel(tm) graphic cards. # 'l' for live, 'd' for desktop, 'h' for hypervisor, 'i' for intel, 'm' for minimal, 'd' for development only. # ATTENTION : this kickstart file will automatically DESTROY the main disk and all of its contents. @@ -15,5 +15,25 @@ # Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : # ksflatten -c ldhimd.cfg -o flat-ldhimd.cfg -%include ldhmd.cfg # A live desktop hypervisor machine -%include bimd.cfg # Specific virtualization configuration for Intel(tm) CPU and Intel(tm) Graphics \ No newline at end of file +# An ISO file can be created using the following command as *root*: +# livecd-creator -c flat-ldhimd.cfg --fslabel=ldhimd +# livecd-creator is part of the livecd-tools package + +# The resulting ISO can be tested with qemu-kvm, using the following command as *root*: +# qemu-kvm -m 2048 -vga virtio -display gtk,gl=on ldhimd.iso + +%include ldmd.cfg # A base for a live desktop minimal machine +%include bhmd.cfg # A base hypervisor +%include bhimd.cfg # Specific virtualization configuration for Intel(tm) CPU and Intel(tm) graphic cards + +%packages --exclude-weakdeps + +virt-manager + +%end + +%post --nochroot # Beginning of %post section. Those commands are executed outside the chroot environment + +usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvirt group to allow it to interact with the guest-hypervisor. + +%end