make vm net ip configurable
This commit is contained in:
parent
fe1c6dedcb
commit
f6ef5690e7
@ -17,7 +17,8 @@ GUEST_NAME=${GUEST_NAME:-ALLINONE}
|
|||||||
HOST_IP=${HOST_IP:-`ifconfig xenbr0 | grep "inet addr" | cut -d ":" -f2 | sed "s/ .*//"`}
|
HOST_IP=${HOST_IP:-`ifconfig xenbr0 | grep "inet addr" | cut -d ":" -f2 | sed "s/ .*//"`}
|
||||||
|
|
||||||
# Our nova host's network info
|
# 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}
|
PUB_IP=${PUB_IP:-192.168.1.55}
|
||||||
|
|
||||||
# Public network
|
# Public network
|
||||||
@ -263,6 +264,7 @@ rm -f $XVA
|
|||||||
set_hostname $GUEST_NAME
|
set_hostname $GUEST_NAME
|
||||||
INTERFACES=$STAGING_DIR/etc/network/interfaces
|
INTERFACES=$STAGING_DIR/etc/network/interfaces
|
||||||
cp $TEMPLATES_DIR/interfaces.in $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,@ETH1_NETMASK@,$VM_NETMASK,g" -i $INTERFACES
|
||||||
sed -e "s,@ETH2_IP@,$MGT_IP,g" -i $INTERFACES
|
sed -e "s,@ETH2_IP@,$MGT_IP,g" -i $INTERFACES
|
||||||
sed -e "s,@ETH2_NETMASK@,$MGT_NETMASK,g" -i $INTERFACES
|
sed -e "s,@ETH2_NETMASK@,$MGT_NETMASK,g" -i $INTERFACES
|
||||||
|
@ -6,10 +6,8 @@ iface eth0 inet dhcp
|
|||||||
|
|
||||||
auto eth1
|
auto eth1
|
||||||
iface eth1 inet static
|
iface eth1 inet static
|
||||||
# A host-only ip that let's the interface come up, otherwise unused
|
address @ETH1_IP@
|
||||||
address 10.255.255.255
|
|
||||||
netmask @ETH1_NETMASK@
|
netmask @ETH1_NETMASK@
|
||||||
up ifconfig eth1 up
|
|
||||||
post-up ethtool -K eth1 tx off
|
post-up ethtool -K eth1 tx off
|
||||||
|
|
||||||
auto eth2
|
auto eth2
|
||||||
|
Loading…
Reference in New Issue
Block a user