目录
使用 libguestfs 修改 QCOW2 镜像的密码
- 安装 guestfish tool。
$ yum install libguestfs guestfish -y
- 其中 libvirtd。
$ systemctl start libvirtd
- 获取原始 Qcow2 镜像。
$ cd /tmp
$ wget https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-2009.qcow2c --no-check-certificate
- 获取加密密码
$ openssl passwd -1 <