I''m running Xen on Fedora 8 and I''m trying to make virtual machines communicate between each others. On CentOS I was able to make network-bridge-custom file and to point out on him from xend-config.sxp file. That file looked like something like this: #!/bin/sh #/etc/xen/scripts/network-bridge $1 netdev=eth0 bridge=xenbr0 vifnum=0 /etc/xen/scripts/network-bridge-noifup $1 netdev=eth1 bridge=xenbrBC vifnum=1 /etc/xen/scripts/network-bridge-noifup $1 netdev=eth2 bridge=xenbrBD vifnum=2 After that in ifconfig I was able to see new bridge interfaces xenbrBC and xenbrBD. In virtual machines config files I assigned MAC addresses to those bridges, and communication betweem virtual domains worked perfect! How to make something like this in Fedora? I can see, that when I start virtual machine I have more two new interfaces tap0 and vif11.0! They are assigned to virbr0 : brctl show bridge name bridge id STP enabled interfaces br0 8000.000000000000 no virbr0 8000.c2a429e6b58f no tap0 vif11.0 I''m not sure what exactly to do with these two interfaces? I''m trying to use network-bridge-custom here on Fedora 8 but it seems that it doesn''t work. Does anybody know how to make full connection between virtual machines? Please, I will appreciate any help! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Oct 19, 2009 at 3:23 PM, Bojana Petrovic <bojanap@gmail.com> wrote:> I''m running Xen on Fedora 8 and I''m trying to make virtual machines > communicate between each others. On CentOS I was able to make > network-bridge-custom file and to point out on him from xend-config.sxp > file. That file looked like something like this: > > #!/bin/sh > #/etc/xen/scripts/network- > bridge $1 netdev=eth0 bridge=xenbr0 vifnum=0 > /etc/xen/scripts/network-bridge-noifup $1 netdev=eth1 bridge=xenbrBC > vifnum=1 > /etc/xen/scripts/network-bridge-noifup $1 netdev=eth2 bridge=xenbrBD > vifnum=2If it''s getting too complicated to handle, just use OS''s networking script to create bridge and simply comment-out network-script entry on xend-config.sxp.> > After that in ifconfig I was able to see new bridge interfaces xenbrBC and > xenbrBD. In virtual machines config files I assigned MAC addresses to those > bridges, and communication betweem virtual domains worked perfect! > How to make something like this in Fedora?Sorry, I''ve never used F8. What does "brctl show" shows using the default setup? I''m guessing it has something to do with the fact that default bridge name changed from xenbr0 to eth0. Again, I''d recommend creating bridges using OS''s networking script (/etc/sycsonfig/network-scripts/ifcfg-*)> I can see, that when I start virtual machine I have more two new interfaces > tap0 and vif11.0! They are assigned to virbr0 : > > brctl show > bridge name bridge id STP enabled interfaces > br0 8000.000000000000 no > virbr0 8000.c2a429e6b58f no tap0 > > vif11.0 > I''m not sure what exactly to do with these two interfaces? I''m trying to use > network-bridge-custom here on Fedora 8 but it seems that it doesn''t work. > Does anybody know how to make full connection between virtual machines?virbr0 is created by libvirt. tap0 and vif11.0 is HVM domU''s interfaces. Don''t know about br0. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks for answering; I have just a few more questions to make sure that I understood. If I connect all virtual machines to the bridge that is made with OS''s networking script, do my virtual machines get IP addresses over the DHCP? I tried something like that and I didn’t manage. I want virtual machines to be reachable from outside networks. Can I somehow configure tap0 or vif11.0 interface inside domU’s to make them available in the outside world? Sorry if the question sound simple for you :-) On Mon, Oct 19, 2009 at 10:35 AM, Fajar A. Nugraha <fajar@fajar.net> wrote:> On Mon, Oct 19, 2009 at 3:23 PM, Bojana Petrovic <bojanap@gmail.com> > wrote: > > I''m running Xen on Fedora 8 and I''m trying to make virtual machines > > communicate between each others. On CentOS I was able to make > > network-bridge-custom file and to point out on him from xend-config.sxp > > file. That file looked like something like this: > > > > #!/bin/sh > > #/etc/xen/scripts/network- > > bridge $1 netdev=eth0 bridge=xenbr0 vifnum=0 > > /etc/xen/scripts/network-bridge-noifup $1 netdev=eth1 bridge=xenbrBC > > vifnum=1 > > /etc/xen/scripts/network-bridge-noifup $1 netdev=eth2 bridge=xenbrBD > > vifnum=2 > > > If it''s getting too complicated to handle, just use OS''s networking > script to create bridge and simply comment-out network-script entry on > xend-config.sxp. > > > > > After that in ifconfig I was able to see new bridge interfaces xenbrBC > and > > xenbrBD. In virtual machines config files I assigned MAC addresses to > those > > bridges, and communication betweem virtual domains worked perfect! > > How to make something like this in Fedora? > > Sorry, I''ve never used F8. > What does "brctl show" shows using the default setup? I''m guessing it > has something to do with the fact that default bridge name changed > from xenbr0 to eth0. Again, I''d recommend creating bridges using OS''s > networking script (/etc/sycsonfig/network-scripts/ifcfg-*) > > > I can see, that when I start virtual machine I have more two new > interfaces > > tap0 and vif11.0! They are assigned to virbr0 : > > > > brctl show > > bridge name bridge id STP enabled interfaces > > br0 8000.000000000000 no > > virbr0 8000.c2a429e6b58f no tap0 > > > > vif11.0 > > I''m not sure what exactly to do with these two interfaces? I''m trying to > use > > network-bridge-custom here on Fedora 8 but it seems that it doesn''t work. > > Does anybody know how to make full connection between virtual machines? > > virbr0 is created by libvirt. tap0 and vif11.0 is HVM domU''s > interfaces. Don''t know about br0. > > -- > Fajar >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Oct 19, 2009 at 4:07 PM, Bojana Petrovic <bojanap@gmail.com> wrote:> > > Thanks for answering; I have just a few more questions to make sure that I > understood. > > If I connect all virtual machines to the bridge that is made with OS''s > networking script, do my virtual machines get IP addresses over the DHCP? I > tried something like that and I didn’t manage.Depends on your setup. If the interface that dom0 is bridging over is on DHCP, then domU will have DHCP-assigned address as well.> I want virtual machines to be > reachable from outside networks. Can I somehow configure tap0 or vif11.0 > interface inside domU’s to make them available in the outside world?Put them on a bridge that has access to outside world. For example, if originally eth0 is on a company intranet with IP address assigned by DHCP, then you can create a bridge named br0 (or whatever you like) with eth0 as its slave. You then tell domUs to use br0 bridge, and they will be on the same network as your eth0. That means other hosts on your company intranet can access domUs just like any other physical host on the network. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Fajar, I understand what you mean, I need one more thing. I need my virtual machines to have multiple network interfaces. Like I described before, in CentOS I managed it with network-bridge-custom file and by pointing on those new bridges in domU''s config files. Here on Fedora I can make bridges using OS''s scripts, but I''m not sure weather to bind them to the bridge that has access to outside world? Shall I give them static IP addresses? Additionally I do not know how to point on them in DomU’s config files, because new config files are in new format S-expression, which in my case, cancel all changes I did manually after the start of virtual machines? Thank you very much for help and answering! Bojana _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Oct 20, 2009 at 4:46 PM, Bojana Petrovic <bojanap@gmail.com> wrote:> Hi Fajar, > I understand what you mean, I need one more thing. I need my virtual > machines to have multiple network interfaces. Like I described before, in > CentOS I managed it with network-bridge-custom file and by pointing on those > new bridges in domU''s config files. Here on Fedora I can make bridges using > OS''s scripts, but I''m not sure weather to bind them to the bridge that has > access to outside world? > > Shall I give them static IP addresses?You can, if you want to. Or you can just simply use something like this: # cat /etc/sysconfig/network-scripts/ifcfg-br6 DEVICE=br6 TYPE=Bridge BOOTPROTO=static ONBOOT=yes # cat /etc/sysconfig/network-scripts/ifcfg-eth4.6 DEVICE=eth4.6 VLAN=yes BOOTPROTO=none ONBOOT=yes BRIDGE=br6 In that example br6 has a slave interface, eth4.6, which has access to public IP address. By specifying BOOTPROTO=static (or none) and give no IP address, both interfaces (eth4.6 and br6) will be up with no IP address. So you can have domU with access to public internet but dom0 itself accessable only from private network. Think an L2-switch, and you''ll see what I mean.> > Additionally I do not know how to point on them in DomU’s config files, > because new config files are in new format S-expression, which in my case, > cancel all changes I did manually after the start of virtual machines?virt-install creates xend-managed domUs by default, but you don''t have to use new format if you don''t want to. Just use old-style config. Here''s an example: # cat /etc/xen/config/test name = "test" memory = "500" disk = [ ''phy:rootvg/testrootlv,hda1,w'', ] vif = [ ''mac=00:16:3E:4D:19:81, bridge=br6'' ] bootloader="/usr/bin/pygrub" vcpus=1 Using that config, I can create that domU with a simple "xm create test" -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users