]> git.proxmox.com Git - qemu-server.git/commitdiff
cleanup balloon after start call
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 14 May 2018 12:03:05 +0000 (14:03 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 22 May 2018 11:23:29 +0000 (13:23 +0200)
the not definedness check is unecessary here, since it does not
do anything then, and to check balloon twice is also not necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/QemuServer.pm

index 2a07bcecd87ec56bffc793db24eaf96bb4ae120b..648a5f8096f4f779882760463fb615e538c84c6b 100644 (file)
@@ -4922,10 +4922,8 @@ sub vm_start {
            }
 
        } else {
-           if (!$statefile && (!defined($conf->{balloon}) || $conf->{balloon})) {
-               vm_mon_cmd_nocheck($vmid, "balloon", value => $conf->{balloon}*1024*1024)
-                   if $conf->{balloon};
-           }
+           vm_mon_cmd_nocheck($vmid, "balloon", value => $conf->{balloon}*1024*1024)
+               if !$statefile && $conf->{balloon};
 
            foreach my $opt (keys %$conf) {
                next if $opt !~  m/^net\d+$/;