Nova libvirt/kvm sound device
Hi! I'd like to have the following configuration added to every guest on a specific host managed by Nova and libvirt/kvm: <sound model='bla'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/> </sound> When I add the device manually to instance xml, it works as intended but the instance configuration gets overwritten on instance stop/start or hard reboot via Nova. What is the currently supported / proper way to add a virtual sound device without having to modify libvirt or Nova code? I would appreciate any advice. Best regards, Zakhar
On Tue, 2022-12-27 at 17:40 +0200, Zakhar Kirpichenko wrote:
Hi!
I'd like to have the following configuration added to every guest on a specific host managed by Nova and libvirt/kvm:
<sound model='bla'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/> </sound>
When I add the device manually to instance xml, it works as intended but the instance configuration gets overwritten on instance stop/start or hard reboot via Nova.
Modifying libvirt's XML behind nova's back is a big no-no. You break the contract between the two. If you wanted audio support, you'd need to add this support to nova itself. This would require a spec, quite a bit of coding, and would not be backported. tbh, it's also hard to see this being prioritized since audio support for cloud-based VMs is a rather unusual request. If you wanted to persue this approach though, feel free to reach out on IRC (#openstack-nova on OFTC) and we can guide you. Stephen
What is the currently supported / proper way to add a virtual sound device without having to modify libvirt or Nova code? I would appreciate any advice.
Best regards, Zakhar
Hi Stephen, Many thanks for your response! I figured that it wasn't a simple task to add sound support to Nova. The reason for having sound support is quite simple though: we'd like to provide sound to VDI instances, which is trivial without Nova. /Z On Tue, 3 Jan 2023 at 16:58, Stephen Finucane <stephenfin@redhat.com> wrote:
Hi!
I'd like to have the following configuration added to every guest on a specific host managed by Nova and libvirt/kvm:
<sound model='bla'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/> </sound>
When I add the device manually to instance xml, it works as intended but
On Tue, 2022-12-27 at 17:40 +0200, Zakhar Kirpichenko wrote: the
instance configuration gets overwritten on instance stop/start or hard reboot via Nova.
Modifying libvirt's XML behind nova's back is a big no-no. You break the contract between the two. If you wanted audio support, you'd need to add this support to nova itself. This would require a spec, quite a bit of coding, and would not be backported. tbh, it's also hard to see this being prioritized since audio support for cloud-based VMs is a rather unusual request. If you wanted to persue this approach though, feel free to reach out on IRC (#openstack-nova on OFTC) and we can guide you.
Stephen
What is the currently supported / proper way to add a virtual sound
device
without having to modify libvirt or Nova code? I would appreciate any advice.
Best regards, Zakhar
participants (2)
-
Stephen Finucane
-
Zakhar Kirpichenko