云环境需要一个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
再找找看

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Aggy阿吉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值