Florian Schaal
2015-09-14 da9e99596e2fcb76a37fcc8a24c8eacd00ff186c
resize openvz-server with ploop enabled
1 files modified
5 ■■■■■ changed files
server/plugins-available/openvz_plugin.inc.php 5 ●●●●● patch | view | raw | blame | history
server/plugins-available/openvz_plugin.inc.php
@@ -121,6 +121,11 @@
        file_put_contents('/etc/vz/conf/'.$veid.'.conf', $data['new']['config']);
        $app->log("Writing new configuration for $veid", LOGLEVEL_DEBUG);
        //* new diskspace for ploop-containers requieres "vzctl set"
        if($data['new']['diskspace'] != $data['old']['diskspace']) {
            exec("vzctl set ".$veid." --diskspace ".$data['new']['diskspace']."G --save");
        }
        //* Apply config changes to the VM
        if($data['new']['active'] == 'y' && $data['old']['active'] == 'y') {
            exec("vzctl restart $veid");