Tropp
Tropp

Reputation: 33

Virt-manager, GPU passthrough "Preparing host device" freeze

I'm trying to do a macos vm with gpu passthrough with virt-manager, but everytime I run my vm with my GPU, libvirtd totally freeze.

If anyone got an idea about this topic, that could be nice :)

I followed this tutorial : https://www.youtube.com/watch?v=eTX10QlFJ6c

I cannot restart libvirtd service, access to qemu/kvm connection etc... I set in virt-manager my gpu via pci passthrough, my bios rom, set my keyboard and mouse

When I start my vm, nothing happen except in logs

sudo tail -f /var/log/libvirt/libvirtd.log

2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6697 : Create domain masterKey
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6701 : Setting up storage
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6705 : Setting up host devices
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6709 : Prepare chardev source backends
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6713 : Prepare device secrets
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6717 : Prepare bios/uefi paths
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6723 : Preparing external devices
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6728 : Aligning guest memory
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6742 : Preparing monitor state
2022-12-13 21:24:09.901+0000: 616: debug : qemuProcessPrepareDomain:6751 : Updating guest CPU definition
2022-12-13 21:24:09.923+0000: 616: debug : qemuProcessPrepareHost:7184 : Preparing network devices
2022-12-13 21:24:09.923+0000: 616: debug : qemuProcessPrepareHost:7189 : Preparing host devices

And then get stuck here, nothing else happen

Upvotes: 3

Views: 630

Answers (1)

Samuli Latvala
Samuli Latvala

Reputation: 1

Exactly same here as OP.

  1. followed each step on video tutorial + description
  2. launching vm result partial failure of system not being able to shutdown / reboot but forced to power down.

Running with amd cpu with nvidia gpu.

edit: Actually if you follow instructions exactly. Setup hook ups (part 9) doesn't actually land scripts correctly.

Also I found this helpful Reddit post.

vfio-startup.sh:

#!/bin/bash
set -x
systemctl stop display-manager
modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia
modprobe vfio-pci

the vfio-teardown.sh:

#!/bin/bash
set -x
modprobe -r vfio-pci
modprobe nvidia_drm
modprobe nvidia_modeset
modprobe nvidia_uvm
modprobe nvidia
systemctl start display-manager.service

Upvotes: 0

Related Questions