[pve-devel] [PATCH V2 qemu-server 1/2] restore firewall config from backup

Wolfgang Link w.link at proxmox.com
Wed Nov 25 10:20:04 CET 2015


---
 PVE/QemuServer.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index e5c8e0d..1c89684 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5303,6 +5303,10 @@ sub restore_vma_archive {
 	my $fh = IO::File->new($cfgfn, "r") ||
 	    "unable to read qemu-server.conf - $!\n";
 
+	if (-e "$tmpdir/firewall.fw") {
+	    PVE::Tools::file_copy("$tmpdir/firewall.fw", "/etc/pve/firewall/$vmid.fw");
+	};
+
 	while (defined(my $line = <$fh>)) {
 	    if ($line =~ m/^\#qmdump\#map:(\S+):(\S+):(\S*):(\S*):$/) {
 		my ($virtdev, $devname, $storeid, $format) = ($1, $2, $3, $4);
-- 
2.1.4




More information about the pve-devel mailing list