mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-05-31 00:39:57 +00:00
arm-autonomy, xenguest: Fail if Dom0 is not properly initialized
During the xenguest initialization and when invoking the xenguest-manager tool, abort the execution if Dom0 was not properly initialized on top of Xen and with the proper kernel configurations. Change-Id: I307c03e58a266a943968df1bc5ba39951912d2cb Issue-Id: SCM-996 Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -12,6 +12,9 @@ fi
|
|||||||
|
|
||||||
source ${XENGUEST_CONF_BASE}/xenguest-manager.conf
|
source ${XENGUEST_CONF_BASE}/xenguest-manager.conf
|
||||||
|
|
||||||
|
# Make sure we properly initialized the Dom0
|
||||||
|
/usr/bin/xenguest-manager check-xen || exit $?
|
||||||
|
|
||||||
# Create guest list
|
# Create guest list
|
||||||
guestlist=$(/usr/bin/xenguest-manager list)
|
guestlist=$(/usr/bin/xenguest-manager list)
|
||||||
|
|
||||||
|
|||||||
@@ -566,6 +566,24 @@ case ${cmd} in
|
|||||||
usage
|
usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Check if we have a valid Dom0 booted with Xen
|
||||||
|
ERROR_MSG=$(xl info 2>&1)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERROR: Xen environment is not valid!!!" | tee -a ${LOGFILE}
|
||||||
|
echo "ERROR: Check if Xen has booted and the kernel configuration." \
|
||||||
|
| tee -a ${LOGFILE}
|
||||||
|
echo "ERROR: Output from 'xl info' command:" | tee -a ${LOGFILE}
|
||||||
|
echo "$ERROR_MSG" | tee -a ${LOGFILE}
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
case ${cmd} in
|
||||||
|
check-xen)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
create)
|
create)
|
||||||
guestfile="${arg1}"
|
guestfile="${arg1}"
|
||||||
guestname="${arg2}"
|
guestname="${arg2}"
|
||||||
|
|||||||
Reference in New Issue
Block a user