VMware vCloud Director Cannot Import VM to vApp

I ran into an issue recently with vCloud Director 8.20.0.5070630 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 8.2.0.5301496 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

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:

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 8.20.0.5070630

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:

1

2

cd/tmp

chmod+xvmware-vcloud-director-distribution-8.20.0-5301963.bin

Once it has the eXecute permission we can type in:

1

./vmware-vcloud-director-distribution-8.20.0-5301963.bin

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:

1

/opt/vmware/vcloud-director/bin/upgrade

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:

1

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 8.20.0.5301496

Now I am able to import a virtual machine from vCenter into an existing vCloud Director vApp.