| 主机名与密码 | --hostname web01 --root-password password:xxx |
|---|---|
| 安装软件 | --install nginx(Debian/RHEL 系均支持) |
| 执行命令 | --run-command 'systemctl enable nginx' |
| 上传文件 | --upload 本地路径:镜像内路径 |
定制一台应用基线镜像
定制一台应用基线镜像
sudo virt-customize -a /data/images/base.qcow2 \
--hostname web01 --root-password password:'ChangeMe_2026' \
--install nginx --run-command 'systemctl enable nginx' \
--upload /etc/app/app.conf:/etc/app/app.conf