darmon77
(Darmon)
November 5, 2020, 5:59am
1
Hello all guys!
I have a vm instance with windows 10 and I am trying to configure the audio.
I am very satisfied with the performance of LXD on virtual machines, an excellent job from the development team.
I imagine that the variable to mount intel HD audio is equal to -soundhw hda in the yaml file of the profile of my vm instance.
I don’t know the correct syntax to mount -soundhw hda in my virtual machine, I hope you can help me.
My settings
Cita
config:
raw.apparmor: /home/** rwk,
raw.qemu: -drive file=/home/dennis/VMLXD/win10.iso,index=0,media=cdrom,if=ide -drive file=/home/dennis/VMLXD/virtio-win-0.1.185.iso,index=1,media=cdrom,if=ide
description: “”
devices:
eth0:
name: eth0
nictype: bridged
parent: lxd0
type: nic
name: win10
used_by:
Cita
stgraber
(Stéphane Graber)
November 5, 2020, 5:39pm
2
Adding -soundhw hda
to raw.qemu
should work.
darmon77
(Darmon)
November 5, 2020, 7:22pm
3
try to use that variable, but it reports the following error
Cita
Error: Failed to run: forklimits limit=memlock:unlimited:unlimited – /usr/bin/qemu-system-x86_64 -S -name win10 -uuid 2bad982f-b0ea-4683-bdea-7f66552b0290 -daemonize -cpu host -nographic -serial chardev:console -nodefaults -no-reboot -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=deny,resourcecontrol=deny -readconfig /var/log/lxd/win10/qemu.conf -pidfile /var/log/lxd/win10/qemu.pid -D /var/log/lxd/win10/qemu.log -chroot /var/lib/lxd/virtual-machines/win10 -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas nobody -drive file=/home/dennis/VMLXD/win10.iso,index=0,media=cdrom,if=ide -drive file=/home/dennis/VMLXD/virtio-win-0.1.185.iso,index=1,media=cdrom,if=ide,soundhw=hda: char device redirected to /dev/pts/7 (label console)
: Process exited with a non-zero value
simos
(Simos Xenitellis)
November 5, 2020, 8:03pm
4
darmon77:
-drive file=/home/dennis/VMLXD/virtio-win-0.1.185.iso,index=1,media=cdrom,if=ide,soundhw=hda
Looks like you attached the soundhw=hda
option to the virtual CD drive. I believe it should be separate.
darmon77
(Darmon)
November 5, 2020, 8:42pm
5
stgraber:
-soundhw hda
I tried all options.
raw.qemu: soundhw=hda,
raw.qemu: -soundhw=hda
raw.qemu: -soundhw hda,
raw.qemu: soundhw hda
where will i be failing?
simos
(Simos Xenitellis)
November 5, 2020, 9:09pm
6
darmon77:
raw.qemu: -drive file=/home/dennis/VMLXD/win10.iso,index=0,media=cdrom,if=ide -drive file=/home/dennis/VMLXD/virtio-win-0.1.185.iso,index=1,media=cdrom,if=ide
Your existing raw.qemu
has two -drive directives, separated by spaces. You would need to add a new directive, separated with spaces.
raw.qemu: -drive file=/home/dennis/VMLXD/win10.iso,index=0,media=cdrom,if=ide -drive file=/home/dennis/VMLXD/virtio-win-0.1.185.iso,index=1,media=cdrom,if=ide -soundhw hda
darmon77
(Darmon)
November 5, 2020, 9:33pm
7
which of all these variables is correct?
raw.qemu: -device soundhw=hda
raw.qemu: soundhw=hda
raw.qemu: -device intel-hda
I have removed the options they have from the Live CD, I only have the audio montage
My setup
config:
raw.apparmor: /home/** rwk,
raw.qemu: -device soundhw=hda
description: “”
devices:
eth0:
name: eth0
nictype: bridged
parent: lxd0
type: nic
name: win10
used_by:
stgraber
(Stéphane Graber)
November 5, 2020, 9:35pm
8
stgraber@castiana:~$ lxc config set win10 raw.qemu -- "-device intel-hda -device hda-duplex"
stgraber@castiana:~$ lxc start win10
1 Like
darmon77
(Darmon)
November 5, 2020, 9:45pm
9
Thank you very much for your patience and it is already solved and enjoy
Aravindan
(Aravindan)
March 15, 2024, 12:16pm
10
Hi, Thank you for the solution. It does solve the problem. However getting the below error frequently and the audio stops playing in the VM.
dev/shm/jack_db-0/__db.001: No such file or directory
(remote-viewer:20659): GSpice-WARNING **: 23:11:29.077: playback: ignoring volume change on audiosink
(remote-viewer:20659): GSpice-WARNING **: 23:11:29.077: playback: ignoring mute change on audiosink
Any assistance would be appreciated! Thank you!