云环境需要一个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
再找找看
本文来自博客园,作者:Aggy梁工,转载请注明原文链接:https://www.cnblogs.com/liangyuyue/p/18665972

浙公网安备 33010602011771号