View Single Post
  #4  
Old 23rd June 2012, 21:28
NeonNexxus NeonNexxus is offline
Junior Member
 
Join Date: Jun 2012
Posts: 11
Thanks: 0
Thanked 2 Times in 1 Post
Default Ok .. i will try to answer my own question. hehehe

Not trying to be falko or anything LOL but here are my 2 cents of contribution just in case anyone needs them.

1) Asked my ISP in Germany to give me the ip's on the same sub-net but they were not able to give me the same as the server since the one where the server is, is already full.
So
A. Server IP xxx.xxx.020.170
B. VM's servers new sub-net (4ip's free) xxx.xxx.033.083 -> xxx.xxx.033.086
B.1 As you can see the third octec of the IP is totally different.
C We need to create a dummy NIC to hold the bridge

The new IP addresses were each routed via my existing public address - and in this scenario I couldn't use NAT, since these are public addresses.

Instead I needed to use a bridge.

In my case Centos6.2 was installed on the server by my ISP and it was a minimal install. So I needed to install the desktop environment to make it easier to work with the GUI for my administration team.

So here are the steps taken for this installation. Most of them were taken out of this tutorial by falko .. http://www.howtoforge.com/virtualiza...virtualization
================================================== =====

yum groupinstall "Desktop" "Desktop Platform" "General Purpose Desktop" "Internet Browser" "X Window System"
yum install xorg-x11-fonts-misc
yum install xorg-x11-fonts-Type1
reboot
ifconfig -a

At this point you might have only the eth0 and the lo NIC's do not worry.
check that your CPU actually supports virtualization. As per falkos guide above.
egrep '(vmx|svm)' --color=always /proc/cpuinfo
yum install bridge-utils
yum install vim <- love this editor better than vi and nano.
Now create the bridge interface first.

vim /etc/sysconfig/network-scripts/ifcfg-bro0

DEVICE="br0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=none
IPADDR=xxx.xxx.033.083
NETMASK=255.255.255.248
GATEWAY=xxx.xxx.033.081
DNS1=8.8.8.8
DNS2=8.8.4.4
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System br0"

Then bring up the dummy interface.
modprobe dummy0 numdummies=1 <-numdummies=1 tells modprobe that we will use only 1 dummy NIC if you need more change the value there.

Then edit

vim /etc/sysconfig/network-scripts/ifcfg-dummy0

DEVICE="dummy0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System dummy0"
BRIDGE=br0

Now do a network restart.
service network restart

Run again.
ifconfig -a
You should now be able to see the dummy0 adapter there ..

[root@CentOS-62-64-minimal ~]# ifconfig -a
br0 Link encap:Ethernet HWaddr DE:F7:E85:C0:4E
inet addr: xxx.xxx.033.083 Bcast: xxx.xxx.033.087 Mask:255.255.255.248
inet6 addr: fe80::dcf7:e8ff:fed5:c04e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:314445 errors:0 dropped:0 overruns:0 frame:0
TX packets:612808 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:51583085 (49.1 MiB) TX bytes:759490924 (724.3 MiB)

dummy0 Link encap:Ethernet HWaddr DE:F7:E85:C0:4E
inet6 addr: fe80::dcf7:e8ff:fed5:c04e/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6791 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:296062 (289.1 KiB)

eth0 Link encap:Ethernet HWaddr 54:04:A6:F1:7A:C8
inet addr: xxx.xxx.020.170 Bcast: xxx.xxx.020.191 Mask:255.255.255.224
inet6 addr: fe80::5604:a6ff:fef1:7ac8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6149155 errors:0 dropped:0 overruns:0 frame:0
TX packets:1935534 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8724166695 (8.1 GiB) TX bytes:360734002 (344.0 MiB)
Interrupt:206 Base address:0x8000

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:219135 errors:0 dropped:0 overruns:0 frame:0
TX packets:219135 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:308503705 (294.2 MiB) TX bytes:308503705 (294.2 MiB)

Now we continue following the guide from falko.

yum install http://au1.mirror.crc.id.au/repo/ker...6-3.noarch.rpm

yum install kernel-xen xen
....
...
..
.
Till you reach
rpm -Uvh --force libvirt-0.9.4-23.el6.x86_64.rpm libvirt-client-0.9.4-23.el6.x86_64.rpm libvirt-python-0.9.4-23.el6.x86_64.rpm
reboot
uname -r
xm list
virsh list


At this point since now you have

[root@CentOS-62-64-minimal ~]# virsh list
Id Name State
----------------------------------
0 Domain-0 running

now we issue the command
ifconfig -a <- again and now we should have something like this.

br0 Link encap:Ethernet HWaddr DE:F7:E85:C0:4E
inet addr: xxx.xxx.033.083 Bcast: xxx.xxx.033.087 Mask:255.255.255.248
inet6 addr: fe80::dcf7:e8ff:fed5:c04e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:314445 errors:0 dropped:0 overruns:0 frame:0
TX packets:612808 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:51583085 (49.1 MiB) TX bytes:759490924 (724.3 MiB)

dummy0 Link encap:Ethernet HWaddr DE:F7:E85:C0:4E
inet6 addr: fe80::dcf7:e8ff:fed5:c04e/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6791 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:296062 (289.1 KiB)

eth0 Link encap:Ethernet HWaddr 54:04:A6:F1:7A:C8
inet addr: xxx.xxx.020.170 Bcast: xxx.xxx.020.191 Mask:255.255.255.224
inet6 addr: fe80::5604:a6ff:fef1:7ac8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6149155 errors:0 dropped:0 overruns:0 frame:0
TX packets:1935534 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8724166695 (8.1 GiB) TX bytes:360734002 (344.0 MiB)
Interrupt:206 Base address:0x8000

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:219135 errors:0 dropped:0 overruns:0 frame:0
TX packets:219135 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:308503705 (294.2 MiB) TX bytes:308503705 (294.2 MiB)

tap16.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:18313 errors:0 dropped:0 overruns:0 frame:0
TX packets:34614 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:2908310 (2.7 MiB) TX bytes:34196939 (32.6 MiB)

vif16.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:0 (0.0 b) TX bytes:3646 (3.5 KiB)

virbr0 Link encap:Ethernet HWaddr 52:54:00:FF:44:1B
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:4725 (4.6 KiB)

virbr0-nic Link encap:Ethernet HWaddr 52:54:00:FF:44:1B
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:500
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

From here on guys you are on your own with falkos guide and the net too.


** NOTE Once you guys have installed the first VM you put the next ip in my case xxx.xxx.033.084 as the first VM ip and the netmask 255.255.255.248 in my case but be careful here .. on the VM's GATEWAY you should put the bridge IP which in my case was xxx.xxx.033.083.
Leaving me with my first VM 's eth0 config with this lines on it.
IPADDR= xxx.xxx.033.084
NETMASK=255.255.255.248
GATEWAY= xxx.xxx.033.83

** REMEMBER to always use your bridges IP as your gateway ip on your VM's.

Thank you all.
Thats all for now.
Thank to everyone for your help specially FALKO.
Ed

FALKO PLEASE mark this as resolved .. Don't know how to do it .. sorry. THANKS
Reply With Quote