lunedì 19 gennaio 2015

Cloning Redhat Centos fedora Virtual machine on Vmware

1) First you clone a VM.
2) In vCenter selec the VM right click and clicl on clone. Follow instructions.
3) Once done go to the cloned VM and write down the MAC address of the VM's nic/nics.
5) Login to the cloned VM as root.
6) delete file /etc/udev/rules.d/70-persistent-net.rule
7) Go to /etc/sysconfig/network-scrips/ifcfg-ethX (X is the interface index number). Example file content:

DEVICE=eth0
BOOTPROTO=none
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID="3b78b0ce-80bf-492d-90b3-494ac616d27f"
HWADDR=00:50:56:9E:F3:9C
IPADDR=10.17.53.64
PREFIX=24
GATEWAY=10.17.53.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
USERCTL=no

Now change the HWADDR to the real MAC address that you noted aìin point 3.
8) If you have multiple interfaces do the same for all.
9) If you have to set some static routes edit the /etc/sysconfig/network-scrips/route-ethX file.
EX:

 10.10.30.0/24 via 10.10.40.1 dev eth1

10) restart network service with: service network restart
11) reboot.