From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <d.jaeger@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 89D12606E0
 for <pve-devel@lists.proxmox.com>; Thu,  3 Dec 2020 08:36:10 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 7B82E243EA
 for <pve-devel@lists.proxmox.com>; Thu,  3 Dec 2020 08:36:10 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [212.186.127.180])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id E865A243DF
 for <pve-devel@lists.proxmox.com>; Thu,  3 Dec 2020 08:36:05 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id AFB8B44349;
 Thu,  3 Dec 2020 08:36:05 +0100 (CET)
Date: Thu, 3 Dec 2020 08:36:04 +0100
From: Dominic =?iso-8859-1?Q?J=E4ger?= <d.jaeger@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Message-ID: <20201203073603.GA455757@mala.proxmox.com>
References: <a22cf741-c1b6-309f-eecc-2149d4c23d45@jack.fr.eu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <a22cf741-c1b6-309f-eecc-2149d4c23d45@jack.fr.eu.org>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-SPAM-LEVEL: Spam detection results:  0
 AWL 1.702 Adjusted score from AWL reputation of From: address
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 RCVD_IN_DNSWL_MED        -2.3 Sender listed at https://www.dnswl.org/,
 medium trust
 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] ovf duplicate AddressOnParent
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 03 Dec 2020 07:36:10 -0000

Please try changing the AddressOnParent values so that they are unique.
As you mentioned, the disks should then be attached with different numbers scsi0, scsi1, scsi2...

If it still doesn't work, then you can also create a VM and add each disk manually by using qm importdisk. For example,
qm importdisk 110 /path/to/your/disk.vmdk local
adds disk.vmdk as unused disk to VM 110 on storage local. You can then double click it in the GUI. This will open a wizard where you can select where you want to attach it to.

On Wed, Dec 02, 2020 at 02:50:51PM +0100, px@jack.fr.eu.org wrote:
> And indeed, in the OVF file:
>       <Item>
>         <rasd:AddressOnParent>0</rasd:AddressOnParent>
>         <rasd:ElementName>Hard disk 1</rasd:ElementName>
>         <rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
>         <rasd:InstanceID>11</rasd:InstanceID>
>         <rasd:Parent>5</rasd:Parent>
>         <rasd:ResourceType>17</rasd:ResourceType>
>         <vmw:Config ovf:required="false" vmw:key="backing.writeThrough"
> vmw:value="false"/>
>       </Item>
>       <Item>
>         <rasd:AddressOnParent>0</rasd:AddressOnParent>
>         <rasd:ElementName>Hard disk 2</rasd:ElementName>
>         <rasd:HostResource>ovf:/disk/vmdisk2</rasd:HostResource>
>         <rasd:InstanceID>12</rasd:InstanceID>
>         <rasd:Parent>4</rasd:Parent>
>         <rasd:ResourceType>17</rasd:ResourceType>
>         <vmw:Config ovf:required="false" vmw:key="backing.writeThrough"
> vmw:value="false"/>
>       </Item>
> 
> -> both disk has the same AddressOnParent, 0, because they do not share the
> same Parent (respectively 5 and 4)
> 
> So now, what should we do ?
> I wonder if we could simply increment that number for each disk found, in
> the loop: first disk gets scsi0, second gets scsi1 etc
>