- my $filename = "/etc/pve/firewall/$vmid.fw";
- my $fh = IO::File->new($filename, O_RDONLY);
- next if !$fh;
-
- $vmfw_configs->{$vmid} = parse_vm_fw_rules($filename, $fh);
+ my $vmfw_conf = load_vmfw_conf($vmid);
+ next if !$vmfw_conf->{options}; # skip if file does not exists
+ $vmfw_configs->{$vmid} = $vmfw_conf;