phyllomeos/post-first-startup-scripts/virtualization-tweaks-root-needed.sh

9 lines
527 B
Bash
Raw Normal View History

2021-11-08 16:08:02 +00:00
#!/bin/bash
2022-01-24 14:38:44 +00:00
# usermod -a -G libvirt kvm $(whoami) # add current user to the libvirt and kvm groups
2021-11-08 16:08:02 +00:00
# virsh commands fail in a kickstart environment (chroot or not it seems). would need to fetch a script and execute post-launch with a delay, for example using a systemd unit
virsh pool-define-as iso dir - - - - /var/lib/libvirt/iso/ # Make libvirt aware of this new directory by creating a so-called 'pool'.
virsh pool-build iso # Build the pool
virsh pool-start iso # Start it
virsh pool-autostart iso # Set-it to autostart