From: Adrian Schröter Date: Fri, 7 May 2010 15:37:17 +0000 (+0200) Subject: kill a possible existing xen instance first X-Git-Tag: obs_2.0~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f3b422821b82e8cdd7da66208ffebfd5474b4a39;p=tools%2Fobs-build.git kill a possible existing xen instance first --- diff --git a/build b/build index 52d7a96..57db5c0 100755 --- a/build +++ b/build @@ -1104,6 +1104,13 @@ if test -z "$RUNNING_IN_VM" ; then echo "using $VM_SWAP as vm swap" fi fi + if [ "$VM_TYPE" = 'xen' ]; then + # this should not be needed, but sometimes a xen instance got lost + XENID="${VM_IMAGE%/root}" + XENID="${XENID%/tmpfs}" + XENID="${XENID##*/}" + xm destroy "build:$XENID" >/dev/null 2>&1 + fi if test ! -e "$VM_IMAGE"; then echo "Creating $VM_IMAGE (${VMDISK_ROOTSIZE}M)" mkdir -p "${VM_IMAGE%/*}"