零、环境介绍
宿主机:
Ubuntu 22.04.1 LTS
Ubuntu 20.04镜像:
ubuntu-20.04.5-desktop-amd64.iso
QEMU版本:
qemu-img version 7.1.0
Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers
一、安装过程
1. 创建镜像文件
使用qemu-img命令创建镜像文件。命令及结果如下所示:
$ qemu-img create -f qcow2 Ubuntu20.img 80G
Formatting 'Ubuntu20.img', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=85899345920 lazy_refcounts=off refcount_bits=16
上述命令使用qemu-img create命令创建了一个空白的客户机镜像文件,格式为qcow2,名字为Ubuntu20.img,最大容量为80G。<