From 4c1ace5e02edb04c0aee8641334e8a0eb2bd5b5c Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Thu, 30 May 2013 16:53:39 -0700 Subject: [PATCH] CLOUDSTACK-2775: Fix trunk port is not 1 on some hosts Now searching for eth- or em- prefix, as the port for going outside. --- scripts/vm/network/ovs-pvlan-vm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/vm/network/ovs-pvlan-vm.sh b/scripts/vm/network/ovs-pvlan-vm.sh index fd384814cc4..06e41fe4219 100755 --- a/scripts/vm/network/ovs-pvlan-vm.sh +++ b/scripts/vm/network/ovs-pvlan-vm.sh @@ -86,7 +86,8 @@ then exit 1 fi -trunk_port=1 +# try to find the physical link to outside, only supports eth and em prefix now +trunk_port=`ovs-ofctl show $br | egrep "\((eth|em)[0-9]" | cut -d '(' -f 1|tr -d ' '` if [ "$op" == "add" ] then