phyllomeos/README.md

183 lines
8.8 KiB
Markdown
Raw Normal View History

# Phyllome OS
2021-10-25 08:13:17 +00:00
> Virtualization for the rest of us
2021-06-03 12:38:49 +00:00
2021-11-14 23:37:56 +00:00
*Phyllome OS is a [Fedora Remix](https://fedoraproject.org/wiki/Remix) based on [Fedora Server 35](https://getfedora.org/en/server/) designed to leverage hardware-assisted virtualization and paravirtualization to make it easier to run modern guest operating systems locally.*
2021-09-03 07:20:13 +00:00
2021-11-14 17:49:01 +00:00
> This is the **alpha version** of Phyllome OS. Expect bugs and disappointment.
2021-09-03 07:20:13 +00:00
> External contributions to Phyllome OS are welcome. Have a look [here](https://kanboard.phyllo.me/b/CH7qd98J2v7egmodk/development) for some ideas on what to do next, or feel free to create an issue and suggest an idea you wish to work on. Also, it might be good to skim through the [white-paper](https://files.phyllo.me/s/oYwfxYpZcbppwr6) to understand what it is about and what the project is trying to achieve.
2021-09-03 07:20:13 +00:00
2021-11-14 18:16:50 +00:00
> The Phyllome OS Project is **looking for core contributors**, willing to contribute regularly to the project. If you are interested in making cutting-edge open-source virtualization more accessible, please send an email to contact@phyllo.me.
2021-11-10 08:36:15 +00:00
2021-11-14 17:49:01 +00:00
## What
2021-11-14 18:16:50 +00:00
This repository contains the basic building blocks required to deploy [Phyllome OS](https://phyllo.me/) in a virtual machine, using kickstart files.
2021-11-14 17:49:01 +00:00
Kickstart files are used to automate the installation and configuration of RPM-based operating systems.
> If you would like to install Phyllome OS on your computer, please follow [this guide](https://wiki.phyllo.me/deploy/install) instead.
### Structure of the repository
2021-11-14 17:49:01 +00:00
* `blocks` : this directory contains the basic building blocks for assembling Phyllome OS Desktop and Phyllome OS Server.
* This is where most of the development happens.
* `blocks-live` : this directory contains the basic building blocks for creating a live medium for Phyllome OS.
* The code in this directory usually lags behind what is found in the `blocks` directory.
2021-11-14 18:16:50 +00:00
* The `blocks` and `blocks-live` repository will eventually be merged, and the number of blocks will be reduced to avoid code duplication.
2021-11-14 17:49:01 +00:00
* `leaves` : this directory contains the end product in the form of stand-alone and ready-to-use kickstart files.
2021-11-14 18:16:50 +00:00
* For instance, the Phyllome OS Desktop version optimized for Intel(tm) CPUs and Intel(tm) graphics cards, referred to internally as `flat-dhi`, is stored there (*d* stands for desktop, *h* for hypervisor and *i* for intel).
* `post` : this directory contains scripts that are meant to be run after a successful installation, after Phyllome OS has started.
2021-11-14 17:49:01 +00:00
* Ideally, these code snippets will be merged with existing building blocks, or summoned as a systemd unit.
2021-11-10 08:36:15 +00:00
## How to hack Phyllome OS
2021-11-14 17:49:01 +00:00
> Only Linux-based development is possible at the moment, sorry. Support for macOS and Windows-based development will follow.
2021-09-03 07:20:13 +00:00
2021-11-14 17:49:01 +00:00
As of now, hacking kickstart files is the main way to develop Phyllome OS.
2021-11-10 08:36:15 +00:00
2021-11-14 17:49:01 +00:00
Have a look [here](https://docs.fedoraproject.org/en-US/fedora/rawhide/install-guide/appendixes/Kickstart_Syntax_Reference/) to learn the kickstart syntax.
2021-09-03 07:20:13 +00:00
2021-11-14 17:49:01 +00:00
### Requirements
2021-11-14 17:49:01 +00:00
* A Linux distribution, with a recent Linux Kernel (> 5.X)
* A x86_64 platform with hardware-assisted virtualization [enabled](https://wiki.phyllo.me/deploy/prepare)
* Nested-virtualization enabled
* `virt-install` and `virt-manager`, as well as `libvirt` and `qemu-kvm` up and running
2021-11-14 17:49:01 +00:00
**Enable** nested-virtualization on **AMD-based systems**, then reboot:
```
sudo echo "options kvm_amd nested=1" >> /etc/modprobe.d/kvm.conf
```
2021-11-14 17:49:01 +00:00
**Enable** nested-virtualization on **Intel-based systems**, then reboot:
```
sudo echo "options kvm_intel nested=1" >> /etc/modprobe.d/kvm.conf`
```
2021-11-14 17:49:01 +00:00
**Install the prerequisites on Fedora 35**
```
2021-11-14 17:49:01 +00:00
sudo dnf install -y qemu-kvm libvirt libvirt-daemon-config-network libvirt-daemon-kvm virt-install virt-top virt-manager libguestfs-tools python3-libguestfs guestfs-tools pykickstart
```
2021-11-14 17:49:01 +00:00
**Install the prerequisites on Ubuntu 20.4 or Debian 11**
```To be done```
2021-11-14 17:49:01 +00:00
### Hack around
2021-11-14 17:49:01 +00:00
Clone this repository:
```
git clone https://github.com/PhyllomeOS/PhyllomeOS.git
```
2021-11-14 17:49:01 +00:00
Modify some files, typically inside the `blocks` directory.
2021-11-10 08:36:15 +00:00
When you are done, move to the `flat` directory:
```
cd ./PhyllomeOS/flat/
```
2021-11-14 18:16:50 +00:00
Then, merge the kickstart basic building blocks into a single file, a process called 'flattening'.
```
2021-11-14 17:49:01 +00:00
ksflatten -c ../blocks/dhi.cfg -o flat-dhi.cfg
```
2021-11-14 18:16:50 +00:00
If any errors are detected, go back and fix them.
2021-11-14 17:49:01 +00:00
### Fire it up!
2021-11-14 17:49:01 +00:00
For testing purposes, Phyllome OS can be deployed inside a virtual machine, as a guest hypervisor.
2021-11-14 17:49:01 +00:00
The following command will automatically deploy the alpha version of Phyllome OS, tuned for Intel CPUs and Intel graphics cards.
2021-11-14 17:49:01 +00:00
It uses a Q35 virtual motherboard, a UEFI-based firmware, virtio-devices accross the board, 2 vCPUs, 4 GB of RAM and a disk of 5 GB.
2021-11-14 18:16:50 +00:00
> Adjust it according to your needs.
2021-11-14 17:49:01 +00:00
When ready, copy and paste it to your terminal.
```
virt-install \
--connect qemu:///system \
--virt-type kvm \
--arch x86_64 \
--machine q35 \
--name phyllome-alpha \
--boot uefi \
--cpu host-model,topology.sockets=1,topology.cores=2,topology.threads=1 \
--vcpus 2 \
--memory 4096 \
--video virtio \
--channel spicevmc \
--autoconsole none \
--sound none \
--controller type=virtio-serial \
--controller type=usb,model=none \
--controller type=scsi,model=virtio-scsi \
--network network=default,model=virtio \
--input type=keyboard,bus=virtio \
--input type=tablet,bus=virtio \
--rng /dev/urandom,model=virtio \
--disk path=/var/lib/libvirt/images/flat-dhi.img,format=raw,bus=virtio,cache=writeback,size=5 \
--location=https://download.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/ \
--initrd-inject flat-dhi.cfg --extra-args "inst.ks=file:flat-dhi.cfg"
2021-09-03 07:20:13 +00:00
```
2021-11-14 18:16:50 +00:00
You should see the following message:
```
Starting install...
Retrieving file vmlinuz... | 10 MB 00:00
Retrieving file initrd.img... | 79 MB 00:02
Allocating 'virtinst-inlu7cmw-vmlinuz' | 10 MB 00:00
Transferring virtinst-inlu7cmw-vmlinuz | 10 MB 00:00
Allocating 'virtinst-2dd8ghse-initrd.img' | 79 MB 00:00
Transferring virtinst-2dd8ghse-initrd.img | 79 MB 00:01
Allocating 'flat-dhi.img' | 5.0 GB 00:00
Domain is still running. Installation may be in progress.
You can reconnect to the console to complete the installation process.
```
2021-11-14 18:16:50 +00:00
The installation process will be launched behind the scenes. You can open `virt-manager` and connect to the virtual machine console to follow the process. Eventually, you will be greeted with this screen:
![greetings](./img/greetings.png)
2021-11-14 18:16:50 +00:00
After you are done setting up your user account, `virt-manager` will automatically start:
![greetings](./img/desktop.png)
2021-11-14 18:16:50 +00:00
If the installation is successful and your feature is working as intended, you are welcome to create a pull request. Thank you!
2021-11-14 17:49:01 +00:00
## Phyllome OS
2021-11-14 23:37:56 +00:00
Phyllome OS goal is to maximize ease-of-use and compatibility. As such, it intends to become the easiest way to use modern operating systems locally, in a virtual machine, by integrating pertinent open-source software such as `libvirt`, `qemu-kvm` (and eventually `Cloud Hypervisor`), as well as `virt-manager`.
2021-11-14 18:16:50 +00:00
Users should not have to manage Phyllome OS: they should be able to pick their favorite operating system and Phyllome OS should run it, no questions asked.
2021-11-14 18:16:50 +00:00
> Note : with the exception of open-source [Darwin derivatives](https://en.wikipedia.org/wiki/Darwin_(operating_system)#Derived_projects), Phyllome OS **strongly** discourages users from running proprietary, darwin-based derivatives on non-Apple hardware.
### The Phyllome OS Project
2021-11-14 17:49:01 +00:00
The Phyllome OS Project relies on multiple tools, including the following public-facing tools:
2021-11-14 18:16:50 +00:00
* **Wiki**: Take a look at the [wiki repository](https://github.com/PhyllomeOS/wiki) for more information on how you can contribute to improving the documentation.
* **Issues tracker**: a public, read-only issue tracking is [available online](https://kanboard.phyllo.me/b/CH7qd98J2v7egmodk/development). From now on, GitHub issue tracking will be used to track development-only issues.
2021-11-14 17:49:01 +00:00
* **Code repository**: GitHub is used to host the code, with a mirror pointing to git.phyllo.me
2021-11-14 18:16:50 +00:00
## License
2021-09-03 07:20:13 +00:00
2021-11-14 17:49:01 +00:00
* [MIT](./LICENSE.md) for the most part, with some [GPL](./blocks-live/LICENSE.md) code.
2021-09-03 07:20:13 +00:00
## Acknowledgement
2021-09-03 07:20:13 +00:00
Thanks to the main contributors of the official Fedora kickstart files repository, and related tools:
2021-09-03 07:20:13 +00:00
> Adam Miller, Bastien Nocera, Bruno Wolff III, Bryan Kearney, Chitlesh Goorah, Christoph Wickert,
2021-09-03 07:20:13 +00:00
Colin Walters, Fabian Affolter, Igor Pires Soares, Jens Petersen, Jeremy Katz, Jeroen van Meeuwen
Jesse Keating, Luya Tshimbalanga, Matthias Clasen, Pedro Silva, Rahul Sundaram, Sebastian Dziallas
2021-11-13 22:56:45 +00:00
Sebastian Vahl, wart. More information here : https://pagure.io/fedora-kickstarts