diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..fc70961 --- /dev/null +++ b/config.yaml @@ -0,0 +1,13 @@ +image_url: "https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-10-latest.x86_64.qcow2" +vm_name: "cloudimg-centos-stream-10" +vm_id: 0 +storage: "local" +memory: 1024 +cores: 1 +disk_size: "10G" +bridge: "vmbr1" +vlan_tag: 301 +proxmox_host: "10.10.26.11" +proxmox_user: "root@pam" +proxmox_pass: "Pnd77net!" +guest_agent: true diff --git a/proxmox-template b/proxmox-template new file mode 100755 index 0000000..279873b Binary files /dev/null and b/proxmox-template differ diff --git a/proxmox.go b/proxmox.go index 27c92b4..6411097 100644 --- a/proxmox.go +++ b/proxmox.go @@ -195,13 +195,21 @@ func createProxmoxVM(config *Config) error { }, {"qm", "set", fmt.Sprintf("%d", config.VMID), "--serial0", "socket", - "--vga", "serial0", + "--vga", "std", }, {"qm", "set", fmt.Sprintf("%d", config.VMID), "--ipconfig0", "ip=dhcp", }, } + // Tambahkan ini + if config.GuestAgent { + commands = append(commands, []string{ + "qm", "set", fmt.Sprintf("%d", config.VMID), + "--agent", "enabled=1", + }) + } + // Firewall is now handled as part of the network config (buildNetworkConfig), // so no separate "qm set --firewall" command is required here.