So there's an implicit limitation in how we obtain the IP address of a newly cloned VM. Currently, when a new VM is cloned, we scan the primary syslog file on the host system, in order to where the DHCP lease occurs and try to obtain the IP address of the clone by looking at DHCPACK and DHCPOFFER lines.
The problem is two-fold:
1) If the log file is rather huge (> 50MB), then this scan could take a non-trivial amount of time to complete (> 10s). One interim fix to this, would be to only 'tail' the log file, rather than scan it completely.
2) In the slight chance that the log file undergoes log-rotation while we are scanning for these DHCP messages, then we could miss them entirely (very unlikely, but possible). If this happens, then the StartManager.pl call will hang until the clone VM obtains a new DHCP lease (~10mins).
A better method of fixing this would probably be one that doesn't rely on syslog messages. Instead, we'd probably want to manually parse the dhcpd.leases file, located at /etc/vmware/vmnet1/dhcpd/dhcpd.leases. We could use the following perl library to perform this operation:
http://search.cpan.org/~cvicente/Text-DHCPLeases-v0.5/