Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #231055 > unrolled thread
| Started by | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| First post | 2021-01-24 23:00 +0100 |
| Last post | 2021-01-27 09:40 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.debian.user
audio support in libvirt with qemu/kvm Rainer Dorsch <ml@bokomoko.de> - 2021-01-24 23:00 +0100
Re: audio support in libvirt with qemu/kvm Linux-Fan <Ma_Sys.ma@web.de> - 2021-01-24 23:10 +0100
Re: audio support in libvirt with qemu/kvm Rainer Dorsch <ml@bokomoko.de> - 2021-01-25 12:50 +0100
Re: audio support in libvirt with qemu/kvm Linux-Fan <Ma_Sys.ma@web.de> - 2021-01-25 13:30 +0100
Re: audio support in libvirt with qemu/kvm Rainer Dorsch <ml@bokomoko.de> - 2021-01-25 20:50 +0100
Re: audio support in libvirt with qemu/kvm Christian Ehrhardt <christian.ehrhardt@canonical.com> - 2021-01-27 09:40 +0100
| From | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| Date | 2021-01-24 23:00 +0100 |
| Subject | audio support in libvirt with qemu/kvm |
| Message-ID | <BAVAm-86q-9@gated-at.bofh.it> |
Hi, I created a virtual machine using libvirt with qemu/kvm. To make it simple, I installed a Debian 10 guest on a Debian 10 host. I am wondering, if it is possible to access (pulse-)audio from the guest. Any hint or advice is welcome. Thanks Rainer -- Rainer Dorsch http://bokomoko.de/
[toc] | [next] | [standalone]
| From | Linux-Fan <Ma_Sys.ma@web.de> |
|---|---|
| Date | 2021-01-24 23:10 +0100 |
| Message-ID | <BAVK1-8q4-3@gated-at.bofh.it> |
| In reply to | #231055 |
[Multipart message — attachments visible in raw view] — view raw
Rainer Dorsch writes:
> Hi,
>
> I created a virtual machine using libvirt with qemu/kvm. To make it simple, I
> installed a Debian 10 guest on a Debian 10 host. I am wondering, if it is
> possible to access (pulse-)audio from the guest.
>
> Any hint or advice is welcome.
For me it works out of the box in the way that I can hear sound played
inside the VM and the VM can record from the microphone attached to the PC.
In virt-manager it appears as "Sound ich9" device added to the respective
VMs. Host and guest both use Pulseaudio. In case you do not use GUI, it
might be enough to add the following device in the VM's XML:
<sound model='ich9'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
</sound>
I do not know if it can be made to work in a way that just a single pulse
audio server is running -- in my configuration, the guest and host both have
their respective pulse audio instances although the sound itself passes from
the one to the other wihtout explicit configuration :)
HTH
Linux-Fan
öö
[...]
[toc] | [prev] | [next] | [standalone]
| From | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| Date | 2021-01-25 12:50 +0100 |
| Message-ID | <BB8xz-8ve-11@gated-at.bofh.it> |
| In reply to | #231056 |
Am Sonntag, 24. Januar 2021, 23:04:54 CET schrieb Linux-Fan: > Rainer Dorsch writes: > > Hi, > > > > I created a virtual machine using libvirt with qemu/kvm. To make it > > simple, I installed a Debian 10 guest on a Debian 10 host. I am > > wondering, if it is possible to access (pulse-)audio from the guest. > > > > Any hint or advice is welcome. > > For me it works out of the box in the way that I can hear sound played > inside the VM and the VM can record from the microphone attached to the PC. > > In virt-manager it appears as "Sound ich9" device added to the respective > VMs. Host and guest both use Pulseaudio. In case you do not use GUI, it > might be enough to add the following device in the VM's XML: > > <sound model='ich9'> > <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' > function='0x0'/> </sound> > > I do not know if it can be made to work in a way that just a single pulse > audio server is running -- in my configuration, the guest and host both have > their respective pulse audio instances although the sound itself passes > from the one to the other wihtout explicit configuration :) > Thanks for the quick reply. I tried again and it seems sound works now :-) I also used virt-manager, but I did not find any sound devices in there. Are you using Debian 10? virt-manager from stable or stable-backports? Where do you see the "Sound ich9" device? Thanks Rainer -- Rainer Dorsch http://bokomoko.de/
[toc] | [prev] | [next] | [standalone]
| From | Linux-Fan <Ma_Sys.ma@web.de> |
|---|---|
| Date | 2021-01-25 13:30 +0100 |
| Message-ID | <BB9ai-yv-5@gated-at.bofh.it> |
| In reply to | #231087 |
[Multipart message — attachments visible in raw view] — view raw
Rainer Dorsch writes: > Am Sonntag, 24. Januar 2021, 23:04:54 CET schrieb Linux-Fan: > > Rainer Dorsch writes: > > > Hi, > > > > > > I created a virtual machine using libvirt with qemu/kvm. To make it > > > simple, I installed a Debian 10 guest on a Debian 10 host. I am > > > wondering, if it is possible to access (pulse-)audio from the guest. [...] > Thanks for the quick reply. I tried again and it seems sound works now :-) > > I also used virt-manager, but I did not find any sound devices in there. Are > you using Debian 10? virt-manager from stable or stable-backports? Where do > you see the "Sound ich9" device? [...] Open the VM in virt-manager, go to View > Details and then it either appears in the left pane (see attached screenshot if it makes it to the list...) or you can click on "Add Hardware" at the bottom left corner and then chose "Sound" from the left panel to add a virtual sound device. I am using Debian 10 stable "Help > About" says version 2.0.0 of virt- manager. Debian package virt-manager is at version 1:2.0.0-3. Various screenshots can be found on my KVM+virt-manager page at: https://masysma.lima-city.de/37/how_to_transition_from_virtualbox_to_kvm.xhtml HTH Linux-Fan öö
[toc] | [prev] | [next] | [standalone]
| From | Rainer Dorsch <ml@bokomoko.de> |
|---|---|
| Date | 2021-01-25 20:50 +0100 |
| Message-ID | <BBg25-4Du-3@gated-at.bofh.it> |
| In reply to | #231089 |
Am Montag, 25. Januar 2021, 13:28:30 CET schrieb Linux-Fan: > Various screenshots can be found on my KVM+virt-manager page at: > https://masysma.lima-city.de/37/how_to_transition_from_virtualbox_to_kvm.xht > ml I found it, thanks for sharing the URL, very useful. Rainer -- Rainer Dorsch http://bokomoko.de/
[toc] | [prev] | [next] | [standalone]
| From | Christian Ehrhardt <christian.ehrhardt@canonical.com> |
|---|---|
| Date | 2021-01-27 09:40 +0100 |
| Message-ID | <BBOwO-2mG-13@gated-at.bofh.it> |
| In reply to | #231055 |
On Tue, Jan 26, 2021 at 4:07 PM Rainer Dorsch <ml@bokomoko.de> wrote: > > Hi, > > I created a virtual machine using libvirt with qemu/kvm. To make it simple, I > installed a Debian 10 guest on a Debian 10 host. I am wondering, if it is > possible to access (pulse-)audio from the guest. If you have - the optional but usually installed - package qemu-system-gui then qemu is generally able to produce sound. You said you drive your guest via libvirt, depending on your front end to this it might just not have a sound device [1] configured. You can usually add a sound device and select the type it emulates, something like the following should do it: <sound model="ich9"> You can then check these things (in order) 1. is the sound device in the guest seen and initialized? 2. play some continuous sound/music from the guest - is there any error? 3. check hosts pavucontrol if you need to assign the qemu process to a particular output? [1]: https://libvirt.org/formatdomain.html#sound-devices > Any hint or advice is welcome. > > Thanks > Rainer > -- > Rainer Dorsch > http://bokomoko.de/ > > > > _______________________________________________ > pkg-qemu-devel mailing list > pkg-qemu-devel@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-qemu-devel -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web