[one-users] ping between VMs on different hosts ?
Valerio Schiavoni
valerio.schiavoni at gmail.com
Tue Apr 24 14:15:19 PDT 2012
Hello Jaime,
On Tue, Apr 24, 2012 at 4:19 PM, Jaime Melis <jmelis at opennebula.org> wrote:
>
> If you're using virbr0, it means you're using the bridge created by
> libvirt, which isn't the best approach.
> ...
> Imagine your hosts are all connected through the eth0 interface (they all
> have eth0 and they're all plugged in to the same switch). You have to
> create a bridge (for instance br0) and attach eth0 to br0. Then, you need
> to use br0 as your bridge in your network definition.
>
> If eth0 used to have an ip, now you should set:
> $ ifconfig eth0 0.0.0.0 up
> $ ifconfig br0 <yourip>/<yournetmask> up
>
I think I followed your instructions, but this is still not working as I
expect.
I created a new bridge, br0 and attached it to eth0. Before deploying a VM
in this host, ifconfig shows the following:
br0 Link encap:Ethernet HWaddr 00:24:81:b4:59:ea
inet addr:192.168.128.100 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::224:81ff:feb4:59ea/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3121589 errors:0 dropped:0 overruns:0 frame:0
TX packets:1695191 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17388947109 (17.3 GB) TX bytes:119234875 (119.2 MB)
eth0 Link encap:Ethernet HWaddr 00:24:81:b4:59:ea
inet6 addr: fe80::224:81ff:feb4:59ea/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:12456040 errors:0 dropped:612 overruns:0 frame:0
TX packets:1695652 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18098932654 (18.0 GB) TX bytes:126060179 (126.0 MB)
Interrupt:16
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:490 errors:0 dropped:0 overruns:0 frame:0
TX packets:490 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:110476 (110.4 KB) TX bytes:110476 (110.4 KB)
virbr0 Link encap:Ethernet HWaddr d2:29:38:84:e5:bf
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
The bridge br0 is correctly attached to eth0:
oneadmin at newcluster-0:~$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.002481b459ea no eth0
virbr0 8000.000000000000 yes
the bridge virbr0 was created by libvirt when it was installed, i guess.
Should I remove it ?
Now, I deploy a VM on this host. The intended VM IP is 10.0.0.1. Given the
chosen MAC prefix of 02:00, the expected mac address is.
This is what ifconfig shows when a VM is deployed:
$ ifconfig
br0 Link encap:Ethernet HWaddr 00:24:81:b4:59:ea
inet addr:192.168.128.100 Bcast:192.168.255.255 Mask:255.255.0.0
inet6 addr: fe80::224:81ff:feb4:59ea/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3121136 errors:0 dropped:0 overruns:0 frame:0
TX packets:1694908 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17388903328 (17.3 GB) TX bytes:119185044 (119.1 MB)
eth0 Link encap:Ethernet HWaddr 00:24:81:b4:59:ea
inet6 addr: fe80::224:81ff:feb4:59ea/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:12455384 errors:0 dropped:605 overruns:0 frame:0
TX packets:1695364 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18098863628 (18.0 GB) TX bytes:126007486 (126.0 MB)
Interrupt:16
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:490 errors:0 dropped:0 overruns:0 frame:0
TX packets:490 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:110476 (110.4 KB) TX bytes:110476 (110.4 KB)
virbr0 Link encap:Ethernet HWaddr d2:29:38:84:e5:bf
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
vnet0 Link encap:Ethernet HWaddr fe:00:0a:00:00:01
inet6 addr: fe80::fc00:aff:fe00:1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:239 errors:0 dropped:0 overruns:0 frame:0
TX packets:1146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:16270 (16.2 KB) TX bytes:75554 (75.5 KB)
I see how the vnet0 interface has the expected mac address.
The VM was started with this command (seen via ps aux):
/usr/bin/kvm -S -M pc-0.14 -cpu qemu32 -enable-kvm -m 128 -smp
1,sockets=1,cores=1,threads=1 -name one-49 -uuid
d09f1a8a-dccf-e721-a904-fd14ee3a308f -nodefconfig -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/one-49.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=readline -rtc base=utc -boot c
-drive
file=/var/lib/one//datastores/0/49/disk.0,if=none,id=drive-ide0-0-0,format=raw
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev
tap,fd=19,id=hostnet0 -device
rtl8139,netdev=hostnet0,id=net0,mac=02:00:0a:00:00:01,bus=pci.0,addr=0x3
-usb -vnc 0.0.0.0:34100 -vga cirrus -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
This is what is shown by "brctl show" at this moment:
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.002481b459ea no eth0
vnet0
virbr0 8000.000000000000 yes
(there's an empty line after br0 that ends with vnet0)
The problem with the above scenario is (apparently) I have no way to log
into the VM.
Although the VNC icon is clickable and i got a message saying "VM startvnc:
48", nothing shows up.
The oned logs do not show any error.
The user oneadmin can still ssh into the host.
Therefore...i'm stuck with this situation..so close to the achievement :-/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120424/27c84d17/attachment-0002.htm>
More information about the Users
mailing list