Skip to contentSkip to conversation

tools: hv: set allow-hotplug for VF on Ubuntu

PATCH Applied Simon Xiao 2 participants 2 messages May 31, 2017 – Jun 2, 2017

Subsystems (3)
lore
Share & tools
lore

Simon Xiao

author
#0 lore raw

PATCH 1/2 tools: hv: set allow-hotplug for VF on Ubuntu

On HyperV, the VF interface can be offered by a host at any time. Mark the VF interface as hotplug, to make sure it will be brought up automatically when it is registered.

---
 tools/hv/bondvf.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tools/hv/bondvf.sh +4 -2
index 112deba..8abd46e 100755
@@ -134,7 +134,6 @@ function create_eth_cfg_ubuntu {
 	local fn=$cfgdir/interfaces
 
 	del_eth_cfg_ubuntu $1
-
 	echo $'\n'auto $1 >>$fn
 	echo iface $1 inet manual >>$fn
 	echo bond-master $2 >>$fn
@@ -143,7 +142,10 @@ function create_eth_cfg_ubuntu {
 function create_eth_cfg_pri_ubuntu {
 	local fn=$cfgdir/interfaces
 
-	create_eth_cfg_ubuntu $1 $2
+	del_eth_cfg_ubuntu $1
+	echo $'\n'allow-hotplug $1 >>$fn
+	echo iface $1 inet manual >>$fn
+	echo bond-master $2 >>$fn
 	echo bond-primary $1 >>$fn
 }
 
Signature · 1 line
2.7.4