From owner-freebsd-xen@FreeBSD.ORG Sun Jan 30 12:56:35 2011 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F315106566B for ; Sun, 30 Jan 2011 12:56:35 +0000 (UTC) (envelope-from snabb@epipe.com) Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:1828:0:3::2]) by mx1.freebsd.org (Postfix) with ESMTP id 681F68FC13 for ; Sun, 30 Jan 2011 12:56:35 +0000 (UTC) Received: from tiktik.epipe.com (tiktik.epipe.com [IPv6:2001:1828:0:3::2]) by tiktik.epipe.com (8.14.4/8.14.4) with ESMTP id p0UCuYqO045336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 30 Jan 2011 12:56:34 GMT (envelope-from snabb@epipe.com) X-DKIM: Sendmail DKIM Filter v2.8.3 tiktik.epipe.com p0UCuYqO045336 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=epipe.com; s=default; t=1296392194; x=1296996994; bh=Fuh14w857fIACwNUzdsYOLrUEev6IVL3zExOdQ/lAGc=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=H/eLcX+qmhyVLXyCcGiG/97eXy+n2u6g6tCh7G9B75tdojrpN7oOCTL/ueCY1JIXu MmIZd5/wHdHj55472K6VorkTgETVVOW6Ucm0ffVQQeAmFC5cVkuPwPXIf16Jl36qe3 7X6ziUIO9hbExmdsAuMCXcH4YFopOnhNyUOM7HMc= Date: Sun, 30 Jan 2011 12:56:34 +0000 (UTC) From: Janne Snabb To: freebsd-xen@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.6 (tiktik.epipe.com [IPv6:2001:1828:0:3::2]); Sun, 30 Jan 2011 12:56:34 +0000 (UTC) Subject: HOWTO: xen tools within FreeBSD domU X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 12:56:35 -0000 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@epipe.com - http://epipe.com/