HOWTO: xen tools within FreeBSD domU
Janne Snabb
snabb at epipe.com
Sun Jan 30 12:56:35 UTC 2011
I wanted to look at xenstore contents from my domU. domU does not
have access to all data but the entries related to the domU instance
in question are available. I am posting this in case it happens to
be useful to someone else. It would be easy to make a xenstore-clients
or xen-tools-domU port.
Here is how to get a working "xenstore-ls" command and other xen
tools for your FreeBSD domU:
Building & installation
-----------------------
Prerequisites: gmake, XENHVM or XEN kernel (GENERIC will not work)
1. ftp http://bits.xensource.com/oss-xen/release/4.0.1/xen-4.0.1.tar.gz
2. tar xvfz xen-4.0.1.tar.gz
3. cd xen-4.0.1/tools
4. gmake -C include
5. cd misc
6. gmake xen-detect
7. install xen-detect /usr/local/bin
8. cd ../xenstore
9. Build client library and programs:
gmake clients
10. Install client library and programs:
install libxenstore.so.3.0 /usr/local/lib
install xenstore xenstore-control /usr/local/bin
cd /usr/local/bin
ln xenstore xenstore-chmod
ln xenstore xenstore-exists
ln xenstore xenstore-list
ln xenstore xenstore-ls
ln xenstore xenstore-read
ln xenstore xenstore-rm
ln xenstore xenstore-write
Usage
-----
1. Set required environment variable:
export XENSTORED_PATH=/dev/xen/xenstore
(Alternatively you could patch tools/xenstore/xs_lib.c function
xs_domain_dev() before compiling.)
2. Now you can do things such as:
xen-detect
xenstore-ls device
xenstore-ls -f /local/domain/0/backend/vif/11/0
xenstore-read name
Best Regards,
--
Janne Snabb / EPIPE Communications
snabb at epipe.com - http://epipe.com/
More information about the freebsd-xen
mailing list