I'm cloning one of my CentOS5.4 Virtual Machines. I go through the wizard and set eth0 and eth1 to be a new IP, so there is no conflict when they start up of course. But when it starts up it has the original IP of the host it was cloned from. Any ideas how to fix that or where I'm going wrong?
When you look at the Task/Events for the cloned VM, you should see a task that says it's starting the customization and then shortly after another that says it was successful, do you see both of those? If not, then something did go wrong. The other thing that'll be much more helpful is log into the VM and look at the log for customization process under /var/log/vmware-imc/ and see if there are any errors, that'll be a good place to start.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
So i'm looking in the /var/log/vmware-inc-toolsDeployPkg.log file, the beginning has:
Cleaning old state file from tmp directory.
EXIT STATE INPROGRESS
Setting deploy error: Error removing lock /tmp/.vmware-deploy.INPROGRESS (No such file or directory)
EXIT STATE Done
Setting deploy error: Error removing lock /tmp/.vmware-deploy.Done (No such file or directory)
EXIT STATE ERRORED
Setting deploy error: Success.
Which I assume is ok, that is just can't find those old files:
Then:
INFO: Customizing Network settings ...
INFO: Erasing DHCP leases
DEBUG: Command: pkill dhclient
DEBUG: Result:
DEBUG: Command: rm -f /var/lib/dhcp/*
DEBUG: Result:
INFO: Resetting Network Administration Tool (redhat-config-network)
I assume this is looking for the redhat-config-network, which doesn't exist on a centos box, it's system-config-network instead, which is maybe why it's failing? Maybe I could just make a softlink for redhat-config-network to system-config-network?
It wraps up with this:
Customization command failed: Warning: --directory (-d) option is undocumented and no-op.
Use -rf for deleting non-empty dirs
Warning: --directory (-d) option is undocumented and no-op.
Use -rf for deleting non-empty dirs
Customization process returned with error.
Deployment result = -1
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.
Launching cleanup.
Command to exec : /bin/rm
sizeof ProcessInternal is 56
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
That could be the case, you can easily create a symlink and see if that resolves the problem.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".
So I am able to answer my own question. Here goes:
just had to reboot twice, on the second reboot it successfully applies the script to change all the network stuff.
Moral of this story, reboot until it works.