diff --git a/.gitignore b/.gitignore index 0eaa9b2..c3186c3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ proxmox-cloud-image *.dylib *.test *.out +*.qcow2 go.work diff --git a/config.yaml b/config.yaml index 559ae82..89c0db2 100644 --- a/config.yaml +++ b/config.yaml @@ -1,10 +1,10 @@ -image_url: "https://dl.rockylinux.org/pub/rocky/8/images/x86_64/Rocky-8-GenericCloud-Base.latest.x86_64.qcow2" -vm_name: "cloudimg-rocky-stream-8" +image_url: "/home/othman/Projects/proxmox-tools/templates/iso/AlmaLinux-9-GenericCloud-latest.x86_64.qcow2" +vm_name: "cloud-image-alma-8" vm_id: 0 storage: "local" memory: 1024 cores: 1 -disk_size: "40G" +disk_size: "10G" bridge: "vmbr1" vlan_tag: 301 proxmox_host: "10.10.26.11" diff --git a/install.sh b/install.sh index a7b5a4a..112e9b7 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ set -e INSTALL_DIR="/usr/local/bin" -BINARY_NAME="proxmox-cloud-image" +BINARY_NAME="pib" REPO_URL="https://github.com/yourusername/proxmox-cloud-image" echo "==========================================" diff --git a/pib b/pib new file mode 100755 index 0000000..48f34ce Binary files /dev/null and b/pib differ diff --git a/proxmox.go b/proxmox.go index 7656a6d..3958b60 100644 --- a/proxmox.go +++ b/proxmox.go @@ -134,6 +134,7 @@ func createProxmoxVM(config *Config) error { "--memory", fmt.Sprintf("%d", config.Memory), "--cores", fmt.Sprintf("%d", config.Cores), "--net0", buildNetworkConfig(config), + "--cpu", "host", } fmt.Printf("Running: %s\n", strings.Join(createCmd, " ")) @@ -195,19 +196,19 @@ 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 + // Install Qemu Guest Agent if requested if config.GuestAgent { - commands = append(commands, []string{ - "qm", "set", fmt.Sprintf("%d", config.VMID), - "--agent", "enabled=1", - }) + 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),