Virtual Insider

Blog archive

How To Enable Open vSwitch in XenServer 6

A topic that is way under-covered in the blogosphere is definitely Citrix XenServer so I figured I would add XenServer to the list of topics I cover from time to time. This week I want to cover Open vSwitch, a virtual switch that can be enabled inside XenServer 6. Now for those of you that don't know, Open vSwitch were introduced with XenServer 5.6 FP1 and as a result all XenServer versions after that support it, except it has to be enabled.

A little bit of background: By default XenServer's backend networking uses Linux bridge, an Ethernet networking bridging code used to connect two segments. It is the standard networking code you find in Linux distributions, it has many advantages but it also has a very basic feature set.

The Open vSwitch, on the other hand, has a very rich feature set that includes:

  • ACLs and QoS policies
  • NetFlow
  • Traffic mirroring
  • Port bonding
  • Per VM traffic policy

Open vSwitch has features are very desirable by any network administrator, but if that was not a good enough reason to use it, well add to it the fact that in order to use Citrix XenServer’ Distributed virtual switching technology, you must enable the Open vSwitch on every XenServer that will participate.

To enable Open vSwitch, connect to the console of each XenServer and run the following command:

xe-switch-network-backend openvswitch

You must restart the XenServer host after initiating this command in order for the changes to take effect. Now, if you want to switch back to Linux bridge, you issue this command:

xe-switch-network-backend bridge

You should use caution as you switch back to Linux bridge, especially if High Availability is enabled in your environment. If that is the case, follow these steps to switch back to Linux bridge:

  1. Disable High Availability
  2. MIGRATE VMs to a different XenServer host
  3. Enable Linux bridge mode by using the command above
  4. Reboot the XenServer host
  5. Migrate VMs back
  6. Enable High Availability

Since this is my first blog on XenServer, I would really appreciate your feedback either in the comments section or via e-mail at elias@eliaskhnaser.com or Twitter at http://twitter.com/#ekhnaser. I am interested to know if you found this particular blog to be useful and if you want to see more XenServer coverage here.

Posted by Elias Khnaser on 04/03/2012 at 4:24 PM


What is this?

Reader Comments:

Fri, Jun 15, 2012 Ivaylo US

Thank You! Keep going this way and you will be really ahead ! Ivaylo

Wed, May 16, 2012 Miguel Romero México

I´m finding this right now, and is very useful. I´ve been a VMware admin for a while, but now i have to administer XS, and this articles are gold for me. Thanks.

Wed, May 16, 2012

Enabled by default: http://support.citrix.com/article/CTX130418 "Networking Improvements. Open vSwitch is now the default networking stack in XenServer 6.0 and now provides formal support for Active-Backup NIC bonding."

Wed, May 16, 2012 Edgar New York City

I am a junior Citrix administrator working in a NYC city agency and I'm glad to find this valuable information.

Tue, Apr 24, 2012 Andrea

If I'm not wrong on Xenserver 6 distributed vSwitch is anbled by default: You should be use this command only on 5.x version. How we could verify the switch in use? Thank you. Cheers

Fri, Apr 6, 2012 PNWACE Seattle

Yes, please continue blogging about Xenserver and Xenapp. Any tips or discussions on the internals are very welcome. Thanks

Fri, Apr 6, 2012 Scott Dallas, TX

Great Article Elias. Given your Citrix background I too am surprised you don't blog about XenServer more often. One thing worth mentioning here is IF you use XenServer 6.0 as a back end host to CloudStack 3.0, bridge networking is required. I look forward to more XenServer posts. Cheers!

Thu, Apr 5, 2012 Chris Kansas

I support a Xenserver environment so I would like to see more Xenserver articles. I was not aware of the Open Wswitch. thank you

Thu, Apr 5, 2012 LSchmidt California

Excellent nugget of knowledge for Xenserver and hidden features. Curious how is the GUI for this enhancement within Xencenter?

Wed, Apr 4, 2012 Sarina Van Nuys, CA

This is great! Wish we could get more info like this out on XenServer. Keep it up please!

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above