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

2016 年 7 月 29 日
 linux40

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

6630 次点击
所在节点    Linux
17 条回复
linux40
2016 年 7 月 29 日
马上就被人踩了。。。
wujunze
2016 年 7 月 29 日
不懂这个
maemual
2016 年 7 月 29 日
居然贴中文的图片。。。。
linux40
2016 年 7 月 29 日
@maemual 。。。不然只有重进桌面环境
Eoss
2016 年 7 月 29 日
-2 。。。。
linux40
2016 年 7 月 29 日
我还是删了。。。
inFinityzc
2016 年 7 月 29 日
-2 ...
lzhip
2016 年 7 月 29 日
已经可以模拟龙芯,楼主做什么项目的啊?
ryd994
2016 年 7 月 29 日
@linux40 LANGUAGE=en_US virt-manager
hensinl
2016 年 7 月 29 日
@linux40 发个 xml 文件出来看看
linux40
2016 年 7 月 29 日
@lzhip 用的 qemu 啊

@ryd994 呃,也是

@hensinl 就是 createXML 错了嘛,就没有 XML 文件啊。。。
nyanyh
2016 年 7 月 30 日
LZ 这个管理器 GUI 是什么啊?
linux40
2016 年 7 月 30 日
@nyanyh virt-manager
Azus
2016 年 7 月 31 日
目前 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
2016 年 7 月 31 日
不是 virsh edit, 是 virsh define...
linux40
2016 年 7 月 31 日
@Azus 不过怎么让 virt-manager 把这段加进去啊,自己写整个 xml 感觉有点困难。。。
Azus
2016 年 7 月 31 日
假定新建一个文件为 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

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/295849

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX