Commit 4711b80c authored by Dietmar Maurer's avatar Dietmar Maurer

fix openvz memory setting

parent d07f49c3
......@@ -737,10 +737,16 @@ __PACKAGE__->register_method({
}
}
if (defined($conf->{swappages})) {
$conf->{memory} = $veconf->{physpages}->{lim} ?
int(($veconf->{physpages}->{lim} * 4)/ 1024) : 512;
$conf->{swap} = $veconf->{swappages}->{lim} ?
int(($veconf->{swappages}->{lim} * 4)/1024) : 0;
} else {
$conf->{memory} = $veconf->{vmguarpages}->{bar} ?
int(($veconf->{vmguarpages}->{bar} * 4)/ 1024) : 512;
$conf->{swap} = 0;
}
my $diskspace = $veconf->{diskspace}->{bar} || LONG_MAX;
if ($diskspace == LONG_MAX) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment