if ifname.find("lo")==0: continue
if ifname.find("br")==0: continue
if ifname.find("virbr")==0: continue
+ if ifname.find("veth")==0: continue
if ifname.find("tap")==0: continue
print ifname
EOF
function write_guest_interfaces_test () {
cat <<EOF
auto $VIF_GUEST
-iface $VIF_GUEST
- address $GUEST_IP
- netmask $NETMASK
- gateway $GATEWAY
+iface $VIF_GUEST inet static
+address $GUEST_IP
+netmask $NETMASK
+gateway $GATEWAY
EOF
}
##############################
echo network in guest is up, waiting for ssh...
- #wait max 5 min for sshd to start
+ #wait max 2 min for sshd to start
ssh_up=""
- stop_time=$(($(date +%s) + 300))
current_time=$(date +%s)
+ stop_time=$(($current_time + 120))
counter=1
while [ "$current_time" -lt "$stop_time" ] ; do
# use same NETMASK as bridge interface br0
MASKLEN=$(ip addr show $PUBLIC_BRIDGE | grep -v inet6 | grep inet | awk '{print $2;}' | cut -d/ -f2)
NETMASK=$(masklen_to_netmask $MASKLEN)
- GATEWAY=$(ip route show | grep default | awk '{print $3}')
+ GATEWAY=$(ip route show | grep default | awk '{print $3}' | head -1)
VIF_HOST="i$(echo $GUEST_HOSTNAME | cut -d. -f1)"
fi