cloud-init模板镜像的创建与使用
cloud-init模板镜像的创建与使用
Abstract
本文介绍,在Proxmox Virtual Environment(pve)上,cloud-init模板镜像的创建与使用。
Steps
Prepare a VM
Install cloud-init
1
apt-get install cloud-init
Add Cloud-Init CD-ROM drive
Shutdown the VM. Execute blow code snippet on pve host,
1
2
3
qm set 10071 --ide2 local-xfs:cloudinit
qm set 10071 --boot order=scsi0
qm template 10071
Deploying Cloud-Init Templates
1
2
3
qm clone 10071 171 --name CentOS-7-9-001
qm set 171 --sshkey ~/.ssh/id_rsa.pub
qm set 171 --ipconfig0 ip=172.16.0.171/24,gw=172.16.0.1
This post is licensed under CC BY 4.0 by the author.