libvirt qemu系统arm,错误:XML错误:没有可用的PCI总线
我正在尝试使用libvirt运行我用buildroot创建的linux映像 如果我直接使用qemu系统arm,一切都会按预期工作:libvirt qemu系统arm,错误:XML错误:没有可用的PCI总线,arm,qemu,libvirt,Arm,Qemu,Libvirt,我正在尝试使用libvirt运行我用buildroot创建的linux映像 如果我直接使用qemu系统arm,一切都会按预期工作: /usr/bin/qemu-system-arm \ -M versatilepb \ -kernel output/images/zImage \ -dtb output/images/versatile-pb.dtb \ -drive index=0,file=output/images/rootfs.ext2,if=scsi,format=raw \ -app
/usr/bin/qemu-system-arm \
-M versatilepb \
-kernel output/images/zImage \
-dtb output/images/versatile-pb.dtb \
-drive index=0,file=output/images/rootfs.ext2,if=scsi,format=raw \
-append "root=/dev/sda console=ttyAMA0,115200" \
-net nic,model=rtl8139 \
-net user \
-nographic
但是,当我尝试从qemu cmdline创建xml时,它失败了:
$ virsh domxml-from-native qemu-argv qemu.args
error: XML error: No PCI buses available
我还尝试手动创建一个基本的XML:
<?xml version='1.0'?>
<domain type='qemu'>
<name>Linux ARM</name>
<uuid>ce1326f0-a9a0-11e3-a5e2-0800200c9a66</uuid>
<memory>131072</memory>
<currentMemory>131072</currentMemory>
<vcpu>1</vcpu>
<os>
<type machine='versatilepb'>hvm</type>
<kernel>zImage</kernel>
<cmdline>root=/dev/sda console=ttyAMA0,115200</cmdline>
<dtb>versatile-pb.dtb</dtb>
</os>
<devices>
<disk type='file' device='disk'>
<source file='rootfs.ext2'/>
<target dev="sda" bus="scsi"/>
</disk>
<interface type='network'>
<source network='default'/>
</interface>
</devices>
</domain>
我已经尝试过全新最新的libvirt-3.0.0,但没有成功
我需要在我的cmdline/xml中更改什么?virsh domxml from native issue
domxml from native
命令不起作用的原因是,libvirt中进行解析的底层代码希望qemu system-
的后缀为a,而arm
的后缀为a。在您的情况下,似乎希望arm
映射到armv7l
,这是一个cannonical架构名称。您可以创建一个软链接qemu-system-armv7l
,指向您的系统的qemu系统臂
,然后使用qemu.args中的软链接位置
代码引用
os
下的type
元素中,您需要指定arch=“armv7l”
(或其他一些规范的arm-arch名称)。还要注意,内核
和dtb
引用需要是绝对路径或前缀为
。最后,您拥有的一些设备需要PCI总线,无法与您要使用的机器配合使用。考虑下面的备选方案:
Linux ARM
ce1326f0-a9a0-11e3-a5e2-0800200c9a66
131072
131072
1.
hvm
/路径/目的地/目的地
root=/dev/sda控制台=ttyam0115200
/路径/到/通用-pb.dtb
$ virsh create guest-test.xml
error: Failed to create domain from guest-test.xml
error: XML error: No PCI buses available