There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Help setting up a minimal fast QEMU KVM Tool

I used Virtualbox first, switched to GNOME Boxes, then to Virt-manager as it was said to be better.

But in the end, at least on my Laptop, it sucks extremely. I have no OpenGL and extreme lag. Saw a Video about setting up QEMU, followed instructions and the result was very fast, but the viewer was not good.

I am using my existing virt-manager images, read them and display as a kdialog. There I choose it, the choice gets piped into the qemu command. Afterwards the display opens.

Either I have spice working but no OpenGL, or I have VNC and OpenGL but its very slow anyways.

Fedora KDE (Kinoite), Amd graphics card laptop

Edit: some more details.

I want a fast, wayland-native client. Some AI told me spice-gtk is the only one there, which would be not that nice on KDE as it would pull all the GTK dependencies.

Can you run all that stuff in a Podman container? I would just use a Fedora39 Distrobox then.

I used this script before:


<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Define the directory where qcow2 images are stored
</span><span style="color:#323232;">IMAGE_DIR="/var/lib/libvirt/images/"
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Get a list of qcow2 images in the directory
</span><span style="color:#323232;">IMAGE_LIST=$(pkexec sudo ls "$IMAGE_DIR" | grep -E '.qcow2$')
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Create an array for the menu items
</span><span style="color:#323232;">menu_items=()
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Populate the array with tag-item pairs
</span><span style="color:#323232;">for image in ${IMAGE_LIST[@]}; do
</span><span style="color:#323232;">    menu_items+=("$image" "${image%.qcow2}")
</span><span style="color:#323232;">done
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Use kdialog to display a menu and get the selected image
</span><span style="color:#323232;">selected_image=$(kdialog --menu "Select a qcow2 image:" "${menu_items[@]}" --title "QEMU Launcher")
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Check if the user selected an image
</span><span style="color:#323232;">if [ -n "$selected_image" ]; then
</span><span style="color:#323232;">    # QEMU with Virt-Viewer
</span><span style="color:#323232;">    pkexec sudo qemu-system-x86_64 -enable-kvm -cpu host -smp 4 -m 8192 -device virtio-gpu-gl  -display spice-app,gl=on -drive file=${IMAGE_DIR}${selected_image},format=qcow2
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">else
</span><span style="color:#323232;">    # User canceled or closed the dialog
</span><span style="color:#323232;">    echo "Operation canceled by user."
</span><span style="color:#323232;">fi
</span><span style="color:#323232;">
</span><span style="color:#323232;"># Use remote-viewer with title
</span><span style="color:#323232;">virt-viewer spice+unix:///tmp/.RTN4C2/spice.sock --title "QEMU - ${selected_image%.qcow2}"
</span><span style="color:#323232;"># or this viewer?
</span><span style="color:#323232;"># remote-viewer spice://localhost:5900 --title "QEMU - ${selected_image%.qcow2}"
</span><span style="color:#323232;"># or spice-gtk?
</span>
laenurd ,
@laenurd@lemmy.lemist.de avatar

If your guest OS is Linux, you can use Virgl to get much better OpenGL performance in the VM.

Pantherina OP ,

Already installed that!

Quackdoc ,
@Quackdoc@lemmy.world avatar

what Guest OS are you running? IF it is windows, the opengl driver is still a WIP and hasnt been merged yet IIRC.

I always reccomend using qemu cli, for qemu-cli you can do something like


<span style="color:#323232;">-device virtio-gpu-gl  -display spice-app,gl=on
</span>

or if you are doing remote VMs you can use a remote spice viewer and connect to the port like so


<span style="color:#323232;">-device virtio-gpu-gl  -display egl-headless  -spice port=3001,disable-ticketing
</span>

EDIT: for more reading, you can go through these docs I wrote for bliss. they are oriented more for android but they are still widely applicable docs.blissos.org/…/advanced-qemu-config/

UntouchedWagons ,
@UntouchedWagons@lemmy.ca avatar

Yeah you’re always going to have poor video performance in VMs unless you do stuff like gpu pass through which isn’t practical on a laptop.

Pantherina OP ,

No i meant having any GPU at all. Currently either I cant connect to that VM, or its slow

Helix ,

You need virtio. If you have an internal GPU check out looking-glass.io for maximum performance.

folkrav ,

So with this, you would use your internal GPU for the host OS, you dedicate your powerful GPU to a VM, then you can access it from the host?

gecked ,

Yes

scottmeme ,

Are you a bot or a human?

Quackdoc ,
@Quackdoc@lemmy.world avatar

its a hard sentence to read for sure lol

scottmeme ,

I only asked because they have the bot icon next to their name.

Quackdoc ,
@Quackdoc@lemmy.world avatar

What client do you use? I see no such thing.

scottmeme ,

Jerboa

Quackdoc ,
@Quackdoc@lemmy.world avatar

ah I am using liftoff, maybe it doesn’t support it, just logged into via webpage and I do now

Helix ,

Yes.

Pantherina OP ,

I have a Laptop with AMD Vega graphics, kinda dedicated and virtualization enabled

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines