fix qemu-gues-agent issue and redhat based images
This commit is contained in:
13
proxmox.go
13
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),
|
||||
|
||||
Reference in New Issue
Block a user