You are not logged in.

#1 2023-05-06 22:57:23

iFlxy
Member
Registered: 2023-01-07
Posts: 20

Single GPU passthrough issues

I'm a new Arch Linux user who is trying to set up single GPU passthrough for a virtual machine, but I'm encountering an issue. When I try to start the virtual machine, I receive an "internal error: client socket is closed" and "internal error: client socket is closed" messages when using "virt-manager --debug".
I've checked my configuration files and made sure that I've properly configured my kernel parameters, installed the necessary packages, and made the qemu begin and end scripts executable. However, I'm still encountering this error.
I would greatly appreciate any advice or suggestions on how to resolve this issue. Have any other users encountered this error before, and if so, how did you resolve it? Are there any additional troubleshooting steps that I should take?

Virt-manager logs: https://pastebin.com/CRedse95
Tutorial I'm following: https://www.youtube.com/watch?v=eTWf5D092VY

Thank you in advance for your help.

Offline

#2 2023-05-07 06:40:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: Single GPU passthrough issues

Are there any additional troubleshooting steps that I should take?

Forget everythign you saw win that "tutorial" and visit https://wiki.archlinux.org/title/PCI_pa … h_via_OVMF

Offline

#3 2023-05-07 08:46:49

iFlxy
Member
Registered: 2023-01-07
Posts: 20

Re: Single GPU passthrough issues

Thanks for your help, but I didn't find the Arch wiki helpful. I'm trying to pass through a single graphics card that disconnects from host when the VM starts, then connects to the VM and vice versa (connects to host when the VM stops). Did I miss something that was written on the wiki? Again, thanks in advance.

Offline

#4 2023-05-07 08:57:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: Single GPU passthrough issues

You mean there's inly one gpu available and you want to use that as the hosts vga and pass it through to a vm at the same time?
That's not possible, you'll have to run the host headless (what likely defeats the purpose)

Otherwise please describe the setup and what you're trying to achieve.

Offline

#5 2023-05-07 13:06:20

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,142

Re: Single GPU passthrough issues

In theory it is possible to let vfio dynamically unbind the gpu from the host and bind it to a VM upon start of the VM and reverse that when the VM shuts down.

In practice there are reports of some people who managed to get it to work.
A quick ddg search lead to https://gitlab.com/Karuri/vfio  which does seem to do a decent job of explaining how they did it.

Last edited by Lone_Wolf (2023-05-07 13:06:46)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2023-05-07 14:12:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: Single GPU passthrough issues

It's possible, but

The obvious downside of this is that you can't use the host OS (at least graphically) while the guest is running. It is therefore highly recommended that you set up SSH access to your host OS just in case of issues.

seth wrote:

you'll have to run the host headless (what likely defeats the purpose)

And

# Stop your display manager. If you're on kde it'll be sddm.service. Gnome users should use 'killall gdm-x-session' instead
systemctl stop lightdm.service

Unless the host needs to continue for some server operations, you save one reboot (but lose your GUI session)
If this is a notebook, it'll probably not perform some server actions and otherwise you could just plug a second GPU.

It's possible, but the reason to do it currently escapes me.

nb. that the github example is nvidia-specific.

Offline

#7 2023-05-07 18:34:41

iFlxy
Member
Registered: 2023-01-07
Posts: 20

Re: Single GPU passthrough issues

I managed to fix the issue by changing the VM name to "win10-vm1-singlegpu".

seth wrote:

you save one reboot

For me at least, one reboot is a lot.

The post can be marked as solved.

Last edited by iFlxy (2023-05-07 18:34:58)

Offline

#8 2023-05-07 19:18:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,337

Re: Single GPU passthrough issues

Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB