diff --git a/tools/xen/build_domU.sh b/tools/xen/build_domU.sh index 451d440..0cbeaec 100755 --- a/tools/xen/build_domU.sh +++ b/tools/xen/build_domU.sh @@ -17,7 +17,8 @@ GUEST_NAME=${GUEST_NAME:-ALLINONE} HOST_IP=${HOST_IP:-`ifconfig xenbr0 | grep "inet addr" | cut -d ":" -f2 | sed "s/ .*//"`} # Our nova host's network info -MGT_IP=${MGT_IP:-172.16.100.1} +VM_IP=${VM_IP:-10.255.255.255} # A host-only ip that let's the interface come up, otherwise unused +MGT_IP=${MGT_IP:-172.16.100.55} PUB_IP=${PUB_IP:-192.168.1.55} # Public network @@ -263,6 +264,7 @@ rm -f $XVA set_hostname $GUEST_NAME INTERFACES=$STAGING_DIR/etc/network/interfaces cp $TEMPLATES_DIR/interfaces.in $INTERFACES +sed -e "s,@ETH1_IP@,$VM_IP,g" -i $INTERFACES sed -e "s,@ETH1_NETMASK@,$VM_NETMASK,g" -i $INTERFACES sed -e "s,@ETH2_IP@,$MGT_IP,g" -i $INTERFACES sed -e "s,@ETH2_NETMASK@,$MGT_NETMASK,g" -i $INTERFACES diff --git a/tools/xen/templates/interfaces.in b/tools/xen/templates/interfaces.in index 8fa8840..49c3d68 100644 --- a/tools/xen/templates/interfaces.in +++ b/tools/xen/templates/interfaces.in @@ -6,10 +6,8 @@ iface eth0 inet dhcp auto eth1 iface eth1 inet static - # A host-only ip that let's the interface come up, otherwise unused - address 10.255.255.255 + address @ETH1_IP@ netmask @ETH1_NETMASK@ -up ifconfig eth1 up post-up ethtool -K eth1 tx off auto eth2