Best Practice in Cloning RHEL VMs in VMWare
Let me know if this is not the correct forum for this post or not.
We've been having issues cloning RHEL v5 and v6 from two environments in vSphere. One version of vSphere is our prod environment (v4.1.0) and one is test (5.5.0). I used to think that might be the issue, however we are able to clone Windows servers with no issues whatsoever. Some of the issues that we are having are duplicate MAC addresses and not being able to assign an IP address. I've resarched and found recommendations to delete the NIC before doing the conversion process. Other things that I have found online are to delete and entries for the NIC under /etc/udev/rules.d and I thought I found a website that said to edit various files under /etc/ssh, however I can't find it at this time. I was wondering what others are doing to make this process as painless as possible. thanks |
Make sure all places where you might have hardcoded IP addresses are changed such as /etc/sysconfig/iptables, /etc/resolv.conf, /etc/ntp.conf, etc. You might want to make a script that uses egrep and sed to find all occurrences of certain values (e.g. host IP, DNS IP, NTP server IP, subnet, etc.) and replace with new ones.
A command like this to find the values: Code:
egrep -rl --exclude-dir=/dev/shm --exclude-dir=/proc --exclude-dir=/media <... etc ...> \ Code:
for FILE in $(cat $TMPFILE); do |
Quote:
|
Quote:
1) rm -rf /etc/ssh/ssh_host_* 2) Edit the hostname in /etc/sysconfig/network 3) rm -rf /etc/udev/rules.d/70-* 4) Remove the HWADDR line and UUID line from /etc/sysconfig/network-scripts/ifcfg-eth* file(s). Also change the IP address in this/these files 5) If you'd like, delete all the logs from /var/log and build logs from /root 6) If you'd like to go through setup again then: touch /.unconfigured 7) Always good to do an SELinux relabel: touch /.autorelabel Then Reboot the VM. This should be good enough. The best practice is to set up a VM as a "template" so that way you only have to do the above steps once. --C |
For #5, I don't understand what it means to build the logs from /root
For #6, the RH documentation talks about doing the /.unconfigured, however I don't know why For #7, I'm also not understanding the SELinux relabel. Quote:
|
Clone RHEL 7.1 with VCenter 6.1
Questions:
Does anything need to change, be removed or added for RHEL 7.1? After you clone the VM login and... Also do you know if the above changes also modify IP/Host info for the following services as well: SRM/ Siteminder/ TC Server/ HTTP/ DB Connect Strings/ Puppet/ DynaTrace/ Log Insight/ HPOV/ HPOM/ NetBack Up/Application.properties/Hibernat.properties? If not would indicate what additional files need to be updated? Thx much |
All times are GMT -5. The time now is 02:10 AM. |