如何替换 kvm 命令中的参数 -soundhw all ?

如何替换 kvm 命令中的参数 -soundhw all ?

几年前,我这样运行虚拟机:

sudo apt-get install qemu qemu-kvm
cd ~/
mkdir debian_qume
wget some_debian_version.iso  #it is a url
mv some_debian_version.iso  ~/debian_qume/
cd  debian_qume
qemu-img create -f qcow2 virtualdebian.img 30G
kvm -hda virtualdebian.img -cdrom some_debian_version.iso 
    -m 2048 -net nic -net user -soundhw all  &

一切正常,今天(2013-07-10),kvm命令遇到一些错误:

kvm -hda virtualdebian.img -cdrom some_debian_version.iso 
    -m 2048 -net nic -net user -soundhw all  &

警告信息:

kvm: warning: '-soundhw ac97' is deprecated, please use '-device AC97' instead
kvm: warning: '-soundhw gus' is deprecated, please use '-device gus' instead
kvm: warning: '-soundhw hda' is deprecated, please use '-device intel-hda -device hda-duplex' instead
kvm: warning: '-soundhw pcspk' is deprecated, please set a backend using '-machine pcspk-audiodev=<name>' instead
kvm: warning: '-soundhw es1370' is deprecated, please use '-device ES1370' instead
kvm: warning: '-soundhw sb16' is deprecated, please use '-device sb16' instead
kvm: warning: '-soundhw cs4231a' is deprecated, please use '-device cs4231a' instead
kvm: warning: '-soundhw adlib' is deprecated, please use '-device adlib' instead

如何替换命令-soundhw all中的参数kvm?操作系统环境:

uname -a
Linux debian 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64 GNU/Linux

我电脑中的音频设备:

lspci | grep -i audio
09:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
09:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor
09:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller

相关内容