phyllomeos/post-first-startup-scripts/deploy-minimal-workstation-session.sh

35 lines
1.4 KiB
Bash
Raw Normal View History

2022-01-24 14:38:44 +00:00
#!/bin/bash
# Deploy a virtual machine with `virt-install` and automatically install a minimal GNOME Shell desktop environment on a 10G disk.
# GPU and CPU agnostic configuration.
virt-install \
2022-02-13 18:04:13 +00:00
--connect qemu:///session \
--metadata description="SDL with OpenGL. Minimal GNOME Shell environment. Based on Fedora Server 35" \
2022-01-24 14:38:44 +00:00
--os-variant detect=off \
--virt-type kvm \
--arch x86_64 \
--machine q35 \
2022-02-13 18:04:13 +00:00
--name virtual-destkop-session \
2022-01-24 14:38:44 +00:00
--boot uefi \
2022-02-13 18:04:13 +00:00
--cpu host-model,topology.sockets=1,topology.cores=1,topology.threads=1 \
--vcpus 1 \
2022-01-24 14:38:44 +00:00
--memory 2048 \
--video virtio \
2022-02-13 18:04:13 +00:00
--graphics sdl,gl.enable=yes \
2022-01-24 14:38:44 +00:00
--channel spicevmc \
--channel unix,target.type=virtio,target.name=org.qemu.guest_agent.0 \
--autoconsole none \
--console pty,target.type=virtio \
--sound none \
2022-02-13 18:04:13 +00:00
--network type=user,model=virtio \
2022-01-24 14:38:44 +00:00
--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 \
--memballoon none \
--rng /dev/urandom,model=virtio \
2022-02-13 18:04:13 +00:00
--disk path=~/.local/share/libvirt/images/virtual-desktop-session.img,format=raw,bus=virtio,cache=none,size=10 \
2022-01-24 14:38:44 +00:00
--location=https://download.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/ \
--extra-args="inst.ks=https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/dishes/virtual-desktop.cfg"