diff --git a/README.md b/README.md index 6f9619f..e9cfc31 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ Tool untuk membuat **template** di Proxmox menggunakan cloud image (Ubuntu, Debi - Otomatis create template di Proxmox - Support konfigurasi via CLI flags atau YAML file - Progress bar untuk download +- **QEMU Guest Agent support** (auto-enable) +- **Firewall configuration** (enable/disable) ## Requirements @@ -59,7 +61,9 @@ proxmox-cloud-image \ -cores 2 \ -disk-size "20G" \ -bridge "vmbr0" \ - -ssh-key "/root/.ssh/id_rsa.pub" + -ssh-key "/root/.ssh/id_rsa.pub" \ + -guest-agent \ + -firewall ``` ### Auto-find VM ID (mulai dari 10000): @@ -68,11 +72,10 @@ proxmox-cloud-image \ proxmox-cloud-image \ -image-url "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img" \ -vm-name "ubuntu-template" \ - -proxmox-host "192.168.1.100" + -proxmox-host "192.168.1.100" \ + -guest-agent ``` -Kalo `-vm-id` tidak diisi atau diset `0`, tool akan otomatis cari VM ID kosong mulai dari 10000. - ### Dengan VLAN: ```bash @@ -82,7 +85,9 @@ proxmox-cloud-image \ -vm-id 9000 \ -proxmox-host "192.168.1.100" \ -bridge "vmbr0" \ - -vlan-tag 100 + -vlan-tag 100 \ + -guest-agent \ + -firewall ``` ### Menggunakan config file: @@ -105,6 +110,9 @@ vlan_tag: 100 ssh_key: "/root/.ssh/id_rsa.pub" proxmox_host: "192.168.1.100" proxmox_user: "root@pam" +proxmox_pass: "" +guest_agent: true +firewall: true ``` ### Batch mode (multiple templates): @@ -162,6 +170,8 @@ proxmox-cloud-image -batch batch.txt | `-proxmox-host` | - | IP/hostname Proxmox (required) | | `-proxmox-user` | root@pam | Proxmox user | | `-proxmox-pass` | - | Proxmox password | +| `-guest-agent` | false | Enable QEMU Guest Agent | +| `-firewall` | false | Enable Proxmox firewall | ## How It Works @@ -171,7 +181,31 @@ proxmox-cloud-image -batch batch.txt 4. Create VM menggunakan `qm` commands 5. Import disk dan configure VM 6. Setup cloud-init -7. **Convert VM menjadi template** dengan `qm template` +7. **Enable QEMU Guest Agent** (jika di-enable) +8. **Enable Proxmox firewall** (jika di-enable) +9. **Convert VM menjadi template** dengan `qm template` + +## QEMU Guest Agent + +QEMU Guest Agent adalah service yang berjalan di guest OS untuk: +- IP address discovery +- Graceful shutdown/reboot +- File system freeze/thaw +- Time synchronization + +Enable dengan flag `-guest-agent` atau di config file: +```yaml +guest_agent: true +``` + +## Proxmox Firewall + +Proxmox firewall bisa di-enable untuk template dengan flag `-firewall` atau di config file: +```yaml +firewall: true +``` + +Firewall akan di-enable di network interface VM. ## Clone Template @@ -190,7 +224,8 @@ qm start 100 - Pastikan SSH key sudah di-setup untuk passwordless login - Image akan di-download ke `/tmp` dan di-upload ke Proxmox - Template tidak bisa di-start, harus di-clone dulu +- QEMU Guest Agent akan otomatis ter-install di guest OS yang support ## License -MIT +MIT \ No newline at end of file diff --git a/main.go b/main.go index 96f9e33..1c91efc 100644 --- a/main.go +++ b/main.go @@ -20,6 +20,8 @@ type Config struct { ProxmoxHost string `yaml:"proxmox_host"` ProxmoxUser string `yaml:"proxmox_user"` ProxmoxPass string `yaml:"proxmox_pass"` + GuestAgent bool `yaml:"guest_agent"` + Firewall bool `yaml:"firewall"` } func main() {