correct a terrible mistake
This commit is contained in:
32
leaves/vdmd.cfg
Normal file
32
leaves/vdmd.cfg
Normal file
@ -0,0 +1,32 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# WHAT ? This Kickstart file bootstraps a minimal GNOME-based desktop-oriented virtual machine.
|
||||
# 'v' for virtual machine, 'e' for efi, 'm' for minimal, 'd' for desktop, 'd' for development only.
|
||||
|
||||
# USAGE : Press the `tab` or 'e' key during POST and apend that after the 'quiet' string :
|
||||
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdd.cfg
|
||||
# A shorter URL can also be used :
|
||||
# inst.ks=https://url.phyllo.me/vemdd
|
||||
|
||||
# ATTENTION : this kickstart file will automatically DESTROY the main virtual disk 'vda' and all of its contents.
|
||||
# Bye bye!
|
||||
|
||||
%include https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemsd.cfg # Include vemsd.cfg as base
|
||||
|
||||
%post
|
||||
|
||||
dnf install -y gnome-shell gnome-terminal nano # Minimal GNOME shell or desktop environment plus the text nano editor
|
||||
dnf install -y spice-vdagent # Try to install spice-vdagent after the installation is done
|
||||
dnf install -y dejavu-sans-mono-fonts # the gnome-shell package doesn't include much fonts by default, resulting in weird spacings in the gnome-terminal.
|
||||
dnf install -y elementary-wallpapers-gnome.noarch # Gorgeous wallpapers
|
||||
dnf install -y wpa_supplicant # WPA Supplicant for Linux. Not integrated by default in gnome-shell, but necessary to configure wireless networks through the Network Manager.
|
||||
dnf remove -y gnome-tour # We don't want GNOME-tour to open at launch so we delete it
|
||||
|
||||
systemctl set-default graphical.target # Set the desktop environment as the default booting target with systemd
|
||||
|
||||
%end # End of the %post section
|
35
leaves/vhadmd.cfg
Normal file
35
leaves/vhadmd.cfg
Normal file
@ -0,0 +1,35 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# WHAT ? This Kickstart file bootstraps a minimal GNOME-based desktop-oriented virtual machine.
|
||||
# 'v' for virtual machine, 'e' for efi, 'm' for minimal, 'd' for desktop, 'd' for development only.
|
||||
|
||||
# USAGE : Press the `tab` or 'e' key during POST and apend that after the 'quiet' string :
|
||||
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdhad.cfg
|
||||
# A shorter URL can also be used :
|
||||
# inst.ks=https://url.phyllo.me/vemdhad
|
||||
|
||||
# ATTENTION : this kickstart file will automatically DESTROY the main virtual disk 'vda' and all of its contents.
|
||||
# Bye bye!
|
||||
|
||||
%include https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdhd.cfg # Includes vemdhd.cfg, a minimal desktop-oriented nested-host ks file
|
||||
|
||||
%post # Beginning of %post section
|
||||
|
||||
# Load kernel modules in grub. Add `intel_iommu=on intel_iommu=pt` for Intel processors,
|
||||
|
||||
sed -i 's/\(quiet\)/\1 amd_iommu=on/i' /etc/default/grub
|
||||
sed -i 's/\(amd_iommu=on\)/\1 amd_iommu=pt/i' /etc/default/grub
|
||||
|
||||
# Load specific kernel modules kvmgt and vfio-mdev, for Intel GVT-g and Nvidia
|
||||
echo "kvmgt" > /etc/modules-load.d/kvmgt.conf
|
||||
echo "vfio-mdev" > /etc/modules-load.d/vfio-mdev.conf
|
||||
|
||||
dracut --force # Regenerate initramfs
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub
|
||||
|
||||
%end # End of the %post section
|
47
leaves/vhdmd.cfg
Normal file
47
leaves/vhdmd.cfg
Normal file
@ -0,0 +1,47 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# WHAT ? This Kickstart file bootstraps a minimal desktop-oriented nested-host.
|
||||
# 'v' for virtual machine, 'e' for efi, 'm' for minimal, 'd' for desktop, 'h' for hypervisor, 'd' for development only.
|
||||
|
||||
# USAGE : Press the `tab` or 'e' key during POST and apend that after the 'quiet' string :
|
||||
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdhd.cfg
|
||||
# A shorter URL can also be used :
|
||||
# inst.ks=https://url.phyllo.me/vemdhd
|
||||
|
||||
# ATTENTION : this kickstart file will automatically DESTROY the main virtual disk 'vda' and all of its contents.
|
||||
# Bye bye!
|
||||
|
||||
%include https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdd.cfg # Includes vemdd.cfg, the minimal GNOME-based desktop-oriented virtual machine ks file.
|
||||
|
||||
%post # Beginning of %post section
|
||||
|
||||
dnf install -y qemu-kvm libvirt libvirt-daemon-config-network libvirt-daemon-kvm # Install minimal tools dedicated to virtualization.
|
||||
dnf install -y virt-install virt-manager virt-viewer virt-top libguestfs-tools python3-libguestfs guestfs-tools # Complementary tools useful for interacting with virtual machines.
|
||||
|
||||
usermod -a -G libvirt test ## make user "test" part of the existing libvirt group to allow it to interact with the nested-hypervisor.
|
||||
|
||||
# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd, kvmgt, vfio-mdev
|
||||
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
|
||||
|
||||
# Create a directory to store iso images and make the user "test" its owner
|
||||
mkdir /var/lib/libvirt/iso
|
||||
chown test:test /var/lib/libvirt/iso
|
||||
|
||||
# Create a directory to store rom files and make the user "test" its owner
|
||||
mkdir /var/lib/libvirt/rom
|
||||
chown test:test /var/lib/libvirt/rom
|
||||
|
||||
# Create a network bridge (doesn't work, perhaps because nmcli is not available at that time. No, it is because the new network must be defined within the libvirt context, with an XML file)
|
||||
# nmcli con add ifname br0 type bridge con-name br0
|
||||
# nmcli con add type bridge-slave ifname en0 master br0
|
||||
# nmcli con up br0
|
||||
|
||||
%end # End of the %post section
|
36
leaves/vhidmd.cfg
Normal file
36
leaves/vhidmd.cfg
Normal file
@ -0,0 +1,36 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# WHAT ? This Kickstart file bootstraps a minimal GNOME-based desktop-oriented virtual machine.
|
||||
# 'v' for virtual machine, 'e' for efi, 'm' for minimal, 'd' for desktop, 'h' for hypervisor, 'i' for intel', 'd' for development only.
|
||||
|
||||
# USAGE : Press the `tab` or 'e' key during POST and apend that after the 'quiet' string :
|
||||
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdhid.cfg
|
||||
# A shorter URL can also be used :
|
||||
# inst.ks=https://url.phyllo.me/vemdhid
|
||||
|
||||
# ATTENTION : this kickstart file will automatically DESTROY the main virtual disk 'vda' and all of its contents.
|
||||
# Bye bye!
|
||||
|
||||
%include https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemdhd.cfg # Includes vemdhd.cfg, a minimal desktop-oriented nested-host ks file
|
||||
|
||||
%post # Beginning of %post section
|
||||
|
||||
# Load kernel modules in grub. Add `intel_iommu=on intel_iommu=pt` for Intel processors,
|
||||
|
||||
sed -i 's/\(quiet\)/\1 intel_iommu=on/i' /etc/default/grub
|
||||
sed -i 's/\(intel_iommu=on\)/\1 intel_iommu=pt/i' /etc/default/grub
|
||||
sed -i 's/\(intel_iommu=pt\)/\1 i915.enable_gvt=1/i' /etc/default/grub
|
||||
|
||||
# Load specific kernel modules kvmgt and vfio-mdev, for Intel GVT-g and Nvidia
|
||||
echo "kvmgt" > /etc/modules-load.d/kvmgt.conf
|
||||
echo "vfio-mdev" > /etc/modules-load.d/vfio-mdev.conf
|
||||
|
||||
dracut --force # Regenerate initramfs
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub
|
||||
|
||||
%end # End of the %post section
|
117
leaves/vmd.cfg
Normal file
117
leaves/vmd.cfg
Normal file
@ -0,0 +1,117 @@
|
||||
# __ ____ ____ _____
|
||||
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
|
||||
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
|
||||
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
|
||||
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
|
||||
# /_/ /____/
|
||||
|
||||
# WHAT ? This Kickstart file bootstraps a minimal server-oriented virtual machine.
|
||||
# 'v' for virtual machine, 'e' for efi, 'm' for minimal, 's' for server, 'd' for development only.
|
||||
|
||||
# USAGE : Press the `tab` or 'e' key during POST and apend that after the 'quiet' string :
|
||||
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/leafs/vemsd.cfg
|
||||
# A shorter URL can also be used :
|
||||
# inst.ks=https://url.phyllo.me/vemsd
|
||||
|
||||
# ATTENTION : this kickstart file will automatically DESTROY the main virtual disk 'vda' and all of its contents.
|
||||
# Bye bye!
|
||||
|
||||
## INSTALLATION SOURCE ##
|
||||
|
||||
# Configure the cdrom as the installation method
|
||||
# cdrom
|
||||
|
||||
# Set URL
|
||||
url --url="http://download.fedoraproject.org/pub/fedora/linux/releases/34/Server/x86_64/os"
|
||||
|
||||
## INSTALLATION TYPE ##
|
||||
|
||||
# Perform Installation in text mode
|
||||
text
|
||||
|
||||
## REPOSITORIES ##
|
||||
|
||||
# Add mirro and repo
|
||||
url --mirrorlist="https://mirrors.fedoraproject.org/metalink?repo=fedora-34&arch=x86_64"
|
||||
repo --name=fedora-updates --mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f34&arch=x86_64" --cost=0
|
||||
|
||||
repo --name=rpmfusion-free --mirrorlist="https://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-34&arch=x86_64" --includepkgs=rpmfusion-free-release
|
||||
repo --name=rpmfusion-free-updates --mirrorlist="https://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-34&arch=x86_64" --cost=0
|
||||
|
||||
## USER RELATED ##
|
||||
|
||||
# Set the keyboard layout
|
||||
keyboard --xlayouts='ch (fr)'
|
||||
|
||||
# Set the system language to American English
|
||||
lang en_US.UTF-8
|
||||
|
||||
# System timezone
|
||||
timezone Europe/Paris --utc # Pour Paris !
|
||||
|
||||
# Set dummy encrypted root password and activate the root account
|
||||
rootpw --iscrypted $6$2rA58L/SQu5.xMTb$u8.zqBWE5bK1/N983qDpJEp41yg66GwQ3YVTpsRghVhNiZypWyo2Zq2Qwr2tCM3bt50mKMIgHzbPdtSq9ErPz.
|
||||
|
||||
# Create "test" user account
|
||||
user --name=test --password=$6$wlB.n8fvumAXv3xn$clVIswjLUjb7MZoJ2JHi1zk1zmx5ViQuzbVkLYf70SDan5hdqI0tUkc89nHE8pVnHStO4mcl3c1Tk0WJvCet1. --iscrypted --gecos="test"
|
||||
|
||||
## NETWORK RELATED ##
|
||||
|
||||
# Activate the firewall
|
||||
firewall --enabled
|
||||
|
||||
# Configure Network Interfaces
|
||||
network --onboot=yes --bootproto=dhcp --hostname=vemsd
|
||||
|
||||
# Run the Setup Agent on first boot
|
||||
firstboot --enable
|
||||
|
||||
## DISK RELATED ##
|
||||
|
||||
# Only use disk labelled as vda
|
||||
ignoredisk --only-use=vda
|
||||
|
||||
# WARNING : Dangerous command ! Will clear the Master Boot Record
|
||||
zerombr
|
||||
|
||||
# Partition clearing information
|
||||
clearpart --all --initlabel --drives=vda
|
||||
|
||||
# Disk partitioning information.
|
||||
# Will create an efi partitition of 128 MiB (vda1), a boot partition of 384 MiB using the ext4 filesystem (vda2). The remaining space will be used for root (vda3). This set up uses GPT by default.
|
||||
part /boot/efi --fstype="efi" --ondisk=vda --size=128 --fsoptions="umask=0077,shortname=winnt" --label=efi
|
||||
part /boot --fstype="ext4" --ondisk=vda --size=384 --label=boot
|
||||
part / --fstype="ext4" --ondisk=vda --grow --label=root
|
||||
|
||||
# part pv.122 --fstype="lvmpv" --ondisk=vda --grow # Example with LVM (untested)
|
||||
# volgroup system --pesize=4096 pv.122
|
||||
# logvol / --fstype="ext4" --percent 100 --label="root" --name=root --vgname=system
|
||||
|
||||
# System timezone
|
||||
timezone Europe/Paris --utc
|
||||
|
||||
## SOFTWARE ##
|
||||
|
||||
# Install packages for the server environment. 'Core' and 'Base' are always selected
|
||||
%packages
|
||||
|
||||
@core # Would need to know what is included in core
|
||||
qemu-guest-agent # Install software to allow the host to better interact with the guest (can't find the spice-vdagent package)
|
||||
pciutils # Pciutils provides lspci commandline tool and is not installed by default
|
||||
## spice-vdagent
|
||||
-fedora-logos # To be removed if we want to redistribute as Fedora Remix.
|
||||
-fedora-release-notes # To be removed if we want to redistribute as Fedora Remix.
|
||||
|
||||
%end
|
||||
|
||||
## POST-INSTALLATION SCRIPT ##
|
||||
|
||||
%post --log=/root/ks-post.log ## Start of the %post section with logging into /root/ks-post.log
|
||||
dnf update -y # Update the system
|
||||
localectl set-keymap ch-fr # Set keymap to `ch-fr`. Alternatively, `us` can be picked
|
||||
sed -i 's/5/1/' /etc/default/grub # set the GRUB_TIMEOUT countdown to 1 instead of 5 seconds. This command could be used bootloader --timeout=1 in the disk section
|
||||
grub2-mkconfig -o /boot/grub2/grub.cfg # Update grub. How about this command grub2-mkconfig -o /etc/grub2-efi.cfg
|
||||
|
||||
reboot # Reboot the installer (doesn't work (tm))
|
||||
|
||||
%end # End of the %post section
|
Reference in New Issue
Block a user