Mata Pelajaran Pilihan

XCP-NG Setup

Panduan instalasi dan manajemen XCP-NG sebagai platform virtualisasi enterprise open-source berbasis Xen hypervisor.

XCP-NG Setup

XCP-NG adalah platform virtualisasi enterprise open-source berbasis Xen hypervisor — fork dari Citrix XenServer yang fully free tanpa batasan lisensi.

Mengapa XCP-NG?

  • Enterprise-grade — teknologi yang sama dengan Citrix XenServer
  • Fully open-source — tanpa batasan fitur seperti XenServer versi gratis
  • Xen Orchestra — web UI modern untuk manajemen (open-source)
  • Cocok untuk production — stabil dan battle-tested
  • Alternatif Proxmox — pilihan bagus untuk lingkungan enterprise

Perbandingan XCP-NG vs Proxmox

FiturXCP-NGProxmox
HypervisorXenKVM
ContainerTidak nativeLXC
Web UIXen OrchestraBuilt-in
ClusterXen PoolBuilt-in
StorageSR (Storage Repository)Storage Pool
LisensiOpen SourceOpen Source

Prerequisites

  • Hardware dengan support virtualisasi (Intel VT-x / AMD-V)
  • RAM minimal 4GB (rekomendasi 16GB+)
  • Storage minimal 46GB
  • USB drive 8GB untuk instalasi
  • ISO XCP-NG terbaru dari xcp-ng.org

Step 1 — Instalasi XCP-NG

1.1 Boot dari USB

  1. Buat bootable USB dengan ISO XCP-NG
  2. Boot dari USB
  3. Pilih Install XCP-ng

1.2 Wizard Instalasi

  1. Pilih keyboard layout
  2. Pilih disk instalasi
  3. Set password root
  4. Konfigurasi network:
    • IP Address (static recommended)
    • Subnet mask
    • Gateway
    • DNS
  5. Set timezone: Asia/Jakarta
  6. Tunggu proses instalasi selesai dan reboot

Step 2 — Install Xen Orchestra (XO)

Xen Orchestra adalah web UI untuk manage XCP-NG. Tersedia versi:

  • XO Appliance — VM siap pakai (berbayar dari Vates)
  • XO from Sources — build sendiri (gratis)

Install XO from Sources (Gratis)

# SSH ke XCP-NG server
ssh root@IP-XCPNG

# Download script instalasi
bash -c "$(curl -s https://raw.githubusercontent.com/ronivay/XenOrchestraInstallerUpdater/master/xo-install.sh)"

Ikuti prompt instalasi. Setelah selesai, akses XO via:

http://IP-XCPNG

Default login:

  • Username: admin@admin.net
  • Password: admin

Penting: Segera ganti password default setelah login pertama!

Step 3 — Tambahkan XCP-NG Host ke Xen Orchestra

  1. Buka Xen Orchestra di browser
  2. Settings → Servers → Add Server
  3. Isi:
    • Host: IP-XCPNG
    • Username: root
    • Password: password root XCP-NG
  4. Klik Connect

Step 4 — Buat Virtual Machine

4.1 Via Xen Orchestra

  1. Klik New VM
  2. Pilih template
  3. Konfigurasi:
    • Name: nama VM
    • CPU: jumlah vCPU
    • RAM: jumlah memory
    • Disk: ukuran storage
    • Network: pilih network interface
  4. Klik Create

4.2 Via CLI (xe command)

# List template yang tersedia
xe template-list

# Buat VM dari template
xe vm-install template="Other install media" new-name-label="ubuntu-server"

# Set memory
xe vm-memory-limits-set uuid=VM-UUID \
  static-min=1GiB static-max=2GiB \
  dynamic-min=1GiB dynamic-max=2GiB

# Start VM
xe vm-start uuid=VM-UUID

Step 5 — Manajemen Storage (SR)

# List Storage Repository
xe sr-list

# Buat SR baru (NFS)
xe sr-create \
  host-uuid=HOST-UUID \
  type=nfs \
  name-label="NFS Storage" \
  device-config:server=192.168.1.50 \
  device-config:serverpath=/mnt/nfs

# Buat SR dari disk lokal
xe sr-create \
  host-uuid=HOST-UUID \
  type=lvm \
  name-label="Local LVM" \
  device-config:device=/dev/sdb

Step 6 — Snapshot & Backup

Snapshot via Xen Orchestra

  1. Pilih VM
  2. Klik Snapshot
  3. Beri nama snapshot
  4. Klik Create

Snapshot via CLI

# Buat snapshot
xe vm-snapshot uuid=VM-UUID new-name-label="before-update"

# List snapshot
xe snapshot-list

# Revert ke snapshot
xe snapshot-revert snapshot-uuid=SNAPSHOT-UUID

Remote Access via ZeroTier

Akses XCP-NG dan Xen Orchestra dari mana saja:

ZeroTier IP MikroTik:8080 → XCP-NG / Xen Orchestra 192.168.1.11:80

Lihat panduan lengkapnya di ZeroTier + MikroTik dst-nat.

Troubleshooting

Tidak Bisa Login ke Xen Orchestra

# Cek status Xen Orchestra
systemctl status xo-server

# Restart jika perlu
systemctl restart xo-server

VM Tidak Bisa Start

# Cek log
xe vm-param-get uuid=VM-UUID param-name=last-boot-CPU-flags

# Cek event log
xe event-list class=vm

Referensi

Sudah Selesai Mempelajari Modul Ini?

Tandai modul ini untuk mencatat progress belajar Anda.