* [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
* Re: [pve-devel] ovf duplicate AddressOnParent
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
0 siblings, 1 reply; 5+ messages in thread
From: Dominic Jäger @ 2020-12-03 7:36 UTC (permalink / raw)
To: Proxmox VE development discussion
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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pve-devel] ovf duplicate AddressOnParent
2020-12-03 7:36 ` Dominic Jäger
@ 2020-12-21 15:32 ` alexandre derumier
2020-12-21 15:45 ` Thomas Lamprecht
0 siblings, 1 reply; 5+ messages in thread
From: alexandre derumier @ 2020-12-21 15:32 UTC (permalink / raw)
To: pve-devel
On 03/12/2020 08:36, Dominic Jäger wrote:
> 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...
Hi,
I wonder if the current proxmox ovs parser is not wrong.
Seem than "adressOnParent" is the pci controller.
So, it's working fine for nic, but for disks , if ovf have multiple
disks on same controller, it'll be always the same AddressOnParent.
I'll to check with differents hypervisors ovf export to be sure.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pve-devel] ovf duplicate AddressOnParent
2020-12-21 15:32 ` alexandre derumier
@ 2020-12-21 15:45 ` Thomas Lamprecht
2020-12-21 17:04 ` alexandre derumier
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Lamprecht @ 2020-12-21 15:45 UTC (permalink / raw)
To: Proxmox VE development discussion, alexandre derumier
On 21/12/2020 16:32, alexandre derumier wrote:
> On 03/12/2020 08:36, Dominic Jäger wrote:
>> 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...
>
> Hi,
>
> I wonder if the current proxmox ovs parser is not wrong.
>
> Seem than "adressOnParent" is the pci controller.
>
> So, it's working fine for nic, but for disks , if ovf have multiple disks on same controller, it'll be always the same AddressOnParent.
>
That would sound likely, but did not actually looked into it.
> I'll to check with differents hypervisors ovf export to be sure.
thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [pve-devel] ovf duplicate AddressOnParent
2020-12-21 15:45 ` Thomas Lamprecht
@ 2020-12-21 17:04 ` alexandre derumier
0 siblings, 0 replies; 5+ messages in thread
From: alexandre derumier @ 2020-12-21 17:04 UTC (permalink / raw)
To: Thomas Lamprecht, Proxmox VE development discussion
mmm, seem that
AddressOnParent is indeed the disk location on the controller,
but on the provided ovf example, they are 2 differents controllers (parent=4 && parent=5)
(I don't known how vmware manage disk, 1controller with multliples disk, or 1controller by disk. Maybe it's related to vm machine version or config.)
But in the proxmox ovf parser, we only handle 1 controller
# extract corresponding Controller node details
my $adress_on_controller = $xpc->findvalue('rasd:AddressOnParent',
$item_node);
my $pve_disk_address = id_to_pve($controller_type) . $adress_on_controller;
that's why we have a conflict here
On 21/12/2020 16:45, Thomas Lamprecht wrote:
> On 21/12/2020 16:32, alexandre derumier wrote:
>> On 03/12/2020 08:36, Dominic Jäger wrote:
>>> 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...
>> Hi,
>>
>> I wonder if the current proxmox ovs parser is not wrong.
>>
>> Seem than "adressOnParent" is the pci controller.
>>
>> So, it's working fine for nic, but for disks , if ovf have multiple disks on same controller, it'll be always the same AddressOnParent.
>>
> That would sound likely, but did not actually looked into it.
>
>> I'll to check with differents hypervisors ovf export to be sure.
> 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