From 5fc748614f4fa334fa1000796189689f0d7379ea Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 8 Feb 2018 12:09:24 +0100 Subject: [PATCH] append option to drive if the option is defined if the value was '0', we did not append the option to the drive, resulting in wrong command line if the qemu default of an option is not '0' Signed-off-by: Dominik Csapak --- PVE/QemuServer.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index acd4047a..686c864c 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -1624,7 +1624,7 @@ sub print_drive_full { my $opts = ''; my @qemu_drive_options = qw(heads secs cyls trans media format cache rerror werror aio discard); foreach my $o (@qemu_drive_options) { - $opts .= ",$o=$drive->{$o}" if $drive->{$o}; + $opts .= ",$o=$drive->{$o}" if defined($drive->{$o}); } # snapshot only accepts on|off -- 2.39.5