[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] XenServer Q & A



Hi Todd,

On Fri, Jan 4, 2013 at 9:23 PM, Wardzinski, Todd
<todd.wardzinski@xxxxxxxxxxx> wrote:

> We’re trying to create a bridged network between two VM DomUs.  All devices
> seem to set themselves up correctly with regard to the DomU and the Dom0.
> Each DomU configuration file defines a vif device and points it at the
> bridge.  Additionally, upon viewing the bridge information, I can correctly
> see the running DomU’s vif device attached to the bridge.

>From the OS perspective, when you create a bridged network you specify
the interfaces on the Dom0.  With this in place, the interfaces on the
DomU will be able to appear on the same network as the physical NICs
on the Dom0.  You tell the Xen that the virtual nic should use the
bridge.

# virsh dumpxml g15
<domain type='xen'>
  <name>g15</name>
  <uuid>d92286af-b53a-b5a0-6f62-8d83e4b6c8f7</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu>1</vcpu>
  <bootloader>/usr/bin/pygrub</bootloader>
  <os>
    <type>linux</type>
  </os>
  <clock offset='utc' adjustment='reset'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/xendomu/g15'/>
      <target dev='xvda' bus='xen'/>
    </disk>
    <interface type='bridge'>
      <mac address='00:16:3e:16:94:15'/>
      <source bridge='br0'/>
      <script path='/etc/xen/scripts/vif-bridge'/>
    </interface>
    <console type='pty'>
      <target type='xen' port='0'/>
    </console>
  </devices>
</domain>

So, your bridge should  show NIC[s] which correspond to your physical
host - so eth[0123...] (or em[1234...] or p<slot>p<ethernet port> if
you're using hardware which supports consistent naming or you or your
hosting provider enforced it with biosdevname).

# brctl show br0
bridge name     bridge id               STP enabled     interfaces
br0             8000.50e5491753bd       no              p4p1

# # ip link show dev p4p1
2: p4p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master br0 state UP mode DEFAULT qlen 1000
    link/ether 50:e5:49:17:53:bd brd ff:ff:ff:ff:ff:ff

Note that the interface p4p1 and br0 are bridged.

I recommend you create your bridge using the standard Red Hat network
scripts at /etc/sysconfig/network-scripts/ifcfg-*

More reading on this is found at:
/usr/share/doc/initscripts<version>/sysconfig.txt

Take care to specify NM_CONTROLLED="no" as NetworkManager does not
support bridged networking under RHEL 6.  You might also want
explicitly to disable and stop NetworkManager and enable and start the
legacy network service.

S.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.