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

2016-07-29 18:20:00 +08:00
 linux40

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

5721 次点击
所在节点    Linux
17 条回复
linux40
2016-07-29 18:22:05 +08:00
马上就被人踩了。。。
wujunze
2016-07-29 18:52:01 +08:00
不懂这个
maemual
2016-07-29 18:56:40 +08:00
居然贴中文的图片。。。。
linux40
2016-07-29 19:20:53 +08:00
@maemual 。。。不然只有重进桌面环境
Eoss
2016-07-29 19:58:27 +08:00
-2 。。。。
linux40
2016-07-29 20:00:20 +08:00
我还是删了。。。
inFinityzc
2016-07-29 20:01:15 +08:00
-2 ...
lzhip
2016-07-29 20:14:47 +08:00
已经可以模拟龙芯,楼主做什么项目的啊?
ryd994
2016-07-29 20:35:02 +08:00
@linux40 LANGUAGE=en_US virt-manager
hensinl
2016-07-29 21:11:34 +08:00
@linux40 发个 xml 文件出来看看
linux40
2016-07-29 22:08:56 +08:00
@lzhip 用的 qemu 啊

@ryd994 呃,也是

@hensinl 就是 createXML 错了嘛,就没有 XML 文件啊。。。
nyanyh
2016-07-30 16:29:21 +08:00
LZ 这个管理器 GUI 是什么啊?
linux40
2016-07-30 21:52:43 +08:00
@nyanyh virt-manager
Azus
2016-07-31 17:18:18 +08:00
目前 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-07-31 17:22:09 +08:00
不是 virsh edit, 是 virsh define...
linux40
2016-07-31 17:59:18 +08:00
@Azus 不过怎么让 virt-manager 把这段加进去啊,自己写整个 xml 感觉有点困难。。。
Azus
2016-07-31 19:20:43 +08:00
假定新建一个文件为 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://www.v2ex.com/t/295849

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

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

© 2021 V2EX