VM Auto Discovery in vCloud Director 9 – Need help?

vCloud Director has been adding an Auto Discovery feature for VMs in version 8.20 and it’s available for some time now. It’s a cool feature that can simplify migrations, but in practice there are some pitfalls that can make things difficult. To be more concrete: It only works under certain conditions. Tom Fojta has written an article about this feature some time ago (Thanks, Tom). But I think some details are missing and  that inspired me to post this.

First of all you have to activate this feature. If you are logged in as System Administrator in the Web GUI, the setting for this can be found under the “Miscellaneous” section in “Administration” -> “General”.


VM Auto Discovery Option

What do I need to know about the Auto Discovery Feature?

vCloud Director can only discover VMs that are in the folder and resource pool structure of a Provider VDC. You must therefore move the VMs to a subfolder of the Provider VDC and to the correct resource pool.

I have also made the experience that it’s best to change the vNIC network to the right Org network portgroup before moving the VM to the correct folder and resource pool.

Once the VM Auto Discovery option is enabled, the VM has been moved to the correct locations and the network set to a portgroup which vCD knows, the automatic import can only fail because of 3 things:

  • By default, there is a 3600 second timer in vCloud Director that notices that the VM has been reconfigured and waits for 3600 seconds. (Honestly, I don’t get the point either, but that’s the way it is.)
  • VM tools are not installed.
  • The hostname in the operating system is longer than 15 characters.

Fortunately, you can do something about these 3 points. VMware Tools can be installed in advance and the hostname can be shortened temporarily. And for this 3600 seconds wait period there is an advanced config option in vCD. So you can reduce this timer to 60 seconds.

The config option is: managed-vapp.discovery.retry-delay-sec

You can change it via the cell-management tool:

./cell-management-tool manage-config -n managed-vapp.discovery.retry-delay-sec -v 60

This will set the retry delay to 60 seconds.

What can I do if it doesn’t work yet?

In the cell-management-tool there is an option which is very helpful in case of errors with the vCenter VM Discovery.

./cell-management-tool debug-auto-import --vm {VMNAME}


./cell-management-tool debug-auto-import --org {ORGNAME}

Otherwise you can also find out the moref Id of the VM and search for this string in the vCD log file (vcloud-container-debug.log).


Leave a Reply

Your email address will not be published. Required fields are marked *