add qemu-guest-agent as default enabled
This commit is contained in:
@@ -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)},
|
||||
|
||||
Reference in New Issue
Block a user