How to emulate a SATA disk drive in QEMU

 ̄綄美尐妖づ 提交于 2019-12-22 11:15:37

问题


I want to emulate a SATA disk drive in QEMU to check a device driver I'm trying to develop. How can this be done? Would greatly appreciate your help.


回答1:


The Gentoo Wiki offers these parameters:

 -drive id=disk,file=IMAGE.img,if=none \
 -device ahci,id=ahci \
 -device ide-drive,drive=disk,bus=ahci.0

Set emulation layer for an ICH-9 AHCI controller (not yet stable ) and use the specified image file for it. The AHCI emulation supports NCQ, so multiple read or write requests can be outstanding at the same time.




回答2:


When using i386 or x86_64 with Q35 machine type(-M q35), IDE disk has been AHCI by default.



来源:https://stackoverflow.com/questions/48351096/how-to-emulate-a-sata-disk-drive-in-qemu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!