In this deploy vCloud Director 10.2.x domain search_path issue I will talk about an issue, personally a bug, in vCD 10.2x.
In previous versions of vCD, when deploying vCloud Director, after we add our domain, the parameter domain search path is not mandatory. And why is that, because vCD will assume our domain as its first domain path search.
Important Note: This issue is only triggered if you are not using DHCP in your vCloud Appliance.
As VMware states in their documentation (for 9.7, 10.1, or 10.2 all the same):
Note:The domain name that you entered in the Domain Name text box is the first element in the domain search path list
So if we add the domain, the domain search path option is optional. But or not anymore and is mandatory, and VMware needs to clearly state that in documentation, or is a bug in this 10.2.x version.
To fully test this issue, I tested in the following versions.
- VMware_vCloud_Director-188.8.131.5223-17135839_OVF10 – works
- VMware_vCloud_Director-10.0.0.4471-14638910_OVF10 – works
- VMware_vCloud_Director-10.0.0.5096-16869394_OVF10 – works
- VMware_Cloud_Director-10.1.1.4916-16288798_OVF10 – works
- VMware_Cloud_Director-10.1.3.5503-17672887_OVF10 – works
- VMware_Cloud_Director-10.2.0.5190-17029810_OVF10 – not working
- VMware_Cloud_Director-10.2.1.5355-17444454_OVF10 – not working
- VMware_Cloud_Director-10.2.2.5821-17855679_OVF10 – not working
What is Domain Search Path?
It is for the appliance hostname lookup. Meaning, all domain lookup is done by vCD will use any domain on that list (we can add the number of domains or subdomains we want).
So is an important part of the vCD deployment. Since vCD uses the IP address to add the hostname to the system. There is no need to add the hostname; the domain lookup adds the hostname on the primary IP.
What is exactly the issue, and where is it set?
In vCD 10.2.x now the deployment is done in two parts. The first part is just deploying the appliance. The second part is done after the vCD appliance is deployed, and then we add the rest of the settings(like NFS path, admin and DB password, etc.)
So when we deploy the vCD in the first part, we need to add the domain search path after the domain parameter.
Issues after deployment that you may notice:
- When you deploy and try to run https://IP-FQDN:5480 to add the rest of the settings service is not running.
- The network could have issues (not reaching eth0).
- SSH is not enabled (even you add the option to enable).
Checking logs, we have this:
root@vcd [ /opt/vmware/var/log ]# cat firstboot
This script is executed on first boot only.
Setting root password...
Temporarily disabling password strength checks...
New password: Retype new password: passwd: password updated successfully
Re-enabling password strength checks...
Checking for all required OVF parameters, for OS Configuration Phase
[ERROR] Not all required parameters for OS phase configuration were provided.
For more details, see: /opt/vmware/var/log/vcd/check-os-params.log
root@vcd [ /opt/vmware/var/log ]# cat /opt/vmware/var/log/vcd/check-os-params.log
Checking ovf parameters needed for proper OS and Network configuration
search_path ovf parameter not specified.
Number of missing parameters: 1
Not all required ovf parameters were specified, therefore skipping os configuration phase.
As we can see above, the error is trigger by the miss domain search path parameter in the ovf deployment.
What to do after? You can redeploy the appliance (it is not taking much time) or add the parameter you missed and rerun the firstboot script.
My recommendation? Just redeploy, don’t start your new vCD by adding extra steps or rerun the firstboot. But if still, you want to add the parameter restart, where is how to do it.
You can first double-check if you had the parameter or not.
You can do this in the VM Appliance options or with a command ovfenv in the appliance console(remember that you may not have ssh enabled, so you need to do this in the VM console).
root@vcd [ ~ ]# ovfenv
As we can see above in the [vami.searchpath.VMware_vCloud_Director] is empty.
To add the parameter: Click on the vCD VM, Configure, and then vApp Options.
Note: VM needs to be power to be able to change vApp Options.
Then search for the option vami.searchpath.VMware_vCloud_Director and click Set and add your domain search path.
After the changes, you can restart the VM.
Since firstboot only runs one time, restarting the VM will not fix the issue. So you need to rerun the script.
The script is in: /opt/vmware/etc/isv/firstboot
This should restart the Appliance deployment.
Note: I found issues a couple of times (like password issue), but in the rest was possible to redeploy the appliance. But again, I recommend redeploying OVA. It is safer and is with a clean install.
I hope this deploy vCloud Director 10.2.x domain search_path issue blog post will help you identify the issue when deploying a vCloud Director after 10.2 versions.
Until VMware changes their documentation stating that this parameter is mandatory or is a bug, they will fix it in the next releases (I have discussed this with VMware and will work on this issue).
Share this article if you think it is worth sharing. If you have any questions or comments, comment here, or contact me on Twitter.