[pve-devel] [PATCH container 1/6] clone_vm: use move_config_to_node

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jun 18 14:51:18 CEST 2021


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 src/PVE/API2/LXC.pm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 4dd692d..9865a6b 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1571,9 +1571,7 @@ __PACKAGE__->register_method({
 			PVE::Storage::deactivate_volumes($storecfg, $vollist, $snapname) if !$running;
 			PVE::Storage::deactivate_volumes($storecfg, $newvollist);
 
-			my $newconffile = PVE::LXC::Config->config_file($newid, $target);
-			die "Failed to move config to node '$target' - rename failed: $!\n"
-			    if !rename($conffile, $newconffile);
+			PVE::LXC::Config->move_config_to_node($newid, $target);
 		    }
 		});
 	    };
-- 
2.30.2






More information about the pve-devel mailing list