VMware Cloud Community
Brett_Riverboat
Contributor
Contributor

Difference between export from vSphere and export via vSphere PowerCLI

Hi, 

Every now and again, I have to export a lot of VMs to a local location as single .ova files. Previously, I have done this manually by using the vSphere client to login to vCenter then clicking File --> Export and going from there. This was very boring though so I thought I might be able to script it using vSphere PowerCLI and the Export-VApp command. Which seemed to work fine. But I did a little digging on the resulting .ova files (basically opened them with 7zip) and there are differences:

If I export manually it lists the vmdk as <vmname>_disk1.vmdk  but if I do it through the Export-VApp command it's listed as <vmname>_disk0.vmdk (there is only 1 vmdk per VM so I don't know why there's a difference?)

Also, the mf file lists different hash values for the exported files.

So...is there a difference between the way the vSphere client will export vs the Export-VApp command?

Thanks

0 Kudos
2 Replies
NateNateNAte
Hot Shot
Hot Shot

I'm not sure why the CLI export starts as disk 0, honestly I hadn't paid it that much attention. If we could look at the code, we might see that CLI reserve starts at 0 and vCS reserve starts at 1, but that's just a guess.

As for the hash - do you mean the has is different between the CLI vs the vCS export?  Then yes, those will always be different.  If you were to tell me that the hash value from a CLI export was different when you read the file on a new import...THEN I would be concerned. 

And if the exported VMs are working, I think mostly you might have uncovered some code differences, but as long as the .ova still works, and you document the differences in some policy or management document you might use, it should be fine.

Brett_Riverboat
Contributor
Contributor

Thank you for the reply.

Yes, the hashes are different when comparing the outputs from the CLI method vs the manual from vSphere method, however in both cases the resulting ova files re-import and power on just fine. Is there a particular reason why they are different? I would have thought the same VM being exported to the same output format would result in exactly the same set of files.

With regard to the vmdk numbering...it's a head scratcher but as I say, they power on just fine so I guess it's not an issue.

Cheers

0 Kudos