Prasyarat

  • Proxmox terinstall

Panduan

Buat template

  1. Unduh file image cloud ubuntu 18
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
  1. Buat VM
qm create 100 --memory 2048 --net0 virtio,bridge=vmbr0
  1. Import image ke dalam local-lvm storage
qm importdisk 100 bionic-server-cloudimg-amd64.img local-lvm
  1. Atur disk VM
qm set 100 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-100-disk-0
  1. Buat drive cloud-image
qm set 100 --ide2 local-lvm:cloudinit
  1. Atur boot menggunakan cloud-init
qm set 100 --boot c --bootdisk scsi0
  1. Atur console
qm set 100 --serial0 socket --vga serial0
  1. Atur console
qm template 100

Buat VM

  1. Klon template
qm clone 100 200 --name ubuntu20
  1. Konfigurasi publickey dan IP Address
qm set 200 --sshkey ~/.ssh/id_rsa.pub
qm set 200 --ipconfig0 ip=192.168.10.251/24,gw=192.168.10.1
  1. Start VM

  2. Masuk console VM (Cek proses booting)

  3. Uji SSH VM

Referensi