X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lbuild-initvm.sh;h=127055450aba036bc1b9b3590e35e8e909cc2f18;hb=72d3e4720f63270c8eca20d38eeee96b728bc8f1;hp=85c1f82a73baaa894214093787338c19ef19caa3;hpb=c10dd89d76d280fc7ee09b4ba384acf6883c08cf;p=build.git diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 85c1f82a..12705545 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -166,9 +166,12 @@ function fedora_download() { RELEASE_URL1="$MIRROR_URL/Packages/fedora-release-$release-1.noarch.rpm" # with fedora18 the rpms are scattered by first name RELEASE_URL2="$MIRROR_URL/Packages/f/fedora-release-$release-1.noarch.rpm" + # with fedora21 somehow this one came numbered -2 + RELEASE_URL3="$MIRROR_URL/Packages/f/fedora-release-$release-2.noarch.rpm" + RELEASE_TARGET=$INSTALL_ROOT/fedora-release-$release.noarch.rpm found="" - for attempt in $RELEASE_URL1 $RELEASE_URL2; do + for attempt in $RELEASE_URL1 $RELEASE_URL2 $RELEASE_URL3; do if curl -f $attempt -o $RELEASE_TARGET ; then echo "Retrieved $attempt" found=true @@ -647,7 +650,10 @@ function post_install () { if [ -n "$START_VM" ] ; then virsh -c lxc:/// start $lxc # manually run dhclient in guest - somehow this network won't start on its own - virsh -c lxc:/// lxc-enter-namespace $lxc /usr/bin/$personality /bin/bash -c "dhclient $VIF_GUEST" + # we need the --noseclabel flag with recent libvirt's + # was not required with f20/libvirt-1.2.5 + # but is now with f21/libvirt-1.2.9 + virsh -c lxc:/// lxc-enter-namespace --noseclabel $lxc /usr/bin/$personality /bin/bash -c "dhclient $VIF_GUEST" fi else post_install_myplc $lxc $personality