Cleaning installation process

Make the installation process a bit more easy to follow
This commit is contained in:
lukas
2023-05-29 16:55:01 +02:00
parent 1b3b3aa8e6
commit 65a0ad71f5
7 changed files with 67 additions and 236 deletions

View File

@@ -14,20 +14,11 @@ As of now, `netboot.xyz` is one of the main way to deploy or use a guest operati
## Preparation
By default, `netboot.xyz.iso` should already be located under `var/lib/libvirt/iso`. If it's not the case, please use the following command to fetch it, or navigate to [the website](https://netboot.xyz/):
By default, `netboot.xyz.iso` should already be located under `var/lib/libvirt/image/iso`. If it's not the case, please use the following command to fetch it, or navigate to [the website](https://netboot.xyz/):
```
wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /var/lib/libvirt/iso/
wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /var/lib/libvirt/image/iso/
```
## Run the script
The following script, which also doesn't require root privileges, will create a virtual machine called `my-first-live-vm`. This virtual machine will be started automatically and added to `virt-manager`.
```
/usr/sbin/create-live-vm.sh
```
*Notice the new icon under QEMU/KVM: this is the new virtual machine that has just been created. Go to the section to learn how to interact with it.*
![post-install-conf-2.png](/assets/post-launch/post-install-conf-2.png)
## Access your virtual machine display

View File

@@ -63,10 +63,7 @@ wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/dishes/virtual
> Please verify the content of the script if you intent to use this virtual machine in production, for instance by using the following command `cat virtual-desktop.cfg`
{.is-info}
> If using a custom kickstart script, make sure it includes the `repo` information
{.is-warning}
* Deploy a stripped down desktop based on GNOME Shell using the local kickstart file previously downloaded
* Deploy a stripped-down desktop based on GNOME Shell using the local kickstart file previously downloaded
```
virt-install \
@@ -95,108 +92,10 @@ virt-install \
--input type=tablet,bus=virtio \
--rng /dev/urandom,model=virtio \
--disk path=/var/lib/libvirt/images/virtual-desktop.img,format=raw,bus=virtio,cache=writeback,size=10 \
--location=https://download.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/ \
--location=https://download.fedoraproject.org/pub/fedora/linux/releases/38/Everything/x86_64/os/ \
--initrd-inject virtual-desktop.cfg --extra-args "inst.ks=file:/virtual-desktop.cfg"
```
### Local deployment without installation
* The idea here is to define a virtual machine and use the `netboot.xyz.iso` as a way to boot into an installer.
```
virt-install \
--connect qemu:///system \
--os-variant detect=off \
--virt-type kvm \
--arch x86_64 \
--machine q35 \
--name virtual-desktop \
--boot uefi \
--cpu host-model,topology.sockets=1,topology.cores=2,topology.threads=1 \
--vcpus 2 \
--memory 4096 \
--video virtio \
--graphics spice,listen=none \
--channel spicevmc \
--channel unix,target.type=virtio,target.name=org.qemu.guest_agent.0 \
--autoconsole none \
--console pty,target.type=virtio \
--sound none \
--network type=default,model=virtio \
--controller type=virtio-serial \
--controller type=usb,model=none \
--controller type=scsi,model=virtio-scsi \
--input type=keyboard,bus=virtio \
--input type=tablet,bus=virtio \
--rng /dev/urandom,model=virtio \
--disk none \
--cdrom=/var/lib/libvirt/iso/netboot.xyz.iso \
--install no_install=yes
```
## Automated installation using an ISO file and a local kickstart file
> **Warning**: doesn't work as intended. The kickstart file won't have to be modified to include the `cdrom` option and the ISO would have to include the necessary packages.
{.is-danger}
* Use the following `wget` command to fetch the official Fedora Server ISO file and to put it in the current working directory
```
wget https://download.fedoraproject.org/pub/fedora/linux/releases/35/Server/x86_64/iso/Fedora-Server-dvd-x86_64-35-1.2.iso
```
> Please [verify your download](https://getfedora.org/en/security/) if you intent to use this virtual machine in production
{.is-info}
Move the file to `/var/lib/libvirt/iso`:
```
mv Fedora-Server-dvd-x86_64-35-1.2.iso /var/lib/libvirt/iso
```
* Use the following `wget` command to fetch a standalone kickstart file made to deploy a stripped down desktop based on GNOME Shell, and put it in the working directory
```
wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/dishes/virtual-desktop.cfg
```
> Please verify the content of the script if you intent to use this virtual machine in production, for instance by using the following command `cat virtual-desktop.cfg`
{.is-info}
> If you use a custom kickstart script, make sure it does include the `cdrom` option.
{.is-warning}
* Deploy a UEFI-based machine with Fedora Server using the relative path of the local kickstart file
```
virt-install \
--connect qemu:///system \
--os-variant detect=off \
--virt-type kvm \
--arch x86_64 \
--machine q35 \
--name virtual-desktop-cdrom \
--boot uefi \
--cpu host-model,topology.sockets=1,topology.cores=2,topology.threads=1 \
--vcpus 2 \
--memory 4096 \
--video virtio \
--graphics spice,listen=none \
--channel spicevmc \
--channel unix,target.type=virtio,target.name=org.qemu.guest_agent.0 \
--autoconsole none \
--console pty,target.type=virtio \
--sound none \
--network type=default,model=virtio \
--controller type=virtio-serial \
--controller type=usb,model=none \
--controller type=scsi,model=virtio-scsi \
--input type=keyboard,bus=virtio \
--input type=tablet,bus=virtio \
--rng /dev/urandom,model=virtio \
--disk path=~/.local/share/libvirt/images/virtual-phyllome-desktop-cdrom.img,format=raw,bus=virtio,cache=writeback,size=10 \
--location=/tmp/Fedora-Everything-netinst-x86_64-35-1.2.iso \
--initrd-inject virtual-desktop-cdrom.cfg --extra-args "inst.ks=file:/virtual-phyllome-desktop-cdrom.cfg"
```
---
*[**Go to parent page**](https://wiki.phyllo.me/)*