2012-11-11

Guest Customization on Ubuntu 12.04 Fails

I came across an issue today – trying to deploy a Ubuntu Precise VM from a template and applying a customization setting to the VM – with default DHCP configuration.

These are the errors I was getting

deploy error

So first up the second error message is wrong – because the log file should not be <No Log> but rather /var/log/vmware-inc/toolsDeployPkg.log

Going into the log file on the VM I saw the following.

less /var/log/vmware-imc/toolsDeployPkg.log

ERROR: Fatal error occurred during customization !! Customization halted.
ERROR: Error : Could not create file /etc/dhcp3/dhclient.conf!
at /tmp/.vmware/linux/deploy/scripts/Utils.pm line 475.
INFO: Return code is 252.
Customization process returned with error.
Deployment result = 252
Setting generic error status in vmx.
Transitioning from state INPROGRESS to state ERRORED.
ENTER STATE ERRORED
EXIT STATE INPROGRESS
Setting deploy error: Deployment failed. The forked off process returned error code.
Deployment failed. The forked off process returned error code.
Wait before set enable-nics stats in vmx.
Trying to connect network interfaces, attempt 1
Got VMX response 'queryNicsSupported'
Got VMX response 'disconnected'
Got VMX response 'connected'
The network interfaces are connected on 1 second
Launching cleanup.
Command to exec : /bin/rm
sizeof ProcessInternal is 32
Returning, pending output
Returning, pending output
Process exited normally after 0 seconds, returned 0
No more output
No more output
Customization command output:
Deploy error: Deployment failed. The forked off process returned error code.
Package deploy failed in DeployPkg_DeployPackageFromFile
## Closing log

A quick look on Google brought me to this article (in Spanish) describing a similar problem – but with a Debian VM.

The problem is that the VMware customization script is trying to access a path which does not exist.

/etc/dhcp3

Solution is to change the template from which you are deploying and create a soft-link to avoid the error.

ln -s /etc/dhcp /etc/dhcp3
Convert the VM back to a template, deploy a new VM with the same configuration..
And all is fine and dandy!

working