When starting the KVM (that was working fine in ubuntu 19.04) I am getting the following error:
Error starting domain: internal error: qemu unexpectedly closed the monitor: pulseaudio: pa_context_connect() failed pulseaudio: Reason: Connection refused pulseaudio: Failed to initialize PA contextaudio: warning: Using timer based audio emulation
Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs) File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
callback(*args, **kwargs) File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn
ret = fn(self, *args, **kwargs) File "/usr/share/virt-manager/virtManager/object/domain.py", line 1279, in startup
self._backend.create() File "/usr/lib/python3/dist-packages/libvirt.py", line 1080, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self) libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: pulseaudio: pa_context_connect() failed pulseaudio: Reason: Connection refused pulseaudio: Failed to initialize PA contextaudio: warning: Using timer based audio emulation
I have made the changes to the config file. I have added the following lines to reflect the change from qemu 3.1 to 4.0
<qemu:commandline>
<qemu:env name="QEMU_AUDIO_DRV" value="pa"/>
<qemu:env name="QEMU_PA_SERVER" value="/run/user/1000/pulse/native"/>
</qemu:commandline>
If I remove these lines I cannot passthrough sound to pulseaudio.
yes the kvm audio user is me.
Any help will be appreciated. Is this a bug or a setup issue. my guest is windows 10 (1903)