vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.26k stars 896 forks source link

[BUG] Export to ovf makes a bad ovf file #3440

Open mdelazza opened 1 month ago

mdelazza commented 1 month ago

Describe the bug ovf file has wrong file references size e.g. `

<File ovf:href="vm-disk-1.vmdk" ovf:id="file2" ovf:size="92341796864"/>
<File ovf:href="vm-disk-2.vmdk" ovf:id="file3" ovf:size="92341796864"/>

must be:

<File ovf:href="vm-disk-1.vmdk" ovf:id="file2" ovf:size="3832659456"/>
<File ovf:href="vm-disk-2.vmdk" ovf:id="file3" ovf:size="6024260608"/>

`

92341796864 is the size of the whole VM To Reproduce Steps to reproduce the behavior:

./govc export.ovf -vm=xxx -k=true -f=true /tmp

Expected behavior file size must be correct

Affected version latest

github-actions[bot] commented 1 month ago

Howdy 🖐   mdelazza ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.