Saya memberi nama baru bagi VM tersebut dengan "PostgreSQL". Kalau anda periksa di bagian Networking atau langsung dari layar console CentOS, akan tampak telah tercipta mac address yang baru.
[root@CentOS-6 ~]# ifconfig -a eth0 Link encap:Ethernet HWaddr 56:04:06:02:ED:DA BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:247 eth1 Link encap:Ethernet HWaddr 52:40:C7:0E:66:4A BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:246 eth2 Link encap:Ethernet HWaddr 2A:D7:26:8F:DC:C1 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:245 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Untuk mengaktifkan network interface (eth0) pada VM yang baru ini, maka langkah petama adalah men-generate uuid yang baru :
[root@CentOS-6 ~]# uuidgen eth0 cd67bfaf-0e6a-4913-b3bd-016dfb156a9b
Kemudian edit file konfigurasi eth0. Isikan nilai mac address dan UUID dengan nilai yang baru.
[root@CentOS-6 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 HWADDR=56:04:06:02:ed:da TYPE=Ethernet UUID=cd67bfaf-0e6a-4913-b3bd-016dfb156a9b ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=none PEERDNS=no PEERROUTES=yes DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPADDR=172.16.16.125 NETMASK=255.255.255.224 BROADCAST=172.16.16.127
Restart service network, maka VM yang baru sudah dapat terkoneksi ke jaringan.
[root@CentOS-6 ~]# service network restart Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: [ OK ] [root@CentOS-6 ~]# ping 192.168.100.16 PING 192.168.100.16 (192.168.100.16) 56(84) bytes of data. 64 bytes from 192.168.100.16: icmp_seq=1 ttl=62 time=2.23 ms 64 bytes from 192.168.100.16: icmp_seq=2 ttl=62 time=0.816 ms 64 bytes from 192.168.100.16: icmp_seq=3 ttl=62 time=0.825 ms 64 bytes from 192.168.100.16: icmp_seq=4 ttl=62 time=0.847 ms 64 bytes from 192.168.100.16: icmp_seq=5 ttl=62 time=0.813 ms 64 bytes from 192.168.100.16: icmp_seq=6 ttl=62 time=0.853 ms --- 192.168.100.16 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 5682ms rtt min/avg/max/mdev = 0.813/1.065/2.236/0.523 ms
Sekian.
Tidak ada komentar:
Posting Komentar