Skip to content

Commit 35a93a7

Browse files
author
Marius Cramer
committed
Merge branch 'master' into 'master'
resize openvz-server with ploop enabled See merge request !228
2 parents 1ec1fc6 + da9e995 commit 35a93a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/plugins-available/openvz_plugin.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ function vm_update($event_name, $data) {
121121
file_put_contents('/etc/vz/conf/'.$veid.'.conf', $data['new']['config']);
122122
$app->log("Writing new configuration for $veid", LOGLEVEL_DEBUG);
123123

124+
//* new diskspace for ploop-containers requieres "vzctl set"
125+
if($data['new']['diskspace'] != $data['old']['diskspace']) {
126+
exec("vzctl set ".$veid." --diskspace ".$data['new']['diskspace']."G --save");
127+
}
128+
124129
//* Apply config changes to the VM
125130
if($data['new']['active'] == 'y' && $data['old']['active'] == 'y') {
126131
exec("vzctl restart $veid");

0 commit comments

Comments
 (0)