Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
---
 src/PVE/API2/LXC.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 6652e2e..ebe8f18 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1671,13 +1671,15 @@ __PACKAGE__->register_method({
 
            return if $size == $newsize;
 
+           $newsize = PVE::Tools::convert_size($newsize, "b" => "kb");
+
            PVE::Cluster::log_msg('info', $authuser, "update CT $vmid: resize 
--disk $disk --size $sizestr");
            my $realcmd = sub {
                # Note: PVE::Storage::volume_resize doesn't do anything if 
$running=1, so
                # we pass 0 here (parameter only makes sense for qemu)
                PVE::Storage::volume_resize($storage_cfg, $volid, $newsize, 0);
 
-               $mp->{size} = $newsize;
+               $mp->{size} = $newsize * 1024;
                $conf->{$disk} = PVE::LXC::Config->print_ct_mountpoint($mp, 
$disk eq 'rootfs');
 
                PVE::LXC::Config->write_config($vmid, $conf);
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to