diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-12-30 20:07:42 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-12-30 20:07:42 -0200 |
commit | 48b12bda534020898c80553a610796a3b6a33a0d (patch) | |
tree | ec1df4244e2cebd1690ab101db46fe34297ef577 | |
parent | 18493f694b9e61f52af7a4149aba2cb5547d5dee (diff) | |
download | kvmx-48b12bda534020898c80553a610796a3b6a33a0d.tar.gz kvmx-48b12bda534020898c80553a610796a3b6a33a0d.tar.bz2 |
Adds sound option
-rwxr-xr-x | kvmx | 7 | ||||
-rw-r--r-- | kvmxfile | 4 |
2 files changed, 10 insertions, 1 deletions
@@ -390,6 +390,10 @@ function kvmx_up { spice_opts="$spice_opts -chardev spicevmc,id=spicechannel0,name=vdagent" fi + if [ -z "$sound" ] || [ "$sound" != "0" ]; then + sound_opts="-soundhw $sound" + fi + # Run virtual machine # See https://en.wikipedia.org/wiki/Nohup#Overcoming_hanging nohup kvm -m $memory -name $VM \ @@ -397,7 +401,8 @@ function kvmx_up { $spice_opts \ -chardev "socket,id=monitor,path=$MONITORFILE,server,nowait" -mon chardev=monitor,mode=readline \ -chardev "socket,id=serial0,path=$CONSOLEFILE,server,nowait" -device isa-serial,chardev=serial0 \ - -smp $smp -soundhw ac97 -cpu host -balloon virtio \ + -smp $smp -cpu host -balloon virtio \ + $sound_opts \ -net $net_opts \ $qemu_opts &> $LOGFILE < /dev/null & @@ -82,6 +82,10 @@ run_xephyr="0" # Set screen resolution #resolution="1280x785" +# Sound +#sound="0" +sound="ac97" + # Set additional hostfwd mappings #port_mapping="hostfwd=tcp:127.0.0.1:8080-:80,hostfwd=tcp:127.0.0.1:8443-:443" |