diff options
-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" |