cloud-init模板镜像的创建与使用
Abstract
本文介绍,在Proxmox Virtual Environment(pve)上,cloud-init模板镜像的创建与使用。
Steps
Prepare a VM
这里使用CentOS 7.9.2209虚拟机
Install cloud-init
apt-get install cloud-init
Add Cloud-Init CD-ROM drive
Shutdown the VM. Execute blow code snippet on pve host,
qm set 10071 --ide2 local-xfs:cloudinit
qm set 10071 --boot order=scsi0
qm template 10071
Deploying Cloud-Init Templates
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
Enjoy Reading This Article?
Here are some more articles you might like to read next: