MikeBroderick
Contributor
Contributor

Export-vApp to OVA, VM name containing spaces gives "Object reference not set to an instance..."

Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

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

View solution in original post

0 Kudos
5 Replies
LucD
Leadership
Leadership

Does the Web Client allow you to do that?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
MikeBroderick
Contributor
Contributor

No, only the OVF option is shown in the web clients. The web client also prompts you to save each file being saved.

0 Kudos
LucD
Leadership
Leadership

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

0 Kudos
MikeBroderick
Contributor
Contributor

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

0 Kudos
LucD
Leadership
Leadership

Yes, you do need a Support Contract to be able to open an SR.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos