参考
操作
- 创建qcow2格式文件
qemu-img create -f qcow2 ubuntu22.qcow2 100G
- 挂载
modprobe nbd max_part=8
qemu-nbd -c /dev/nbd0 ./ubuntu22.qcow2
mkfs.ext4 /dev/nbd0
mkdir tmp
mount -t ext4 /dev/nbd0 ./tmp
- 拷贝
cp mnt/* ./tmp/* -raf
- 卸载
umount ./tmp
qemu-nbd -d /dev/nbd0
标签:tmp,Qemu,qcow2,磁盘格式,nbd0,dev,qemu,nbd
From: https://www.cnblogs.com/pengdonglin137/p/16859889.html