If I run the command:
Export-VApp -VM 'Test Space' -Destination "D:\Backups\VM\ESXi18\TestSpace.ova" -Format OVA
I very quickly get the error:
Export-VApp: 2/1/2022 10:47:44 AM Export-VApp Object reference not set to an instance of an object.
PS C:\Users\myUserID>
If I change the name of the VM from "Test Space" to "TestSpace" or "Test-Space", it works. If I change the format to OVF (and change the destination to a folder), it works.
Currently I am on 7.0.3c, but I have had this problem since 7.0.0.
Any ideas how to fix it? I am currently saving the production VM (I created TestSpace for troubleshooting) as an OVF as a work around.
I just tested with the latest version of ovftool, and there the export to OVA works when the VM's Displayname has a blank in it.
That looks like a PowerCLI bug.
I suggest opening an SR.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Does the Web Client allow you to do that?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
No, only the OVF option is shown in the web clients. The web client also prompts you to save each file being saved.
I just tested with the latest version of ovftool, and there the export to OVA works when the VM's Displayname has a blank in it.
That looks like a PowerCLI bug.
I suggest opening an SR.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I updated my PowerCLI to the latest release, same error.
At this point my workaround is fine (save as ovf) and I only want to report the problem to VMWare Inc. You recommended I open a Support Request, and I found a 'report a defect' page on VMWares site. The instructions guided me to buy an instance for $308 (quantity discounts available). I do not anticipate doing that. If not, the webpage said to post the incident on the appropriate Community forum. I assume that I have been doing that here and someone is monitoring the site. If I need to do something else, please advise. Otherwise, thank you for your help.
Mike
Yes, you do need a Support Contract to be able to open an SR.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference