X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=create-vm.sh;h=696c8a80adbbf8282be7402e878b7115a75acf8c;hb=fef31bedb34f230ff1c4fd6e8e77ba272efd6c8a;hp=49260682490a089251f7c33baaa23bac3f4a240e;hpb=5d0f2ee2524724a97c0b8505fe784a8da9b12c6d;p=build.git diff --git a/create-vm.sh b/create-vm.sh index 49260682..696c8a80 100755 --- a/create-vm.sh +++ b/create-vm.sh @@ -10,21 +10,21 @@ DIRNAME=$(dirname $0) # something about asking questions during upgrades.. # so I had to turn off the redirection into ~/machines/.log # (*) more badly, the resulting container does not start its network upon boot -# everything is in place and it could be started manually +# everything is in place and it could be started manually # like for the record e.g. # ip link set dev eth0 up # ip address add 138.96.119.13/21 dev eth0 # ip route add default dev eth0 via 138.96.112.250 # ping -c 1 8.8.8.8 # trying to solve that last issue by apt-get install'ing network-manager -# (which was missing indeed) was not enough -# a bit more work seems to be needed if that became needed +# (which was missing indeed) was not enough +# a bit more work seems to be needed if that became needed BUILD="${HOME}/git-build" LOGS=$HOME/machines -[ -d $LOGS ] || { echo "Creating logs dir $LOGS" ; mkdir -p $LOGS; } +[ -d $LOGS ] || { echo "Creating logs dir $LOGS" ; mkdir -p $LOGS; } DOMAIN=pl.sophia.inria.fr @@ -33,7 +33,7 @@ DEFAULT_MEMORY=16384 CONFIRM= function usage () { - message="$@" + message="$@" echo "usage : $COMMAND [-c] [-f distro] [-i image] [ -m memory ] [ -n hostname ] [-s] container" echo " -c : confirm, will show the command and prompt for confirmation " echo " -f : set distro, default is $DEFAULT_DISTRO" @@ -90,7 +90,7 @@ initvm="$BUILD/lbuild-initvm.sh" [ -z "$IMAGE" ] && initvm="$initvm -f $DISTRO" || initvm="$initvm -i $IMAGE" initvm="$initvm -n $fqdn" [ -n "$DO_NOT_START_VM" ] && initvm="$initvm -s" -[ -n "$MEMORY" ] && initvm="$initvm -m $MEMORY" +[ -n "$MEMORY" ] && initvm="$initvm -m $MEMORY" initvm="$initvm $container" if [ -n "$CONFIRM" ] ; then @@ -101,4 +101,3 @@ fi echo "Running $initvm" echo "Storing output in $LOGS/$container.log" $initvm >& $LOGS/$container.log -