Skip to content

Commit a22431a

Browse files
simonxiaossdavem330
authored andcommitted
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. Signed-off-by: Simon Xiao <sixiao@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4c1588a commit a22431a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎tools/hv/bondvf.sh‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ function create_eth_cfg_ubuntu {
134134
local fn=$cfgdir/interfaces
135135

136136
del_eth_cfg_ubuntu $1
137-
138137
echo $'\n'auto $1 >>$fn
139138
echo iface $1 inet manual >>$fn
140139
echo bond-master $2 >>$fn
@@ -143,7 +142,10 @@ function create_eth_cfg_ubuntu {
143142
function create_eth_cfg_pri_ubuntu {
144143
local fn=$cfgdir/interfaces
145144

146-
create_eth_cfg_ubuntu $1 $2
145+
del_eth_cfg_ubuntu $1
146+
echo $'\n'allow-hotplug $1 >>$fn
147+
echo iface $1 inet manual >>$fn
148+
echo bond-master $2 >>$fn
147149
echo bond-primary $1 >>$fn
148150
}
149151

0 commit comments

Comments
 (0)