this post was submitted on 20 Oct 2023
28 points (96.7% liked)

Linux

45551 readers
954 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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:

#!/bin/bash

# Define the directory where qcow2 images are stored
IMAGE_DIR="/var/lib/libvirt/images/"

# Get a list of qcow2 images in the directory
IMAGE_LIST=$(pkexec sudo ls "$IMAGE_DIR" | grep -E '\.qcow2$')

# Create an array for the menu items
menu_items=()

# Populate the array with tag-item pairs
for image in ${IMAGE_LIST[@]}; do
    menu_items+=("$image" "${image%.qcow2}")
done

# Use kdialog to display a menu and get the selected image
selected_image=$(kdialog --menu "Select a qcow2 image:" "${menu_items[@]}" --title "QEMU Launcher")

# Check if the user selected an image
if [ -n "$selected_image" ]; then
    # QEMU with Virt-Viewer
    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


else
    # User canceled or closed the dialog
    echo "Operation canceled by user."
fi

# Use remote-viewer with title
virt-viewer spice+unix:///tmp/.RTN4C2/spice.sock --title "QEMU - ${selected_image%.qcow2}"
# or this viewer?
# remote-viewer spice://localhost:5900 --title "QEMU - ${selected_image%.qcow2}"
# or spice-gtk?
all 16 comments
sorted by: hot top controversial new old
[–] [email protected] 13 points 8 months ago (3 children)

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

[–] [email protected] 1 points 8 months ago

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

[–] [email protected] 0 points 8 months ago (2 children)
[–] [email protected] 4 points 8 months ago
[–] Quackdoc 0 points 8 months ago (1 children)

its a hard sentence to read for sure lol

[–] [email protected] 1 points 8 months ago (1 children)

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

[–] Quackdoc 1 points 8 months ago (1 children)

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

[–] [email protected] 1 points 8 months ago (1 children)
[–] Quackdoc 1 points 8 months ago

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

[–] [email protected] 10 points 8 months ago (1 children)

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.

[–] [email protected] 1 points 8 months ago

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

[–] [email protected] 8 points 8 months ago (1 children)

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

[–] [email protected] 2 points 8 months ago

Already installed that!

[–] Quackdoc 7 points 8 months ago* (last edited 8 months ago)

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

-device virtio-gpu-gl  -display spice-app,gl=on

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

-device virtio-gpu-gl  -display egl-headless  -spice port=3001,disable-ticketing

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 https://docs.blissos.org/installation/install-in-a-virtual-machine/advanced-qemu-config/