Passing audio makes VM unbootable

Hello everyone,

I just can’t get audio to work for my VM. I followed the instructions from here and I always get this error logs (/var/log/libvirt/libvirt.log)

2022-12-23 11:23:14.401+0000: 5846: info : libvirt version: 8.10.0
2022-12-23 11:23:14.401+0000: 5846: error : virNetSocketReadWire:1791 : End of file while reading data: Input/output error
2022-12-23 11:23:24.918+0000: 6112: error : qemuMonitorIORead:423 : Unable to read from monitor: Connection reset by peer
2022-12-23 11:23:24.918+0000: 6112: error : qemuProcessReportLogError:1959 : internal error: qemu unexpectedly closed the monitor: pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver

This is what I added to my XML

    <sound model='ich9'>
      <codec type='micro'/>
      <audio id='1'/>
    <audio id='1' type='pulseaudio' serverName='/run/user/1000/pulse/native'/>

If I remove this part, everything works fine. Any ideas? My Host Manjaro itself has audio.

From that wiki:

This requires PulseAudio to be running on the host system.

… if it works, why would you add something and then try to find out why it doesn’t work anymore after you did add it?

The thing is that I don’t have audio. But I don’t understand why the VM stops booting after trying to do audio passthrough.
I thought Manjaro is already running on PulseAudio or am I wrong?

I cannot help with pass through - not at all.

You could indeed be wrong.
My machine - not Manjaro - is running PipeWire instead of PulseAudio.

inxi -A
should tell you

This is what I get with inxi -A

  Device-1: Creative Labs CA0108/CA10300 [Sound Blaster Audigy Series]
    driver: snd_emu10k1
  Device-2: NVIDIA GP104 High Definition Audio driver: snd_hda_intel
  Device-3: AMD Starship/Matisse HD Audio driver: snd_hda_intel
  Device-4: AVerMedia USB Device type: USB driver: snd-usb-audio,uvcvideo
  Sound API: ALSA v: k5.15.84-1-MANJARO running: yes
  Sound Server-1: PulseAudio v: 16.1 running: yes
  Sound Server-2: PipeWire v: 0.3.63 running: yes

so you have both active - two sound servers - not sure whether that is good or not
I think: not.