From 507e9652d6a774ea3dbd9c7783f4895fb81a904f Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sun, 16 Dec 2012 03:56:42 +0100 Subject: [PATCH] dom0/dispvm: Use at most 4000M RAM for DispVM Larger maxmem makes DispVM unbootable (some kernel/xen problem). --- dom0/restore/qvm-create-default-dvm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dom0/restore/qvm-create-default-dvm b/dom0/restore/qvm-create-default-dvm index d8c93821..9b04ec0a 100755 --- a/dom0/restore/qvm-create-default-dvm +++ b/dom0/restore/qvm-create-default-dvm @@ -34,8 +34,12 @@ DVMTMPL="$TEMPLATENAME"-dvm DVMTMPLDIR="/var/lib/qubes/appvms/$DVMTMPL" if ! [ -d "$DVMTMPLDIR" ] ; then # unfortunately, currently there are reliability issues with save of a domain - # with multiple CPUs + # 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 + MAXMEM=`qvm-prefs $DVMTMPL|grep ^maxmem|awk 'print $3'` + if [ "$MAXMEM" -ge 4000 ]; then + qvm-prefs --force-root -s $DVMTMPL maxmem 4000 + fi fi if ! /usr/lib/qubes/qubes_prepare_saved_domain.sh \ "$DVMTMPL" "/var/lib/qubes/appvms/$DVMTMPL/dvm-savefile" $SCRIPTNAME ; then