V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
linux40
V2EX  ›  Linux

在 stackoverflow 上提了个问题,关于 qemu 虚拟龙芯 2e 的,在这里也问一下。。。

  •  
  •   linux40 · 2016-07-29 18:20:00 +08:00 · 5706 次点击
    这是一个创建于 2819 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://stackoverflow.com/questions/38656217/whats-wrong-with-my-virt-manager-config 感觉会没什么人理,毕竟 google 了找到的全是报 bug 的。。。

    第 1 条附言  ·  2016-07-29 20:01:04 +08:00
    这是报错
    Traceback (most recent call last):
    File "/usr/share/virt-manager/virtManager/asyncjob.py", line 88, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
    File "/usr/share/virt-manager/virtManager/create.py", line 2288, in _do_async_install
    guest.start_install(meter=meter)
    File "/usr/share/virt-manager/virtinst/guest.py", line 461, in start_install
    doboot, transient)
    File "/usr/share/virt-manager/virtinst/guest.py", line 396, in _create_guest
    self.domain = self.conn.createXML(install_xml or final_xml, 0)
    File "/usr/lib/python2.7/site-packages/libvirt.py", line 3777, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
    libvirtError: XML error: no pci buses available
    17 条回复    2016-07-31 19:20:43 +08:00
    linux40
        1
    linux40  
    OP
       2016-07-29 18:22:05 +08:00
    马上就被人踩了。。。
    wujunze
        2
    wujunze  
       2016-07-29 18:52:01 +08:00
    不懂这个
    maemual
        3
    maemual  
       2016-07-29 18:56:40 +08:00
    居然贴中文的图片。。。。
    linux40
        4
    linux40  
    OP
       2016-07-29 19:20:53 +08:00
    @maemual 。。。不然只有重进桌面环境
    Eoss
        5
    Eoss  
       2016-07-29 19:58:27 +08:00
    -2 。。。。
    linux40
        6
    linux40  
    OP
       2016-07-29 20:00:20 +08:00
    我还是删了。。。
    inFinityzc
        7
    inFinityzc  
       2016-07-29 20:01:15 +08:00
    -2 ...
    lzhip
        8
    lzhip  
       2016-07-29 20:14:47 +08:00 via Android
    已经可以模拟龙芯,楼主做什么项目的啊?
    ryd994
        9
    ryd994  
       2016-07-29 20:35:02 +08:00
    @linux40 LANGUAGE=en_US virt-manager
    hensinl
        10
    hensinl  
       2016-07-29 21:11:34 +08:00
    @linux40 发个 xml 文件出来看看
    linux40
        11
    linux40  
    OP
       2016-07-29 22:08:56 +08:00
    @lzhip 用的 qemu 啊

    @ryd994 呃,也是

    @hensinl 就是 createXML 错了嘛,就没有 XML 文件啊。。。
    nyanyh
        12
    nyanyh  
       2016-07-30 16:29:21 +08:00
    LZ 这个管理器 GUI 是什么啊?
    linux40
        13
    linux40  
    OP
       2016-07-30 21:52:43 +08:00
    @nyanyh virt-manager
    Azus
        14
    Azus  
       2016-07-31 17:18:18 +08:00   ❤️ 1
    目前 MIPS 在 libvirt 上不会自动添加 pci root, 可以先用 virsh edit 导入一个简单的模板,再添加和修改其它设备

    ----
    <domain type='qemu'>
    <name>fulong2e</name>
    <memory unit='KiB'>131072</memory>
    <os>
    <type arch='mips64el' machine='fulong2e'>hvm</type>
    </os>
    <devices>
    <emulator>/usr/bin/qemu-system-mips64el</emulator>
    <controller type='pci' model='pci-root'/>
    </devices>
    </domain>
    Azus
        15
    Azus  
       2016-07-31 17:22:09 +08:00
    不是 virsh edit, 是 virsh define...
    linux40
        16
    linux40  
    OP
       2016-07-31 17:59:18 +08:00
    @Azus 不过怎么让 virt-manager 把这段加进去啊,自己写整个 xml 感觉有点困难。。。
    Azus
        17
    Azus  
       2016-07-31 19:20:43 +08:00   ❤️ 1
    假定新建一个文件为 fulong2e.xml
    把 14 楼的那一段保存到 fulong2e.xml 中
    执行 virsh define fulong2e.xml
    执行完后, virt-manager 中就可以看得到了, 这时就可以通过 virt-manager 修改

    不过 fulong2e 就我所知,在 QEMU 下网络是不通的,安装系统需要通过 Malta 安装,安装完后,再替换 Malta 的内核为 fulong2e 的内核

    安装:
    qemu-system-mips64el -M malta \
    -kernel netinstall-vmlinux-3.16.0-4-4kc-malta \
    -initrd netinstall-initrd.gz \
    -append "root=/dev/ram console=ttyS0" \
    -drive file=mipsel.qcow2,if=virtio \
    -nographic \
    -serial mon:stdio

    运行 5kc-malta
    qemu-system-mips64el -M malta \
    -kernel vmlinux-3.16.0-4-5kc-malta \
    -initrd initrd.img-3.16.0-4-5kc-malta \
    -append "root=/dev/vda1 console=ttyS0" \
    -drive file=mipsel.qcow2,if=virtio \
    -net nic,model=virtio \
    -net tap \
    -nographic \
    -serial mon:stdio

    运行 loongson-2e
    qemu-system-mips64el -M fulong2e \
    -kernel vmlinux-3.16.0-4-loongson-2e \
    -initrd initrd.img-3.16.0-4-loongson-2e \
    -append "root=/dev/sda1 console=ttyS0" \
    -drive file=mipsel.qcow2 \
    -nographic \
    -serial mon:stdio
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4238 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 05:26 · PVG 13:26 · LAX 22:26 · JFK 01:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.