add qemu-guest-agent as default enabled

This commit is contained in:
2025-11-16 18:24:01 +07:00
parent 1655151d29
commit fa0fce5e06
2 changed files with 6 additions and 4 deletions

View File

@@ -54,6 +54,9 @@ func buildNetworkConfig(config *Config) string {
if config.VlanTag > 0 {
netConfig += fmt.Sprintf(",tag=%d", config.VlanTag)
}
if config.Firewall {
netConfig += ",firewall=1"
}
return netConfig
}
@@ -196,9 +199,8 @@ func createProxmoxVM(config *Config) error {
},
}
if config.Firewall {
commands = append(commands, []string{"qm", "set", fmt.Sprintf("%d", config.VMID), "--firewall", "1"})
}
// Firewall is now handled as part of the network config (buildNetworkConfig),
// so no separate "qm set --firewall" command is required here.
commands = append(commands, [][]string{
{"qm", "template", fmt.Sprintf("%d", config.VMID)},