1

I have a XenServer installed running multiple OS's testing GlusterFS. My Colleague says that the Xen Hyper-visor routes the connectivity inside the Hyper-visor and it never enters the network. That is if one Virtual OS talked to another Virtual OS on the same box. Is this accurate ? will nothing be transmitted to the router ?

If there is some reference material that would be great ? Also does vmware or virtualbox act this way as well ?

rreeves
  • 171
  • 2
  • 11
  • There's no reason for packets to go on the network if you're not communicating to other machines on the network. Why is this surprising? – gparent May 24 '13 at 20:22
  • because the virtual machine are on the network with ips, and communicating with IPs via glusterFS, or at least that was my impression – rreeves May 24 '13 at 20:26
  • 2
    I don't know if/how you setup the networking, but part of it involves creating a switch for your VMs. They talk through that switch at layer 2 so they won't need to hit your router to talk between themselves. – gparent May 24 '13 at 20:32
  • 1
    To be slightly pedantic, the virtual switch within the hypervisor is forwarding, not routing. Routing is something that happens at layer 3. The virtual switch is only forwarding ethernet frames, just as a physical switch would. XenServer uses Open vSwitch, so docs can be found at http://openvswitch.org/ . – ktower Jul 29 '13 at 20:22

1 Answers1

3

XenServer and other virtualization technologies implement a "virtual switch" (or even several), which can achieve the results you are describing. Depending on your configuration, the virtual machines may be on the same IP subnet, which means they would just need to be connected to the same switch to communicate with each other (or virtual switch, in this case). In XenServer, the Dom0 OS may also be connected to this virtual switch, allowing Dom0 to communicate with the VMs. If the VMs are on two different IP subnets, then you would likely configure them to connect to two different virtual switches, and set up a system to route between them. In this scenario, the most common configuration is to connect Dom0 to both of the switches and allow it to do the routing, although you could achieve this in a number of other ways (you could connect a VM to both switches that acts as a router, or you could connect the host's physical NICs to the virtual switches and use a separate physical system to do the routing).

Jed Daniels
  • 7,172
  • 2
  • 33
  • 41
  • is this the default behavior or is an addon ? – rreeves May 24 '13 at 20:30
  • 1
    The default behavior is to create a virtual switch for each physical NIC in the system, and connect VMs to the first vSwitch that is created. If the VMs are just communicating with each other, and are on the same subnet, then the traffic won't leave this vSwitch (e.g. you could have the physical NIC disconnected and it would still work). – Jed Daniels May 24 '13 at 20:33
  • 1
    You could also create other vSwitches that aren't connected to a physical nic at all, to prevent broadcast or other traffic from being sent on the wire, although that clearly isn't the default configuration. – Jed Daniels May 24 '13 at 20:34
  • thanks for the help! I'm gonna do some testing and try to route it to the physical network – rreeves May 24 '13 at 20:44