Skip to content

Commit

Permalink
ch8: fix: domain cannot write to xenstore.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
koukaipan committed Aug 25, 2013
1 parent 8cf6460 commit 793499a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chapter8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions chapter8/chmod_xenstore.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 793499a

Please sign in to comment.