[pve-devel] ovf duplicate AddressOnParent

px at jack.fr.eu.org px at jack.fr.eu.org
Wed Dec 2 14:50:51 CET 2020


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




More information about the pve-devel mailing list