VM 생성
-proxmox shell 에서 진행
# 이미지 다운로드
wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
# VM 생성
qm create 9000 --memory 8192 --core 2 --name ubuntu-20.04-cloud --net0 virtio,bridge=vmbr0 --agent enabled=1 --onboot 1
# Import
qm importdisk 9000 focal-server-cloudimg-amd64.img local-lvm qm importdisk 9000 focal-server-cloudimg-amd64.img newstorage
# Attach
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0 qm set 9000 --scsihw virtio-scsi-pci --scsi0 newstorage:vm-9000-disk-0
# Add cloud init drive
qm set 9000 --ide2 newstorage:cloudinit
# Make the cloud init drive bootable and restrict BIOS to boot from disk only
qm set 9000 --boot c --bootdisk scsi0
# Add serial console
qm set 9000 --serial0 socket --vga serial0
# Using a dhcp server on vmbr1 or use static IP
qm set 9000 --ipconfig0 ip=dhcp qm set 9000 --ipconfig0 ip=IP/24,gw=IP
# user authentication for user
qm set 9000 --ciuser root
qm set 9000 --cipassword 패스워드
qm set 9000 --sshkey 파일.pub
# (옵션) check the cloud-init config
qm cloudinit dump 9000 user
# create tempalte and a linked clone
qm template 9000