参考[https://zhuanlan.zhihu.com/p/440896294]运行了qemu-openeuler
docker export导出的是容器的快照,不会保存元数据,所以,如果你想让其他人也使用也就需要使用docker save,docker save是针对镜像的,所以我们需要先将我们搭建好的docker容器提交为一个镜像。
docker save与docker export的区别
docker commit 35ffde6b5958 qemu-openeuler-riscv64-on-x86_64:1.0.0
sha256:c16da49e3df482be6580b0478e37cb69518333eb5bf966852bd1e28271f17071
docker save -o ~/Downloads/qemu-openeuler-riscv64-on-x86_64.tar qemu-openeuler-riscv64-on-x86_64:1.0.0
MD5:6d166ae637f2016611127ea5c72829b9
docker load < qemu-openeuler-riscv64-on-x86_64.tar
docker run -it -p 8070:8070 -v /Users/workspace/Downloads/hello:/tmp --privileged=true qemu-openeuler-riscv64-on-x86_64:1.0.0 /bin/bash
cd /home/test
qemu-system-riscv64
-nographic -machine virt
-smp 8 -m 2G
-kernel fw_payload_oe.elf
-drive file=openEuler-preview.riscv64.qcow2,format=qcow2,id=hd0
-object rng-random,filename=/dev/urandom,id=rng0
-device virtio-rng-device,rng=rng0
-device virtio-blk-device,drive=hd0
-device virtio-net-device,netdev=usernet
-netdev user,id=usernet,hostfwd=tcp::12055-:22
-append 'root=/dev/vda1 rw console=ttyS0 systemd.default_timeout_start_sec=600 selinux=0 highres=off mem=4096M earlycon'
用户名:root, 密码:openEuler12#$
(未完待续)