]> git.proxmox.com Git - pve-container.git/blobdiff - src/PVE/LXC.pm
Fix #1547: on migration abort, the CT starts again
[pve-container.git] / src / PVE / LXC.pm
index 80d79e19c2bf9dd2323fefe1b50b2037f6dc773a..b03e726ff29f2bd0a2879dec095dea39ffec1698 100644 (file)
@@ -1515,6 +1515,20 @@ sub userns_command {
     return [];
 }
 
+sub vm_start {
+    my ($vmid, $conf, $skiplock) = @_;
+
+    update_lxc_config($vmid, $conf);
+
+    local $ENV{PVE_SKIPLOCK}=1 if $skiplock;
+
+    my $cmd = ['systemctl', 'start', "pve-container\@$vmid"];
+
+    PVE::Tools::run_command($cmd);
+
+    return;
+}
+
 # Helper to stop a container completely and make sure it has stopped completely.
 # This is necessary because we want the post-stop hook to have completed its
 # unmount-all step, but post-stop happens after lxc puts the container into the