当前位置:网站首页>qemu and host share disk
qemu and host share disk
2022-08-10 06:14:00 【Liu Shigang】
Sometimes it is necessary to share files between the host and the qemu virtual machine, adding a shared disk will help with this.
Create a 64MB disk image file and format it as ext4 as a spare for shared disk.
dd if=/dev/zero of=ext4.img bs=512 count=131072mkfs.ext4 ext4.imgModify the qemu startup command and use -hdb to add a disk.
qemu-system-x86_64 -kernel ~/linux-4.14.191/arch/x86_64/boot/bzImage -hda ~/busybox-1.32.0/rootfs.img -append "root=/dev/sda console=ttyS0" -s -smp 1 -nographic -hdb ~/shadisk/ext4.imgAfter entering the qemu system, use the mount command to mount the sdb to the mnt directory.
Mount ext4.img in the original system to realize file sharing between qemu and the original system.
~/shadisk$ sudo mount -t ext4 -o loop ext4.img ./share边栏推荐
猜你喜欢
随机推荐
内核映像文件格式
STM32F407ZG 串口通信+固定帧头帧尾传输数据帧
Gradle学习(二)Groovy
从交换两数据值看指针的使用(c语言实现)
【备份】《Unity Shader入门精要》配图
C#对MySQL数据库进行增删改查操作(该操作还有防止MySQL注入功能)
分享一个专业TA的《Shader参考大全》
开源游戏服务器框架NoahGameFrame(NF)简介(一)
在TypeScript中使用parseInt()
STM32单片机OLED经典2048游戏单片机小游戏
浅谈《帧同步网络游戏》之“框架”实现思路
mysql使用常见问题和解决
超纯水抛光树脂
qemu和主机共享磁盘
一小时极速掌握游戏资源远程热更新
剑指 Offer(第 2 版)7/6 9-13
电池级碳酸氢锂除杂质钙镁离子工艺原理
屏幕后期处理之:Sobel算子实现边缘检测
ArgumentException: GetComponent requires that the requested component ‘GameObject‘ derives from Mono
工业废酸回收工艺







