qemu 为什么只支持一个 IDE controller?
qemu 只支持一个 IDE controller,一个 IDE controller 只支持 4 个设备(hda 到 hdd)。定义两个 IDE controller 或使用 hde 都会报错。 现象 在 libvirt XML 中定义两个 IDE controller: <controller type='ide' index='0'/> <controller type='ide' index='1'/> 直接会报如下错误: error: Failed to create domain from vm-example.xml error: unsupported configuration: Only a single IDE controller is supported for this machine type 排查 默认有一个 IDE controller 默认有一个 IDE controller。 所以不定义 <controller type='ide' index='0'/>,也是有一个 IDE controller 的。 直接定义 IDE disk 的情况 <disk type="network" device="cdrom"> <driver name="qemu" type="raw"></driver> <source protocol="http" name="/yy/img-example.iso"> <host name="qa1b01" port="8021"></host> </source> <target dev="hdd" bus="ide"></target> 【注意 hdd】 <readonly></readonly> <shareable></shareable> </disk> 直接定义了 IDE 的 disk,没有定义 IDE 的 controller。 ...