I ran into an issue recently with vCloud Director 18.104.22.16870630 while trying to import a virtual machine from vCenter into a vApp. The Import VM into vApp window appeared, I filled out all the info and when I click on OK, vCloud produced a class java.lang.NullPointerException error.
VMware vCloud Director Cannot Import VM to vApp Fix
I did some investigation within the communities and blog sites but could not find anything. I also checked through the vCloud logs (/opt/vmware/vcloud-director/logs/vcloud-container-info.log) where I found the errors.
After not being able to resolve the issue, I had no choice but to log a VMware support ticket. It turns out that this is a known issue and that a hot-fix patch was being worked on, which was to be released within the next day or 2.
The VMware vCloud Director hot-fix patch updates your build version to 22.214.171.12401496 and resolves the following issues:
- VCD logs showing up false errors
- Import VM to existing vApp fails
- Failure to deploy a VM in compute fabric does not do the appropriate cleanup
- Slowness observed in workflow ‘opening VM Properties’ and ‘opening the Add to My Cloud’ dialogues
- ClusterComputeResourcePropertyAggregatorImpl logging currently excessive
- All context Help links to the User’s Guide are broken in 8.20
How to install the patch to VMware vCloud Director
First up, we are going to shutdown the vCloud Director cell. Once the cell is shutdown we’ll take a backup of the database as well as a VM snapshot of the vCloud Director cell.
Power on the vCloud Director cell
Once the cell has started (monitor the startup process by viewing the cell.log – tail -f /opt/vmware/vcloud-director/logs/cell.log), we then put the cell into maintenance mode by typing the following command:
/opt/vmware/vcloud-director/bin/cell-management-tool -u administrator cell --shutdown
You will be prompted to enter in the administration password, as you can see in the screenshot below
Click on Help – About we can see that my current version of vCloud Director is 126.96.36.19970630
Download the bin file from VMware. I got the download link from the VMware engineer I was working with, unfortunately the download link expired in 2 days, so if you need the same patch, best bet would be to log a support ticket with VMware.
Once the file is downloaded, you can use WinSCP to upload the file to /tmp
Next, we’ll make the patch file eXecutable by typing:
chmod + x vmware-vcloud-director-distribution-8.20.0-5301963.bin
Once it has the eXecute permission we can type in:
The upgrade wizard will start.
Type Y to begin the upgrade.
The next part of the patch upgrade willupgrade the database schema. Ensure you have a backup of your database before running the next command. Type in:
When prompted, type Y
Another reminder to backup your database before continuing. Type Y
Once the database schema upgrade is complete you can start the vCloud Director services by typing Y. Highlighted in yellow are the previous commands
Monitor the cell.log, by typing in:
tail -f /opt/vmware/vcloud-director/logs/cell.log
Once you see either Successfully handled all queued events, or Successfully verified transfer spooling area:
Your vCloud Director server is ready to serve clients
To view the new vCloud Director build number, log into vCloud and click on Help – About. You can see the new build number is now 188.8.131.5201496
Now I am able to import a virtual machine from vCenter into an existing vCloud Director vApp.