[pve-devel] [PATCH 1/2] fix LXC backup after changing lxc to pct conf

Wolfgang Link w.link at proxmox.com
Fri Aug 7 09:49:51 CEST 2015


---
 src/PVE/API2/LXC.pm  | 2 +-
 src/PVE/LXCCreate.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 17cb0a6..93ab537 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -309,7 +309,7 @@ __PACKAGE__->register_method({
 	    eval {
 		if (!defined($disksize)) {
 		    if ($restore) {
-			my (undef, $disksize) = PVE::LXCCreate::recover_config($archive);
+			(undef, $disksize) = PVE::LXCCreate::recover_config($archive);
 			die "unable to detect disk size - please specify with --size\n"
 			    if !$disksize;
 		    } else {
diff --git a/src/PVE/LXCCreate.pm b/src/PVE/LXCCreate.pm
index 1c92b20..0da146e 100644
--- a/src/PVE/LXCCreate.pm
+++ b/src/PVE/LXCCreate.pm
@@ -108,7 +108,7 @@ sub recover_config {
 
     if ($conf_file =~ m/pct\.conf/) {
 
-	$conf = PVE::LXC::parse_lxc_config("/lxc/0/config" , $raw);
+	$conf = PVE::LXC::parse_pct_config("/lxc/0.conf" , $raw);
 
 	delete $conf->{snapshots};
 	
-- 
2.1.4





More information about the pve-devel mailing list