Skip to content

Commit

Permalink
fix(just): add libvirt package to setup-virtualization (ublue-os#1549)
Browse files Browse the repository at this point in the history
* fix: add libvirt package into install
upstream removed libvirt as a dependency for virt-manager

* chore: update information text about VFIO
  • Loading branch information
HikariKnight authored Aug 26, 2024
1 parent 5400fed commit 1cb8555
Showing 1 changed file with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ setup-virtualization ACTION="":
if [[ "${OPTION,,}" =~ (^enable[[:space:]]virtualization|virt-on) ]]; then
if ! rpm -q virt-manager | grep -P "^virt-manager-" 1>/dev/null; then
echo "Installing QEMU and virt-manager..."
rpm-ostree install -y virt-manager edk2-ovmf qemu
rpm-ostree install -y virt-manager edk2-ovmf qemu libvirt
rpm-ostree kargs \
--append-if-missing="kvm.ignore_msrs=1" \
--append-if-missing="kvm.report_ignored_msrs=0"
Expand All @@ -61,7 +61,7 @@ setup-virtualization ACTION="":
sudo systemctl disable --now bazzite-libvirtd-setup.service 2> /dev/null
fi
echo "Removing QEMU and virt-manager..."
rpm-ostree remove -y virt-manager edk2-ovmf qemu
rpm-ostree remove -y virt-manager edk2-ovmf qemu libvirt
rpm-ostree kargs \
--delete-if-present="kvm.ignore_msrs=1" \
--delete-if-present="kvm.report_ignored_msrs=0"
Expand Down Expand Up @@ -95,9 +95,18 @@ setup-virtualization ACTION="":
--append-if-missing="vfio_pci.disable_vga=1"
echo "VFIO will be enabled on next boot, make sure you enable IOMMU, VT-d or AMD-v in your BIOS!"
echo "Please understand that since this is such a niche use case, support will be very limited!"
echo "To add your unused/second GPU device ids to the vfio driver by running"
echo ""
echo "${b}Systems with multiple GPUs${n}"
echo "Bind your unused/second GPU device ids to the vfio driver by running"
echo 'rpm-ostree kargs --append-if-missing="vfio-pci.ids=xxxx:yyyy,xxxx:yyzz"'
echo "NOTE: Your second GPU will not be usable by the host after you do this!"
echo "You will require a $(Urllink "https://www.amazon.com/s?k=hdmi+displayport+dummy+plug" "Dummy HDMI/DisplayPort plug (Ghost Adapter)") or hook the GPU"
echo "to a separate monitor input in order to turn the GPU on when starting the VM."
echo "NOTE: Your second GPU will not be usable by the host after you bind it to the vfio driver!"
echo ""
echo "${b}Systems with 1 GPU${n}"
echo "Once rebooted you can continue setting up whatever scripts and hooks you need"
echo "to get Single GPU passthrough working, however ${u}you will be on your own${n}."
echo "${b}Do not ask for support for setting up Single GPU Passthrough, we can not help you!${n}"
fi
fi
elif [[ "${OPTION,,}" =~ (^disable[[:space:]]vfio|vfio-off) ]]; then
Expand Down

0 comments on commit 1cb8555

Please sign in to comment.