--- PVE/QemuServer.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index d10e1e5..88e288c 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5476,7 +5476,11 @@ sub restore_vma_archive { "unable to read qemu-server.conf - $!\n"; my $fwcfgfn = "$tmpdir/qemu-server.fw"; - PVE::Tools::file_copy($fwcfgfn, "/etc/pve/firewall/$vmid.fw") + my $pve_firewall_dir = '/etc/pve/firewall/'; + + mkdir $pve_firewall_dir if (!-f '$pve_firewall_dir'); + + PVE::Tools::file_copy($fwcfgfn, "${pve_firewall_dir}/$vmid.fw") if -f $fwcfgfn; while (defined(my $line = <$fh>)) { -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel