X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=blobdiff_plain;f=PVE%2FAPI2%2FQemu.pm;fp=PVE%2FAPI2%2FQemu.pm;h=2418b7c3cd7a0c34c6bf170b14cb2e37c6527980;hp=fdf1947d234b15c712cf63c66427eae8dde9571b;hb=11c601e9ade17cb3a9c08f32540baf71951f2521;hpb=ca3ac8820078650e52fc517c6bdb1a6a0e6e3d38 diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index fdf1947..2418b7c 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1191,10 +1191,11 @@ my $update_vm_api = sub { my $modified = {}; # record what $option we modify - my $bootcfg = PVE::JSONSchema::parse_property_string('pve-qm-boot', $conf->{boot}) - if $conf->{boot}; - my @bootorder = PVE::Tools::split_list($bootcfg->{order}) - if $bootcfg && $bootcfg->{order}; + my @bootorder; + if (my $boot = $conf->{boot}) { + my $bootcfg = PVE::JSONSchema::parse_property_string('pve-qm-boot', $boot); + @bootorder = PVE::Tools::split_list($bootcfg->{order}) if $bootcfg && $bootcfg->{order}; + } my $bootorder_deleted = grep {$_ eq 'bootorder'} @delete; foreach my $opt (@delete) {