From 793499ab0ffa93081fd41baab42449395c2a1b13 Mon Sep 17 00:00:00 2001 From: Ying-Shiuan Pan Date: Mon, 26 Aug 2013 00:07:22 +0800 Subject: [PATCH] ch8: fix: domain cannot write to xenstore. The access mode of xenstore should be changed before running domain. We can pause domain when creating and then unpause it after we change the access mode. --- chapter8/Makefile | 6 +++++- chapter8/chmod_xenstore.sh | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 chapter8/chmod_xenstore.sh diff --git a/chapter8/Makefile b/chapter8/Makefile index 326f84c..660959d 100644 --- a/chapter8/Makefile +++ b/chapter8/Makefile @@ -31,4 +31,8 @@ clean: rm -f testkernel run: testkernel - sudo xm create -c domain_config + @sudo xm create -p domain_config + @sudo ./chmod_xenstore.sh + @sudo xm unpause Simplest_Kernel + @echo "Unpaused domain\n\n" + @sudo xm console Simplest_Kernel diff --git a/chapter8/chmod_xenstore.sh b/chapter8/chmod_xenstore.sh new file mode 100755 index 0000000..4804c12 --- /dev/null +++ b/chapter8/chmod_xenstore.sh @@ -0,0 +1,5 @@ +#!/bin/sh +dom_id=`xm domid Simplest_Kernel` +echo "Making /local/domain/$dom_id writable..." +sudo xenstore-chmod "/local/domain/$dom_id" b +