dom0/dispvm: do not fail when qvm-create-default-dvm called as root

This commit is contained in:
Marek Marczykowski 2013-01-27 00:01:56 +01:00
parent 56d0af3059
commit f72dabba87

View File

@ -36,7 +36,7 @@ if ! [ -d "$DVMTMPLDIR" ] ; then
# unfortunately, currently there are reliability issues with save of a domain # unfortunately, currently there are reliability issues with save of a domain
# with multiple CPUs and/or more than 4000M RAM # with multiple CPUs and/or more than 4000M RAM
if ! qvm-create --force-root --vcpus=1 --internal -t "$TEMPLATENAME" -l gray "$DVMTMPL" ; then exit 1 ; fi if ! qvm-create --force-root --vcpus=1 --internal -t "$TEMPLATENAME" -l gray "$DVMTMPL" ; then exit 1 ; fi
MAXMEM=`qvm-prefs $DVMTMPL|grep ^maxmem|awk 'print $3'` MAXMEM=`qvm-prefs --force-root $DVMTMPL|grep ^maxmem|awk 'print $3'`
if [ "$MAXMEM" -ge 4000 ]; then if [ "$MAXMEM" -ge 4000 ]; then
qvm-prefs --force-root -s $DVMTMPL maxmem 4000 qvm-prefs --force-root -s $DVMTMPL maxmem 4000
fi fi