小编JM *_* D.的帖子

为什么CentOS将ATA总线转换为scsi总线?

我使用 libvirt + qemu 来启动带有 IDE 总线磁盘的虚拟机

libvirt 中的设备:

<disk type='network' device='disk'>
  <driver name='qemu' type='raw' cache='none' io='native'/>
  <source protocol='iscsi' name='xxx'>
    <host name='127.0.0.1' port='xxx'/>
  </source>
  <target dev='hdb' bus='ide'/>
  <boot order='3'/>
  <alias name='ide0-0-1'/>
  <address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
Run Code Online (Sandbox Code Playgroud)

在 qemu 中:

-drive file.driver=iscsi,file.portal=127.0.0.1:xxx,file.target=xxx,file.lun=xxx,file.transport=tcp,format=raw,if=none,id=drive-ide0-0-1,cache=none,aio=native
-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,bootindex=3,write-cache=on
Run Code Online (Sandbox Code Playgroud)

来宾操作系统是 CentOS-7.9-x86_64-DVD-2009

启动后,dmesg 中显示

May 18 06:07:37 localhost kernel: ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xd120 irq 14
May 18 06:07:37 localhost kernel: ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma …
Run Code Online (Sandbox Code Playgroud)

centos qemu

5
推荐指数
1
解决办法
426
查看次数

标签 统计

centos ×1

qemu ×1