I am using CentOS 6.5 64
use this tutorial to setup Bridge
[root@CentOS ~]# brctl show
bridge name bridge id STP enabled interfaces
xenbr0 8000.08002754b3fa yes eth0
create a new virtual machine (CentOS) using xm
command and everything ok
Xen configuration file
kernel = "/var/lib/xen/images/vmlinuz"
ramdisk = "/var/lib/xen/images/initrd.img"
extra = "text ks=http://192.168.1.8/kickstart-minimal6-x86_64.cfg"
name = "xc63"
memory = "512"
disk = [ "file:/var/lib/xen/images/centos63.img,xvda,w","file:/var/lib/xen/images/centos63.swp,xvdb,w"]
vif = [ 'bridge=xenbr0' ]
vcpus = 1
on_reboot = "destroy"
on_crash = "destroy"
after create
[root@CentOS ~]# brctl show
bridge name bridge id STP enabled interfaces
xenbr0 8000.08002754b3fa yes eth0
vif6.0
[root@CentOS ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3884 errors:0 dropped:0 overruns:0 frame:0
TX packets:2832 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:310622 (303.3 KiB) TX bytes:412047 (402.3 KiB)
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:65536 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)
vif6.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:928 (928.0 b) TX bytes:2192 (2.1 KiB)
xenbr0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2935 errors:0 dropped:0 overruns:0 frame:0
TX packets:1403 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:188677 (184.2 KiB) TX bytes:271882 (265.5 KiB)
xm console xc63
This mean that my bridge not working because vm can't call 192.168.1.8
get the MAC address for xc63
[root@CentOS xen]# xl network-list xc63
Idx BE Mac Addr. handle state evt-ch tx-/rx-ring-ref BE-path
0 0 00:16:3e:21:f4:e1 0 4 10 768/769 /local/domain/0/backend/vif/3/0
and check DHCP status
xc63 get ip 192.168.1.118
ping
from same host it working
[root@CentOS xen]# ping 192.168.1.118
PING 192.168.1.118 (192.168.1.118) 56(84) bytes of data.
64 bytes from 192.168.1.118: icmp_seq=1 ttl=64 time=2.28 ms
64 bytes from 192.168.1.118: icmp_seq=2 ttl=64 time=0.907 ms
64 bytes from 192.168.1.118: icmp_seq=3 ttl=64 time=0.724 ms
64 bytes from 192.168.1.118: icmp_seq=4 ttl=64 time=0.809 ms
^C
--- 192.168.1.118 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3171ms
rtt min/avg/max/mdev = 0.724/1.181/2.284/0.640 ms
from any device on local network Request timed out
C:\Users\motaz>ping 192.168.1.118
Pinging 192.168.1.118 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.1.118:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
Any one who can give me an idea to solve this, i'll be grateful.
192.168.1.8
is on the local network, not on the host machine, right? Have you enabled IP forwarding on the host machine?192.168.1.8
on local network, no I did not enable IP forwarding can you explain more ?