New Question

How to do VM attachment to OVS bridge in HyperV Failover Cluster

asked 2016-09-06 11:12:57 +0300

lgastevens gravatar image

updated 2016-11-11 21:19:49 +0300

Claudiu Belu gravatar image

I have a Failover Cluster of 2 HyperV Windows Server 2012 R2 DataCenter. Both servers have OVS installed and configured in exactly the same way:

PS C:\Users\Administrator.VBN> Get-NetAdapter
Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
br0                       Hyper-V Virtual Ethernet Adapter #3          32 Up           00-15-5D-A3-51-0B        10 Gbps
vEthernet (OOB - Virtu... Hyper-V Virtual Ethernet Adapter #2          23 Up           6C-3B-E5-B3-EE-96        10 Gbps
NIC-4 Mgmt OOB            HP NC382i DP Multifunction Gigabi...#54      12 Up           6C-3B-E5-B3-EE-96         1 Gbps
NIC-3 LudoLab             HP NC382i DP Multifunction Gigabi...#53      15 Up           6C-3B-E5-B3-EE-94         1 Gbps
NIC-5 iSCSI               HP NC382T PCIe DP Multifunction G...#64      24 Up           10-60-4B-B2-0F-8C         1 Gbps
NIC-2 POC Team            HP NC382i DP Multifunction Gigabi...#52      14 Up           6C-3B-E5-B3-EE-9A         1 Gbps
NIC-1 POC Team            HP NC382i DP Multifunction Gigabi...#51      13 Up           6C-3B-E5-B3-EE-98         1 Gbps
POC Teaming               Microsoft Network Adapter Multiplexo...      19 Up           6C-3B-E5-B3-EE-98         2 Gbps
NIC-6 Clustering          HP NC382T PCIe DP Multifunction G...#65      25 Up           10-60-4B-B2-0F-8E         1 Gbps

PS C:\Users\Administrator.VBN> Get-VMSwitch -Name LudoLab
Name    SwitchType NetAdapterInterfaceDescription                       
----    ---------- ------------------------------                       
LudoLab External   HP NC382i DP Multifunction Gigabit Server Adapter #53

PS C:\Users\Administrator.VBN> Get-VMSwitchExtension -VMSwitchName LudoLab -Name "Open vSwitch Extension"
Id                  : 583CC151-73EC-4A6A-8B47-578297AD7623
Name                : Open vSwitch Extension
Vendor              : Cloudbase Solutions Srl
Version             :
ExtensionType       : Forwarding
ParentExtensionId   : 
ParentExtensionName : 
SwitchId            : 853568bc-80b4-46a2-9bad-967e904cf076
SwitchName          : LudoLab
Enabled             : True
Running             : True
ComputerName        : HYPERV1
Key                 : 
IsDeleted           : False

PS C:\Users\Administrator.VBN> ovs-vsctl show
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "NIC-3 LudoLab"
            trunks: [101, 102]
            Interface "NIC-3 LudoLab"

I now have a VM1 on the Failover Cluster, located on HyperV1. I want to attach it to the OVS bridge on vlan 101, so on HyperV1 I do this:

$vnic = Get-VMNetworkAdapter VM1
$vnic[0] | Set-VMNetworkAdapterOVSPort -OVSPortName VM1-Eth1
Connect-VMNetworkAdapter -VMNetworkAdapter $vnic[0] -SwitchName LudoLab
ovs-vsctl add-port br0 VM1-Eth1 tag=101

This works fine and my VM1 now has connectivity over the OVS bridge on VLAN101; my OVS bridge on HyperV1 now looks like this:

PS C:\Users\Administrator.VBN> ovs-vsctl show
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
        Port "VM1-Eth1"
            tag: 101
            Interface "VM1-Eth1"
        Port "NIC-3 LudoLab"
            trunks: [101, 102]
            Interface "NIC-3 LudoLab"

However, I need my HyperV2 server to have exactly the same OVS configuration, for when I live-migrate VM1 to it.

So I try and configure this on HyperV2, but get an error:

PS C:\Users\Administrator.VBN> ovs-vsctl add-port br0 VM1-Eth1 tag=101
ovs-vsctl : ovs-vsctl: Error detected while setting up 'VM1-Eth1'.  See ovs-vswitchd log for details.
At line:1 char:1
+ ovs-vsctl add-port br0 VM1-Eth1 tag=101
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (ovs-vsctl: Erro...og for details.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

The entry in ovs-vswitchd.log is:

2016-09-05T14:16:21.988Z|00103|dpif|WARN|system@ovs-system: failed to add VM2-Eth1 as port: Invalid argument

In spite of the error message, "ovs-vsctl show" on HyperV2 now shows the same identical OVS configuration as for HyperV1. However, if I now live-migrate my VM1 to HyperV2 the VM loses network connectivity.

In order to correct this I need to do these steps on HyperV2:

ovs-vsctl del-port ...
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2016-11-11 21:28:29 +0300

Claudiu Belu gravatar image


Are you using OpenStack by any chance? My assumption is that the answer is no.

In OpenStack, we have the nova HyperVDriver / HyperVClusterDriver that is able to bind the OVS ports when a live-migration is requested, or even when a failover migration occurs.

OVS does not do these port bindings automatically on live-migration, as far as I know, and it is the same with OVS on Linux.

Plus, having a virtual machine in a Hyper-V Cluster doesn't automatically mean that the VM itself is clustered. You will have to mark it as clustered manually. The nova HyperVClusterDriver does this automatically.

Since you want to benefit from the Hyper-V Cluster's advantages, why not with an OpenStack deployment?

Best regards,

Claudiu Belu

edit flag offensive delete link more


Hi, No, not using OpenStack. But yes, my VM is clustered. Ok I'll look into using OpenStack; but I'll need to read up a bit more on that topic! Thanks for the pointer. Best Regards Ludovico Stevens

lgastevens gravatar imagelgastevens ( 2016-11-17 15:46:41 +0300 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-09-06 11:12:57 +0300

Seen: 590 times

Last updated: Nov 11 '16