vm: Fix IP address of DispVM after restore (#247)

IP was set by udev script only on VM start, not restore
This commit is contained in:
Marek Marczykowski 2011-07-09 17:54:47 +02:00
parent f1321e0904
commit 38ad0a52e3

View File

@ -50,6 +50,13 @@ start()
usleep 10
done
echo Back to life.
# Fix IP address (replace template IP with DispVM one)
IP=$(/usr/bin/xenstore-read qubes_ip 2>/dev/null)
if [ "$IP" ]; then
ip addr flush dev eth0
ip addr add dev eth0 $IP/32
ip route add dev eth0
fi
fi
MEM_CHANGE_THRESHOLD_KB=30000