[pve-devel] [PATCH] Fix mem ans swap size when converted from OpenVz.

Wolfgang Link w.link at proxmox.com
Fri Aug 7 11:35:34 CEST 2015


---
 src/PVE/VZDump/ConvertOVZ.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/VZDump/ConvertOVZ.pm b/src/PVE/VZDump/ConvertOVZ.pm
index 72f1c0d..dedd640 100644
--- a/src/PVE/VZDump/ConvertOVZ.pm
+++ b/src/PVE/VZDump/ConvertOVZ.pm
@@ -304,9 +304,9 @@ sub convert_ovz {
    
    my ($mem, $swap) = ovz_config_extract_mem_swap($ovz_conf, 0);
 
-   $conf->{memory} = $mem;
+   $conf->{memory} = $mem / 1024 / 1024;
 
-   $conf->{swap} = ($swap + $mem);
+   $conf->{swap} = ($swap + $mem) / 1024 / 1024;
 
    $conf->{cpuunits} = 1024;
 
-- 
2.1.4





More information about the pve-devel mailing list