通过qcow2镜像安装
本节介绍如何使用或者制作qcow2镜像,并介绍相应的操作步骤,指导用户进行安装。
制作qcow2镜像
-
安装qemu-img软件包。
# dnf install -y qemu-img
-
使用qemu-img工具的create命令,创建镜像文件,命令格式为:
$ qemu-img create -f <imgFormat> -o <fileOption> <fileName> <diskSize>
其中,各参数含义如下:
- imgFormat :镜像格式,取值为raw, qcow2等。
- fileOption :文件选项,用于设置镜像文件的特性,如指定后端镜像文件,压缩,加密等特性。
- fileName :文件名称。
- diskSize :磁盘大小,用于指定块磁盘设备的大小,支持的单位有K、M、G、T,分别代表KiB、MiB、GiB、TiB。
例如,创建一个磁盘设备大小为32GB、格式为qcow2的镜像文件openEuler-imge.qcow2,命令和回显如下:
$ qemu-img create -f qcow2 openEuler-image.qcow2 32G Formatting 'openEuler-image.qcow2', fmt=qcow2 size=34359738368 cluster_size=65536 lazy_refcounts=off refcount_bits=16
参考链接:https://docs.openeuler.org/zh/docs/20.03_LTS_SP3/docs/Installation/%E5%AE%89%E8%A3%85%E6%96%B9%E5%BC%8F%E4%BB%8B%E7%BB%8D.html