From c9c32c1ba49392e553d34c4fb8302dbc625de845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 9 Feb 2022 14:07:40 +0100 Subject: [PATCH] update_vm: allow simultaneous setting of boot-order and dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit else this fails if we check 'boot' before the device was put into the config or pending section. Signed-off-by: Fabian Grünbichler --- PVE/API2/Qemu.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index a359d096..9be1caf3 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1411,7 +1411,7 @@ my $update_vm_api = sub { if ($new_bootcfg->{order}) { my @devs = PVE::Tools::split_list($new_bootcfg->{order}); for my $dev (@devs) { - my $exists = $conf->{$dev} || $conf->{pending}->{$dev}; + my $exists = $conf->{$dev} || $conf->{pending}->{$dev} || $param->{$dev}; my $deleted = grep {$_ eq $dev} @delete; die "invalid bootorder: device '$dev' does not exist'\n" if !$exists || $deleted;