diff --git a/ingredients/base-live-hypervisor-a.cfg b/ingredients/base-live-hypervisor-a.cfg deleted file mode 100644 index 0afd5f7..0000000 --- a/ingredients/base-live-hypervisor-a.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# __ ____ ____ _____ -# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ -# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ -# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / -# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ -# /_/ /____/ - -# What ? This kickstart file configures an hypervisor for AMD (tm) CPUs - -%post --log=/root/bhla.log # Beginning of %post section. Those commands are executed inside the chroot environment. Logging is enabled to help with post-installation troubleshooting - -sed -i 's/\(quiet\)/\1 iommu=pt rd.driver.pre=vfio-pci/i' /etc/default/grub # Load kernel modules in GRUB. - -# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd -echo "vfio" > /etc/modules-load.d/vfio.conf -echo "vfio-pci" > /etc/modules-load.d/vfio-pci.conf -echo "vfio_iommu_type1" > /etc/modules-load.d/vfio_iommu_type1.conf -echo "vfio_virqfd" > /etc/modules-load.d/vfio_virqfd.conf - -echo "options kvm_amd nested=1" >> /etc/modprobe.d/kvm.conf # Add support for nested-virtualization - -# The following part seems useless -# dracut --add-drivers " vfio vfio-pci vfio_iommu_type1 vfio_virqfd " --force # Instruct dracut to load the vfio drivers -# dracut --force # Regenerate initramfs -# Doesn't seem to work -# dracut: Cannot find /usr/lib/dracut/dracut-init.sh. -# dracut: Are you running from a git checkout? -# dracut: Try passing -l as an argument to /usr/bin/dracut - -# The following part seems useless too. No need to regenerate grub -# grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub. Does it fail ? /usr/sbin/grub2-probe: error: failed to get canonical path of `LiveOS_rootfs'. - -%end # End of the %post section \ No newline at end of file diff --git a/ingredients/base-live-hypervisor-ii.cfg b/ingredients/base-live-hypervisor-ii.cfg deleted file mode 100644 index cddba12..0000000 --- a/ingredients/base-live-hypervisor-ii.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# __ ____ ____ _____ -# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ -# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ -# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / -# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ -# /_/ /____/ - -# What ? This kickstart file configures an hypervisor for Intel(tm) CPUs and Intel(tm) graphic cards - -%post --log=/root/blhi.log # Beginning of %post section. Those commands are executed inside the chroot environment. Logging is enabled to help with post-installtion troubleshooting - -sed -i 's/\(quiet\)/\1 intel_iommu=on iommu=pt rd.driver.pre=vfio-pci i915.enable_gvt=1/i' /etc/default/grub # Load kernel modules in grub. - -# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd -echo "vfio" > /etc/modules-load.d/vfio.conf -echo "vfio-pci" > /etc/modules-load.d/vfio-pci.conf -echo "vfio_iommu_type1" > /etc/modules-load.d/vfio_iommu_type1.conf -echo "vfio_virqfd" > /etc/modules-load.d/vfio_virqfd.conf -echo "kvmgt" > /etc/modules-load.d/kvmgt.conf # Load specific kernel modules kvmgt and vfio-mdev, for Intel (tm) GVT-g and Nvidia (tm) -echo "vfio-mdev" > /etc/modules-load.d/vfio-mdev.conf # Load specific kernel modules kvmgt and vfio-mdev, for Intel (tm) GVT-g and Nvidia (tm) - -echo "options kvm_intel nested=1" >> /etc/modprobe.d/kvm.conf # Add support for nested-virtualization - -# The following part seems useless -# dracut --add-drivers " vfio vfio-pci vfio_iommu_type1 vfio_virqfd vfio-mdev kvmgt " --force # Instruct dracut to load the vfio drivers -# dracut --force # Regenerate initramfs -# Doesn't seem to work -# dracut: Cannot find /usr/lib/dracut/dracut-init.sh. -# dracut: Are you running from a git checkout? -# dracut: Try passing -l as an argument to /usr/bin/dracut - -# The following part seems useless too. No need to regenerate grub -# grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub. Does it fail ? /usr/sbin/grub2-probe: error: failed to get canonical path of `LiveOS_rootfs'. - -%end # End of the %post sectionsud \ No newline at end of file diff --git a/ingredients/base-live-hypervisor.cfg b/ingredients/base-live-hypervisor.cfg deleted file mode 100644 index e21d9f5..0000000 --- a/ingredients/base-live-hypervisor.cfg +++ /dev/null @@ -1,67 +0,0 @@ - -# __ ____ ____ _____ -# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ -# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ -# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / -# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ -# /_/ /____/ - -# What ? This kickstart file provides a basic, generic building block to build a virtualization host. - -%packages --exclude-weakdeps # Beginning of the packages section. Does not include weak dependencies. - -qemu-kvm -libvirt -libvirt-daemon-config-network -libvirt-daemon-kvm -virt-install -virt-top -libguestfs-tools -python3-libguestfs -guestfs-tools # Complementary tools useful for interacting with vith guest systems - -%end # End of the packages section - -%post --log=/root/bhl.log # Beginning of %post section. Those commands are executed inside the chroot environment. Logging is enabled to help with post-installation troubleshooting - -mkdir /var/lib/libvirt/iso # Create a directory to store iso images - -wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /var/lib/libvirt/iso/ # fetch netboot.xyz iso - -# fetch custom script and make it executable -wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post/configure-vmm-and-desktop.sh -P /usr/sbin/ -chmod +x /usr/sbin/configure-vmm-and-desktop.sh - -# fetch custom script and make it executable -wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post/create-live-vm.sh -P /usr/sbin/ -chmod +x /usr/sbin/create-live-vm.sh - -# fetch custom script and make it executable -wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post/virtualization-tweaks-root-needed.sh -P /usr/sbin/ -chmod +x /usr/sbin/virtualization-tweaks-root-needed.sh - -# # Create new file /etc/systemd/system/postinstall.service using cat: -# cat > /etc/systemd/system/post-install.service<< EOF -# [Unit] -# Description=Post-installation configuration for Phyllome OS -# After=gdm.service -# Requires=gdm.service -# -# [Service] -# Type=oneshot -# ExecStart=/bin/bash /usr/sbin/post-install.sh -# RemainAfterExit=yes -# -# [Install] -# WantedBy=multi-user.target -# EOF -# -# systemctl enable /etc/systemd/system/post-install.service # Enable systemd unit - -# Add a network bridge. Still need to declare it to libvirt/virt-manager -# nmcli con add ifname br0 type bridge con-name br0 -# nmcli con add type bridge-slave ifname enp1s0 master br0 # to-do : generalize this command so that it could regardless of the name of the ethernet device -# nmcli con up br0 - -%end # End of the %post section - diff --git a/recipes/dev-virtual-desktop.cfg b/recipes/dev-virtual-desktop.cfg deleted file mode 100644 index 21382d7..0000000 --- a/recipes/dev-virtual-desktop.cfg +++ /dev/null @@ -1,21 +0,0 @@ -# __ ____ ____ _____ -# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ -# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ -# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / -# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ -# /_/ /____/ -# -# FOR DEVELOPMENT ONLY! -# What ? This kickstart file bootstraps a desktop machine using GNOME Shell meant to be used as a virtual machine. - -# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one. -# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : -# ksflatten -c dev-virtual-desktop.cfg -o ../dishes/dev-virtual-desktop.cfg - -%include ../ingredients/base-fedora-repo.cfg # offical repositories for Fedora -%include ../ingredients/base-storage.cfg # base storage -%include ../ingredients/dev-base.cfg # A minimal machine -%include ../ingredients/base-desktop-gnome.cfg # A desktop environment based on GNOME Shell -%include ../ingredients/base-guest-agents.cfg # Guest agents - -poweroff # Shut down the system after a successful installation \ No newline at end of file diff --git a/recipes/dev-virtual-server.cfg b/recipes/dev-virtual-server.cfg deleted file mode 100644 index b057b50..0000000 --- a/recipes/dev-virtual-server.cfg +++ /dev/null @@ -1,20 +0,0 @@ -# __ ____ ____ _____ -# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ -# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ -# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / -# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ -# /_/ /____/ -# -# FOR DEVELOPMENT ONLY! -# What ? When flattened, this file will result in a stand-alone kickstart file that can be automatically deploy into a server-oriented system. - -# In order to be fed to virt-install or a software like livecd-creator, this file needs to be flattened. -# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : -# ksflatten -c dev-virtual-server.cfg -o ../dishes/dev-virtual-server.cfg - -%include ../ingredients/base-fedora-repo.cfg # offical repositories for Fedora -%include ../ingredients/base-storage.cfg # base storage -%include ../ingredients/dev-base.cfg # A base system -%include ../ingredients/base-guest-agents.cfg # Guest agents - -poweroff # Shut down the system after a successful installation \ No newline at end of file diff --git a/recipes/live-desktop-hypervisor-a.cfg b/recipes/live-desktop-hypervisor-a.cfg deleted file mode 100644 index 44b8f6a..0000000 --- a/recipes/live-desktop-hypervisor-a.cfg +++ /dev/null @@ -1,54 +0,0 @@ -# __ ____ ____ _____ -# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ -# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ -# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / -# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ -# /_/ /____/ - -# What ? This kickstart file bootstraps a live desktop hypervisor configured for AMD (tm) CPUs. - -# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one. -# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : -# ksflatten -c live-desktop-hypervisor-a.cfg -o ../dishes/phyllome-desktop-live-a.cfg -# IMPORTANT : Weak dependencies to be destroyed in the resulting ks - -# Instructions for livecd-creator (about to be deprecated) -# An ISO file can be created using the following command as *root*: -# livecd-creator -c ../leaves/phyllome-desktop-live-a.cfg --fslabel=phyllome-desktop-live-a -# livecd-creator is part of the livecd-tools package - -# Instructions for livemedia-creator -# An ISO file can be created using the following command as *root*: -# livemedia-creator --make-iso --ks phyllome-desktop-live-a.cfg --no-virt --iso-only --iso-name phyllome-desktop-live-a-x86_64.iso --releasever 35 - -# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*: -# UEFI test: -# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-desktop-live-a-x86_64.iso -# BIOS test: -# qemu-kvm -m 2048 -vga qxl phyllome-desktop-live-a-x86_64.iso - -%include ../ingredients/live-desktop.cfg # A base for a live desktop minimal machine -%include ../ingredients/base-live-hypervisor.cfg # A base hypervisor -%include ../ingredients/base-live-hypervisor-a.cfg # Specific virtualization configuration for AMD (tm) CPUs - -%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies. - -virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM - -%end # End of the packages section - -%post --log=/root/live-desktop-hypervisor-a.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. - -usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvirt group to allow it to interact with the guest-hypervisor. -chown liveuser:liveuser /var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory -chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory - -# Create a file to autostart virt-manager -cat > /etc/xdg/autostart/virt-manager.desktop << EOF -[Desktop Entry] -Type=Application -Name=Virtual Machine Manager -Exec=virt-manager -EOF - -%end # End of the %post section diff --git a/recipes/live-desktop-hypervisor-amdcpu.cfg b/recipes/live-desktop-hypervisor-amdcpu.cfg deleted file mode 100644 index fbe3864..0000000 --- a/recipes/live-desktop-hypervisor-amdcpu.cfg +++ /dev/null @@ -1,36 +0,0 @@ -# __ ____ ____ _____ -# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ -# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ -# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / -# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ -# /_/ /____/ - -# What ? This kickstart file contains the recipe to bootstrap a live desktop hypervisor configured for AMD (tm) CPUs. - -# Flattening - -# This file needs to be flattened: flattening is like cooking ingredients in a specific order to make a dish. -# You can do that with the ksflatten tool provided by the pykickstart package on Fedora: -# ksflatten -c live-desktop-hypervisor-amdcpu -o ../dishes/live-phyllome-desktop-amdcpu.cfg - -# Instructions for creating an ISO file - -# Temporary disable SELinux with -# setenforce 0 -# Use the following command to create an ISO file, as the root user: -# livemedia-creator --make-iso --ks ../dishes/live-phyllome-desktop-amdcpu.cfg --no-virt --iso-only --iso-name phyllome-desktop-amdcpu-x86_64.iso --releasever 35 - -# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*: -# UEFI test: -# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-desktop-amdcpu-x86_64.iso -# BIOS test: -# qemu-kvm -m 2048 -vga qxl phyllome-desktop-amdcpu-x86_64.iso - -%include ../ingredients/base-fedora-repo.cfg # offical repositories for Fedora -%include ../ingredients/base-storage-live.cfg # a base storage for live systems -%include ../ingredients/base-live.cfg # A minimal base for live systems -%include ../ingredients/base-desktop-gnome.cfg # A desktop environment based on GNOME Shell -%include ../ingredients/base-desktop-virtual-machine-manager.cfg # the virtual machine manager -%include ../ingredients/base-live-desktop-quirks.cfg # Some live-related quirks -%include ../ingredients/base-hypervisor.cfg # A base hypervisor -%include ../ingredients/base-hypervisor-amdcpu.cfg # Specific virtualization configuration for AMD (tm) CPUs \ No newline at end of file diff --git a/recipes/live-desktop-hypervisor-ii.cfg b/recipes/live-desktop-hypervisor-ii.cfg deleted file mode 100644 index cd9745b..0000000 --- a/recipes/live-desktop-hypervisor-ii.cfg +++ /dev/null @@ -1,54 +0,0 @@ -# __ ____ ____ _____ -# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ -# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ -# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / -# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ -# /_/ /____/ - -# What ? This kickstart file bootstraps a live desktop hypervisor configured for Intel(tm) CPUs and Intel(tm) GPUs. - -# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one. -# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : -# ksflatten -c live-desktop-hypervisor-ii.cfg -o ../dishes/phyllome-desktop-live-ii.cfg -# IMPORTANT : Weak dependencies to be destroyed in the resulting ks - -# Instructions for livecd-creator (about to be deprecated) -# An ISO file can be created using the following command as *root*: -# livecd-creator -c ../leaves/phyllome-desktop-live-ii.cfg --fslabel=phyllome-desktop-live-ii -# livecd-creator is part of the livecd-tools package - -# Instructions for livemedia-creator -# An ISO file can be created using the following command as *root*: -# livemedia-creator --make-iso --ks phyllome-desktop-live-ii.cfg --no-virt --iso-only --iso-name phyllome-desktop-live-ii.iso --releasever 35 - -# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*: -# UEFI test: -# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-desktop-live-ii-x86_64.iso -# BIOS test: -# qemu-kvm -m 2048 -vga qxl phyllome-desktop-live-ii-x86_64.iso - -%include ../ingredients/live-desktop.cfg # A base for a live desktop minimal machine -%include ../ingredients/base-live-hypervisor.cfg # A base hypervisor -%include ../ingredients/base-live-hypervisor-ii.cfg # Specific virtualization configuration for Intel(tm) CPUs and Intel(tm) GPUs - -%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies. - -virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM - -%end # End of the packages section - -%post --log=/root/phyllome-desktop-ii.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging. - -usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvirt group to allow it to interact with the guest-hypervisor. -chown liveuser:liveuser /var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory -chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory - -# Create a file to autostart virt-manager -cat > /etc/xdg/autostart/virt-manager.desktop << EOF -[Desktop Entry] -Type=Application -Name=Virtual Machine Manager -Exec=virt-manager -EOF - -%end # End of the %post section \ No newline at end of file