云计算百科
云计算领域专业知识百科平台

云环境需要一个iso,但我只有qcow2虚机,所以测试一下用工具将qcow2转换位iso镜像

首先使用安装qemu

sudo apt-get install qemu-utils
y

得到

Created symlink /etc/systemd/system/multi-user.target.wants/run-qemu.mount → /lib/systemd/system/run-qemu.mount.
Processing triggers for man-db (2.10.2-1) …
Processing triggers for libc-bin (2.35-0ubuntu3.8) …

然后上传qcow2

root@vultr:~# ls
fortios.qcow2 install.sh snap
root@vultr:~#

使用以下命令将 qcow2 镜像转换为 raw 镜像

qemu-img convert -f qcow2 -O raw fortios.qcow2 fortios.raw
root@vultr:~# ls
fortios.qcow2 fortios.raw install.sh snap
root@vultr:~#

使用以下命令将 raw 镜像转换为 iso 文件

sudo apt install mkisofs
mkisofs -o fortios.iso fortios.raw

成功

Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
1048750 extents written (2048 MB)

最后,下载 iso 文件验证一下。 废物不能用emmm 再找找看

赞(0)
未经允许不得转载:网硕互联帮助中心 » 云环境需要一个iso,但我只有qcow2虚机,所以测试一下用工具将qcow2转换位iso镜像
分享到: 更多 (0)

评论 抢沙发

评论前必须登录!