From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id C6ED81FF348 for ; Wed, 17 Apr 2024 15:15:49 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0BB2477D8; Wed, 17 Apr 2024 15:15:50 +0200 (CEST) Message-ID: Date: Wed, 17 Apr 2024 15:15:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Fiona Ebner , Proxmox VE development discussion References: <20240416131909.2867605-1-d.csapak@proxmox.com> <20240416131909.2867605-7-d.csapak@proxmox.com> <77f78419-1a19-44e8-ade2-3b2210bf94b6@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <77f78419-1a19-44e8-ade2-3b2210bf94b6@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL 0.014 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH storage 6/9] ovf: implement rudimentary boot order X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" On 4/17/24 13:54, Fiona Ebner wrote: > Am 16.04.24 um 15:18 schrieb Dominik Csapak: >> simply add all parsed disks to the boot order in the order we encounter >> them (similar to the esxi plugin). >> >> Signed-off-by: Dominik Csapak >> --- >> src/PVE/Storage/OVF.pm | 6 ++++++ >> src/test/run_ovf_tests.pl | 3 +++ >> 2 files changed, 9 insertions(+) >> >> diff --git a/src/PVE/Storage/OVF.pm b/src/PVE/Storage/OVF.pm >> index f56c34d..f438de2 100644 >> --- a/src/PVE/Storage/OVF.pm >> +++ b/src/PVE/Storage/OVF.pm >> @@ -245,6 +245,8 @@ sub parse_ovf { >> # when all the nodes has been found out, we copy the relevant information to >> # a $pve_disk hash ref, which we push to @disks; >> >> + my $boot = []; > > Nit: might be better to name it more verbosely since it's a long > function, e.g. boot_order, boot_disk_keys, or similar > >> + >> foreach my $item_node (@disk_items) { >> >> my $disk_node; >> @@ -348,6 +350,10 @@ ovf:Item[rasd:InstanceID='%s']/rasd:ResourceType", $controller_id); >> }; >> $pve_disk->{virtual_size} = $virtual_size if defined($virtual_size); >> push @disks, $pve_disk; >> + push @$boot, $pve_disk_address; >> + } > > This bracket should not be here and the next line below the next bracket > (fixed by the next patch). > >> + >> + $qm->{boot} = "order=" . join(';', @$boot); > > Won't this fail later if there are no disks? yes, oops, will check if boot(_order) is empty _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel