I am interested in deploying several RHEL 4 Update 8 virtual machines for creation of a test environment.
Here are the steps I am taking:
- In off hours, P2V/V2V the production machines and convert them to templates
- Deploy the virtual machines with a customization specification that changes hostname, IP address
I am interested in how these processes are done and if there are any options for further customization.
Are the machines brought on the network when they are powered on, before they are reconfigured? Is there a potential IP address conflict?
Is there an option to run additional scripts which reside on the guest as a part of the reconfiguration? For example, restoring an Oracle Database. This is an option with Windows guests and sysprep, but I have been unable to locate anything showing a RHEL equivalent.
I am dealing with a multi tier application. The main issue I am attempting to mitigate is that the application servers reference database servers by hostname and in tnsnames files. I am interested in scripting the reconfiguration of the application in the deployment so that the app/db servers are pointing to the test environment.
I am OK with placing the 'cleanup' script on the source and executing it after the machine has been brought up. I am interested in the automation of the script's execution post clone/boot, as well as if there could be an IP address conflict.
(cross posted to VMTN's ESX 4 community)
My experience is mostly with Windows, but the process is pretty much the same:
The machines are powered on, and the setup scripts to change the configuration are run before the network and rest of the system is brought online. The machine then reboots if required, and the 2nd time around it boots fully, with the new configuration.
Regarding the network and duplicate IP addresses, you should be safe, however if you're really concerned, create a 2nd network and don't bind any NICs to it. After the customisation wizard you can choose not to boot the machine immediately. If you make sure it doesn't boot, you then have the option of changing the network the VM is attached to to the dummy network. After you've booted it up and the configuration script has run, double-check the IP settings of the network to make sure they're not conflicting (you'll have to do the check manually, of course) and then just flick the network over to the live network.
Can't help with this one I'm afraid.