public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] ovf duplicate AddressOnParent
@ 2020-12-02 13:50 px
  2020-12-03  7:36 ` Dominic Jäger
  0 siblings, 1 reply; 5+ messages in thread
From: px @ 2020-12-02 13:50 UTC (permalink / raw)
  To: pve-devel

Hello,

We are moving VMs from vmware to proxmox
The process follows:
- export the VM using ovftool
- import using qm importovf

We are facing an issue on multi-disk VM: all the disks are attached as 
scsi0 (which fails, and abort the process)

 From /usr/share/perl5/PVE/CLI/qm.pm, that value came from 
PVE::QemuServer::OVF::parse_ovf

And from /usr/share/perl5/PVE/QemuServer/OVF.pm, that value came from 
rasd:AddressOnParent, from the OVF file

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)

Parents are, according to the OVF's spec, "The InstanceID of the parent 
controller"

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

Thanks



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-21 17:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-02 13:50 [pve-devel] ovf duplicate AddressOnParent px
2020-12-03  7:36 ` Dominic Jäger
2020-12-21 15:32   ` alexandre derumier
2020-12-21 15:45     ` Thomas Lamprecht
2020-12-21 17:04       ` alexandre derumier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal