The other day I was rebuilding my lab using William Lam’s vGhetto vSphere Automated Lab Deployment script for vSphere 6.5. In the past I have run the 6.0 script successfully. As part of the script, there is an OVA of a host profile that William has made for the deployment, this is used for the configuration of the host.
This particular time I came across an error right after starting the process and immediately after connecting to the nesting host. It was a bit of a strange error, pointing to the Import-vApp cmdlet but also saying, “Invalid URI: The hostname could not be parsed,” which sounded as though to be a DNS issue, I spent a little bit of time going through my DNS settings, making sure that the computer from which I was running the script was able to resolve the hostname. I moved off my MacBook using PowerCLI Core and tested from my Windows machine using PowerCLI 10.0, and received the same error.
I did some quick research and found nothing related to the specific error message and started to look at it piece by piece. I decided to pull apart the OVA file and try and run just the OVF – SUCCESS! There appears to be an issue with the OVA and the Import-vApp cmdlet in both PowerCLI Core and PowerCLI 10.0. I am yet to test the OVA in vSphere via the WebClient, but I suspect it may work as it should.
To pull apart the OVA, I recommend using 7ZIP and opening the .ova file and copy/paste the content.
- Download and Install 7ZIP
- Relaunch explorer
- right click OVA file -> 7ZIP -> extract to /<foldername>
- check for the VMDK, OVF and description file are all present
- Change your ESXI $NestedESXiApplianceOVA= to the .ovf file
- rerun script.
i have this problem . how i can solve it?
Please explain more
Hi,
You can see the steps at the bottom of the blog post. I have since updated this to make it a little more clearer.
Thanks a lot for this! I was fighting with the script for hours!
This is the power of #vCommunity
Cheers!
–VC
Thanks Valdecir, Glad it could help.
Thank for your Solution.
We have the same problem and need to deploy OVAs. I posted this on the PowerCLI forums here: https://communities.vmware.com/message/2772062
Hi,
Can you explain breif on point no 5 & 6
Thanks
Kannan S
Hi Kannan,
Step 5 is to update the William Lam deployment script mentioned in the first paragraph, as the line $NestedESXiApplianceOVA= from the default script points to the ova package and once you unzip the ova and present the .ovf and supporting files, you will need to redirect that cmdlet to look at the .ovf
In regards to 6, it just means, run the script once you’ve updated the file location to point to the ovf file.
Hope that explains it better.
Cheers mate. Had the same issue and your solution did the trick
Thank you, this post just saved me a couple hours of tearing my hair out trying to figure out why it wasn’t deploying.
Glad you could keep your hair!
areyou kidding me!! this fixed it (using the vghetto nested ps script)! thank you SO MUCH, i would never have though to try this, even though i saw other pages/posts saying there are problems with OVA files and powerCLI vm-deply .
really, thank you for taking the time to write this post!
No worries. Just glad to see it is helping people. Feel free to share with others.