mirror of
https://github.com/churchers/vm-bhyve.git
synced 2025-12-11 09:20:17 +01:00
Add HD Audio device to guest via config
This commit is contained in:
11
lib/vm-run
11
lib/vm-run
@@ -192,6 +192,7 @@ vm::run(){
|
||||
vm::bhyve_device_passthru
|
||||
vm::bhyve_device_fbuf
|
||||
vm::bhyve_device_mouse
|
||||
vm::bhyve_device_sound
|
||||
vm::bhyve_device_console
|
||||
|
||||
vm::lock
|
||||
@@ -718,6 +719,16 @@ vm::bhyve_device_mouse(){
|
||||
fi
|
||||
}
|
||||
|
||||
vm::bhyve_device_sound(){
|
||||
local _play
|
||||
config::get "_play" "sound_play" "/dev/dsp0"
|
||||
|
||||
if config::yesno "sound"; then
|
||||
_devices="${_devices} -s ${_slot}:0,hda,play=${_play}"
|
||||
_slot=$((_slot + 1))
|
||||
fi
|
||||
}
|
||||
|
||||
# add virtio_console devices to the guest
|
||||
#
|
||||
# @modifies _devices _slot
|
||||
|
||||
9
vm.8
9
vm.8
@@ -1457,6 +1457,15 @@ Set this option to
|
||||
in order to provide an XHCI mouse device to the guest.
|
||||
This tracks much better than the default PS2 mouse in VNC settings, although
|
||||
this mouse may not supported by older guests.
|
||||
.It sound
|
||||
Set this option to
|
||||
.Sy yes
|
||||
in order to provide HD Audio Emulation to the guest. Please see
|
||||
.Sy bhyve(8)
|
||||
for details.
|
||||
.It sound_play
|
||||
Set this to the desired audio output device of the host to the guest. Defaults to
|
||||
.Sy '/dev/dsp0'
|
||||
.It virt_consoleX
|
||||
Allows the creation of up to 16 virtio-console devices in the guest. The value
|
||||
to this option can be
|
||||
|
||||
Reference in New Issue
Block a user