OS: MacOS Catalina 10.15.2
qemu-system-x86_64 -version QEMU emulator version 4.2.50 (v4.2.0-13-g084a398bf8-dirty) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
Qemu install via brew: brew install qemu
---
I use following to install Ubuntu 18.04 desktop successfully:-
IMG_CD=$HOME/Downloads/iso/ubuntu-18.04.3-desktop-amd64.iso IMG_FILE=$HOME/code/vm/qemu/u64d01.qcow2 MAC_ADDR=xx:xx:xx:xx:xx:xx
qemu-system-x86_64 \ -no-user-config -nodefaults \ -show-cursor \ -name u64d01 \ -M q35,accel=hvf,usb=off,vmport=off \ -cpu host -smp 4 -m 2048 \ -overcommit mem-lock=off \ -overcommit cpu-pm=off \ -rtc base=utc,clock=host \ \ -device virtio-tablet-pci \ -device virtio-vga \ \ -device virtio-blk-pci,drive=ssd1 \ -drive id=ssd1,file=$IMG_FILE,if=none,format=qcow2 \ \ -device virtio-net-pci,netdev=nic1,mac=$MAC_ADDR \ -netdev user,id=nic1,ipv4=on,ipv6=on,hostname=u64d01,hostfwd=tcp::2222-:22 \ \ -device ich9-intel-hda,id=snd,msi=on \ -device hda-output,id=snd-codec0,bus=snd.0,cad=0,audiodev=snd0 \ -audiodev coreaudio,id=snd0,out.buffer-count=10000 \ \ -cdrom $IMG_CD
Removing the last -cdrom line Ubuntu desktop boot up and everything work perfectly except the audio.
I test with wav audio driver by replacing the -audiodev line as follow, which save the client audio to a wave file, like below and it work perfectly:
-audiodev wav,id=snd0,path=$HOME/qemu.wav
I start the vm, open firefox and play a few video, then shutdown the vm. Then I can play the qemu.wav file and all the audio was recorded there.
However, I can't get audio directly with coreaudio.
OS: MacOS Catalina 10.15.2
qemu-system-x86_64 -version 13-g084a398bf8- dirty)
QEMU emulator version 4.2.50 (v4.2.0-
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
Qemu install via brew: brew install qemu
---
I use following to install Ubuntu 18.04 desktop successfully:-
IMG_CD= $HOME/Downloads /iso/ubuntu- 18.04.3- desktop- amd64.iso $HOME/code/ vm/qemu/ u64d01. qcow2 xx:xx:xx: xx:xx:xx
IMG_FILE=
MAC_ADDR=
qemu-system-x86_64 \ hvf,usb= off,vmport= off \ blk-pci, drive=ssd1 \ file=$IMG_ FILE,if= none,format= qcow2 \ net-pci, netdev= nic1,mac= $MAC_ADDR \ nic1,ipv4= on,ipv6= on,hostname= u64d01, hostfwd= tcp::2222- :22 \ hda,id= snd,msi= on \ id=snd- codec0, bus=snd. 0,cad=0, audiodev= snd0 \ id=snd0, out.buffer- count=10000 \
-no-user-config -nodefaults \
-show-cursor \
-name u64d01 \
-M q35,accel=
-cpu host -smp 4 -m 2048 \
-overcommit mem-lock=off \
-overcommit cpu-pm=off \
-rtc base=utc,clock=host \
\
-device virtio-tablet-pci \
-device virtio-vga \
\
-device virtio-
-drive id=ssd1,
\
-device virtio-
-netdev user,id=
\
-device ich9-intel-
-device hda-output,
-audiodev coreaudio,
\
-cdrom $IMG_CD
Removing the last -cdrom line Ubuntu desktop boot up and everything work perfectly except the audio.
I test with wav audio driver by replacing the -audiodev line as follow, which save the client audio to a wave file, like below and it work perfectly:
-audiodev wav,id= snd0,path= $HOME/qemu. wav
I start the vm, open firefox and play a few video, then shutdown the vm. Then I can play the qemu.wav file and all the audio was recorded there.
However, I can't get audio directly with coreaudio.