Hi dimara,

if your default vif-script in /etc/xen/xend-config.sxp is pointing to vif-openvswitch, it is not needed to set the vif-script hvparam.

If you have a mixed setup with some VMs on a bridge and some VMs on the openvswitch, you need to set the vif-script for those nics, depending on what your default network mode is.
Anyway, I would not recommend a mixed setup.

Also, please note that it is mode=openvswitch not mode=ovs!

Cheers,
Sebastian


Dimitris Aragiorgis wrote:
Hi,

may I ask a question here? In order Xen to properly configure a ovs
nic, should we besides mode=ovs,vlan=100 also provide
vif-script=/etc/xen/scripts/vif-openvswitch hvparam?

Thanks,
dimara

* Sebastian Gebhard <[email protected]> [2013-07-14 17:05:09 +0200]:

This implementation depends on vif-openvswitch provided by Xen 4.3
and provides Xen with switch name and vlan as "link".

Signed-off-by: Sebastian Gebhard <[email protected]>
---
  lib/hypervisor/hv_xen.py | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/lib/hypervisor/hv_xen.py b/lib/hypervisor/hv_xen.py
index 068a757..fc6a3ea 100644
--- a/lib/hypervisor/hv_xen.py
+++ b/lib/hypervisor/hv_xen.py
@@ -1018,6 +1018,10 @@ class XenPvmHypervisor(XenHypervisor):
          nic_str += ", ip=%s" % ip
        if nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED:
          nic_str += ", bridge=%s" % nic.nicparams[constants.NIC_LINK]
+      if nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_OVS:
+        nic_str += ", bridge=%s" % nic.nicparams[constants.NIC_LINK]
+        if nic.nicparams[constants.NIC_VLAN]:
+          nic_str += "%s" % nic.nicparams[constants.NIC_VLAN]
        if hvp[constants.HV_VIF_SCRIPT]:
          nic_str += ", script=%s" % hvp[constants.HV_VIF_SCRIPT]
        vif_data.append("'%s'" % nic_str)
--
1.8.1.2

Reply via email to