]> git.proxmox.com Git - pve-container.git/commitdiff
create_disks: don't drop extra parameters
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 25 Nov 2015 14:25:16 +0000 (15:25 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 26 Nov 2015 11:20:12 +0000 (12:20 +0100)
When using the 'storage:size' notation to allocate a disk we
only modify the volume id, so it makes sense to just update
this along with the size rather than creating a new hash
which would drop extra parameters such as 'backup=yes'.

src/PVE/LXC.pm

index 33a4f6338cb360bd076aabe3ea1413fd742eddf9..ec2d69ffb426692c566da69f1d8a69ef055bd7c8 100644 (file)
@@ -2332,8 +2332,9 @@ sub create_disks {
                    die "unable to create containers on storage type '$scfg->{type}'\n";
                }
                push @$vollist, $volid;
-                my $new_mountpoint = { volume => $volid, size => $size_kb*1024, mp => $mp };
-               $conf->{$ms} = print_ct_mountpoint($new_mountpoint, $ms eq 'rootfs');
+               $mountpoint->{volume} = $volid;
+               $mountpoint->{size} = $size_kb * 1024;
+               $conf->{$ms} = print_ct_mountpoint($mountpoint, $ms eq 'rootfs');
            } else {
                # use specified/existing volid
            }