X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=create-vm.sh;h=658f41602bf14b42241d1624ae5ad1d1fa5625c1;hb=refs%2Fheads%2Fmaster;hp=49260682490a089251f7c33baaa23bac3f4a240e;hpb=5d0f2ee2524724a97c0b8505fe784a8da9b12c6d;p=build.git diff --git a/create-vm.sh b/create-vm.sh index 49260682..658f4160 100755 --- a/create-vm.sh +++ b/create-vm.sh @@ -10,30 +10,30 @@ 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 -DEFAULT_DISTRO=f33 +DEFAULT_DISTRO=f39 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" @@ -89,8 +89,10 @@ fqdn=$VM_HOSTNAME.$DOMAIN initvm="$BUILD/lbuild-initvm.sh" [ -z "$IMAGE" ] && initvm="$initvm -f $DISTRO" || initvm="$initvm -i $IMAGE" initvm="$initvm -n $fqdn" +# always use fedora repos +initvm="$initvm -u" [ -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 +103,3 @@ fi echo "Running $initvm" echo "Storing output in $LOGS/$container.log" $initvm >& $LOGS/$container.log -