Build and Run TinyVMI
You can directly run a handy bash script in tinyvmi/ directory:
To build and run TinyVMI altogether in a single command:
cd xen-src/stubdom/tinyvmi sudo bash run.tiny.sh build
Or to only make TinyVMI without creating VM:
cd xen-src/stubdom/tinyvmi sudo bash run.tiny.sh make
Or to only run TinyVMI without rebuild:
cd xen-src/stubdom/tinyvmi sudo bash run.tiny.sh
For more details, see the following steps.
# cd ./stubdom/ # make tinyvmi-stubdom
Grant Xenstore Permission to LibVMI
xenstore-chmod can be used to change xenstore permissions. (
xenstore-ls -p to see the current permissions)
Permission of a Xenstore directory/key is defined by format of
L is a letter for the type of permission and
D is the corresponding domain ID. In order to get the domain ID of TinyVMI, you can first create the VM and pause it immediately (within 2 seconds as the main function will wait for 2 seconds before start executing its actual workload codes), then get the ID via
xl list or
xl domid TinyVMI. For example:
# start VM and pause immediately cd ./stubdom/minios-x86_64-tinyvmi xl create ../tinyvmi/domain_config & && \ xl pause TinyVMI && echo "Domain ID of TinyVMI: $(xl domid 'TinyVMI')"
Then, you could run
# change permission of the directory '/local/domain' recursively $ xenstore-chmod -r '/local/domain' rN
This will allow TinyVMI to read the entire directory ‘/local/domain’ in Xenstore.
Now you can resume the TinyVMI by running
xl unpause TinyVMI.