From xen-api-bounces@lists.xensource.com Tue Jul 01 13:15:34 2008
Return-path: <xen-api-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Tue, 01 Jul 2008 13:15:34 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KDmGE-0000RP-Hs; Tue, 01 Jul 2008 13:15:34 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KDmGB-0000Qw-9N
	for xen-api@lists.xensource.com; Tue, 01 Jul 2008 13:15:31 -0700
X-ASG-Debug-ID: 1214943329-6704000e0000-trChs3
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from SMTP02.CITRIX.COM (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP id 2CE8A535B2
	for <xen-api@lists.xensource.com>; Tue,  1 Jul 2008 13:15:29 -0700 (PDT)
Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) by
	spam.xensource.com with ESMTP id zn85kGdP6JSpMFHE for
	<xen-api@lists.xensource.com>; Tue, 01 Jul 2008 13:15:29 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.27,732,1204520400"; d="scan'208,217";a="10256381"
Received: from ftlpexchmx02.citrite.net ([10.9.154.127])
	by FTLPIPO02.CITRIX.COM with ESMTP; 01 Jul 2008 16:15:29 -0400
Received: from FTLPEXCH05.citrite.net ([10.13.100.93]) by
	FTLPEXCHMX02.citrite.net with Microsoft SMTPSVC(6.0.3790.3959); 
	Tue, 1 Jul 2008 16:15:29 -0400
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
X-ASG-Orig-Subj: Xen API Project Meeting Tommorow
Date: Tue, 1 Jul 2008 16:15:09 -0400
Message-ID: <E3ADFAD82A5FE147AEF0C82912BC002004FADBA1@FTLPEXCH05.citrite.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Xen API Project Meeting Tommorow
thread-index: AcjbtylX0sfkdoXCQDGNlrvTvc5DZA==
From: "Stephen Spector" <stephen.spector@citrix.com>
To: <xen-api@lists.xensource.com>
X-OriginalArrivalTime: 01 Jul 2008 20:15:29.0083 (UTC)
	FILETIME=[34C430B0:01C8DBB7]
X-Barracuda-Connect: smtp02.citrix.com[66.165.176.63]
X-Barracuda-Start-Time: 1214943330
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.54889
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	0.00 HTML_MESSAGE           BODY: HTML included in message
Subject: [Xen-API] Xen API Project Meeting Tommorow
X-BeenThere: xen-api@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-api@lists.xensource.com>
List-Help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0483016466=="
Sender: xen-api-bounces@lists.xensource.com
Errors-To: xen-api-bounces@lists.xensource.com

This is a multi-part message in MIME format.

--===============0483016466==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C8DBB7.2A7CCF07"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C8DBB7.2A7CCF07
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

The second meeting for the Xen API Community Project is scheduled with 2
Citrix engineers joining the call to answer questions raised in our last
meeting.=20

Meeting info:

July 2, 2008  from 1:30 - 2:30 pm EST

1.888.371.8921
Int'l: http://www.btconferencing.com/citrix/globalaccess/=20
Code: 275279

If you cannot attend the meeting, I will be posting notes on the project
page in the Wiki: http://wiki.xensource.com/xenwiki/XenApi=20

=20

Stephen Spector

Sr. Program Manager, Xen.org

954.267.2853

stephen.spector@xen.org <mailto:stephen.spector@xen.org>=20

=20


------_=_NextPart_001_01C8DBB7.2A7CCF07
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p>The second meeting for the Xen API Community Project is scheduled =
with 2
Citrix engineers joining the call to answer questions raised in our last
meeting. <o:p></o:p></p>

<p>Meeting info:<o:p></o:p></p>

<p>July 2, 2008&nbsp; from 1:30 - 2:30 pm EST<o:p></o:p></p>

<p>1.888.371.8921<br>
Int&#8217;l: <a =
href=3D"http://www.btconferencing.com/citrix/globalaccess/">http://www.bt=
conferencing.com/citrix/globalaccess/</a>
<br>
Code: 275279<o:p></o:p></p>

<p class=3DMsoNormal>If you cannot attend the meeting, I will be posting =
notes on
the project page in the Wiki: <a =
href=3D"http://wiki.xensource.com/xenwiki/XenApi">http://wiki.xensource.c=
om/xenwiki/XenApi</a>
<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Stephen
Spector</span><span style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Sr.
Program Manager, Xen.org</span><span =
style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>954.267.2853<=
/span><span
style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'><a
href=3D"mailto:stephen.spector@xen.org"><span =
style=3D'color:blue'>stephen.spector@xen.org</span></a></span><span
style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:12.0pt;font-family:"Times =
New Roman","serif"'>&nbsp;</span><o:p></o:p></p>

</div>

</body>

</html>

------_=_NextPart_001_01C8DBB7.2A7CCF07--


--===============0483016466==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
xen-api mailing list
xen-api@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-api

--===============0483016466==--


From xen-devel-bounces@lists.xensource.com Wed Jul 02 04:36:30 2008
Return-path: <xen-devel-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Wed, 02 Jul 2008 04:36:30 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KE0dS-0003Sx-6e; Wed, 02 Jul 2008 04:36:30 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KE0d8-0003Ga-IM
	for xen-devel@lists.xensource.com; Wed, 02 Jul 2008 04:36:10 -0700
X-ASG-Debug-ID: 1214998568-3aa500010000-8pertM
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from tyo202.gate.nec.co.jp (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP
	id B68ED544F3; Wed,  2 Jul 2008 04:36:09 -0700 (PDT)
Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [202.32.8.206]) by
	spam.xensource.com with ESMTP id mDPY4wG1992ZNcMg;
	Wed, 02 Jul 2008 04:36:09 -0700 (PDT)
Received: from mailgate4.nec.co.jp (mailgate53.nec.co.jp [10.7.69.184])
	by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m62Ba8l0014121; 
	Wed, 2 Jul 2008 20:36:08 +0900 (JST)
Received: (from root@localhost) by mailgate4.nec.co.jp
	(8.11.7/3.7W-MAILGATE-NEC)
	id m62Ba8D27874; Wed, 2 Jul 2008 20:36:08 +0900 (JST)
Received: from kaishu.jp.nec.com (kaishu.jp.nec.com [10.26.220.5])
	by mailsv3.nec.co.jp (8.13.8/8.13.4) with ESMTP id m62Ba7Fq020684;
	Wed, 2 Jul 2008 20:36:07 +0900 (JST)
Received: from [10.34.123.125] ([10.34.123.125] [10.34.123.125]) by
	mail.jp.nec.com with ESMTP; Wed, 2 Jul 2008 20:36:07 +0900
Message-Id: <486B6827.3090700@ab.jp.nec.com>
Date: Wed, 02 Jul 2008 20:36:07 +0900
From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
To: xen-devel@lists.xensource.com, xen-api@lists.xensource.com
X-ASG-Orig-Subj: [PATCH][0/3] XenAPI: Add PCI Assignment Support
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
X-Barracuda-Connect: TYO202.gate.nec.co.jp[202.32.8.206]
X-Barracuda-Start-Time: 1214998569
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.54947
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
Cc: 
Subject: [Xen-devel] [PATCH][0/3] XenAPI: Add PCI Assignment Support
X-BeenThere: xen-devel@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Xen developer discussion <xen-devel.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-devel@lists.xensource.com>
List-Help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
Sender: xen-devel-bounces@lists.xensource.com
Errors-To: xen-devel-bounces@lists.xensource.com

Hi all,

This series of patches is an attempt to support pci pass-through device
assignment via xen-api.

There already is 'PCI_bus' parameter in VM class to specify pci device
to be assigned, but it doesn't work now. Another problem is that pci
device hotplug/coldplug cannot be supported with the current model.

So I decided to implement fully-functional pci assignment support to
xen-api. Below is the basic design of new class models.

PPCI: Represents physical pci devices belonging to the host.
      ppci instances are automatically generated by xend and contain
      domain:bus:slot:func number, vendor name, device name and
      other information.
DPCI: Represents direct pci devices. dpci instances work as connectors
      between a vm and a physical pci device. Creation of a dpci device
      will result in attachment of the pci device and deletion will
      result in detachment.
+------------+ *      1 +----------+
|     VM     |----------|   host   |
+------------+          +----------+
    1 |                      | 1
      |                      |
    * |                      | *
+-------------+ 0,1   1 +----------+
|    DPCI     |---------|   PPCI   |
+-------------+         +----------+

BTW I'm aware that there is xen-api community project going on.
If there's any decision made about discussing/merging procedure of
xen-api related patches, please let me know.
Technical suggestions and comments are welcome, of course.

Regards,
-----------------------
Yosuke Iwamatsu
        NEC Corporation

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

From xen-devel-bounces@lists.xensource.com Wed Jul 02 04:37:16 2008
Return-path: <xen-devel-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Wed, 02 Jul 2008 04:37:16 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KE0eC-0003wG-Gb; Wed, 02 Jul 2008 04:37:16 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KE0dq-0003ix-Kv
	for xen-devel@lists.xensource.com; Wed, 02 Jul 2008 04:36:54 -0700
X-ASG-Debug-ID: 1214998612-34b300170000-8pertM
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from tyo202.gate.nec.co.jp (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP
	id D12ED544F9; Wed,  2 Jul 2008 04:36:53 -0700 (PDT)
Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [202.32.8.206]) by
	spam.xensource.com with ESMTP id gT6OpA1eBQMaPSXk;
	Wed, 02 Jul 2008 04:36:53 -0700 (PDT)
Received: from mailgate4.nec.co.jp (mailgate53.nec.co.jp [10.7.69.184])
	by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m62BaqrS014571; 
	Wed, 2 Jul 2008 20:36:52 +0900 (JST)
Received: (from root@localhost) by mailgate4.nec.co.jp
	(8.11.7/3.7W-MAILGATE-NEC)
	id m62Baqc28367; Wed, 2 Jul 2008 20:36:52 +0900 (JST)
Received: from yonosuke.jp.nec.com (yonosuke.jp.nec.com [10.26.220.15])
	by mailsv4.nec.co.jp (8.13.8/8.13.4) with ESMTP id m62BaqoY021489;
	Wed, 2 Jul 2008 20:36:52 +0900 (JST)
Received: from [10.34.123.125] ([10.34.123.125] [10.34.123.125]) by
	mail.jp.nec.com with ESMTP; Wed, 2 Jul 2008 20:36:51 +0900
Message-Id: <486B6853.30302@ab.jp.nec.com>
Date: Wed, 02 Jul 2008 20:36:51 +0900
From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
To: xen-devel@lists.xensource.com, xen-api@lists.xensource.com
X-ASG-Orig-Subj: [PATCH][1/3] XenAPI: Add Physical PCI Device (PPCI) Support
Content-Type: multipart/mixed; boundary="------------010109090907020907080401"
X-Barracuda-Connect: TYO202.gate.nec.co.jp[202.32.8.206]
X-Barracuda-Start-Time: 1214998613
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.54947
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
Cc: 
Subject: [Xen-devel] [PATCH][1/3] XenAPI: Add Physical PCI Device (PPCI)
	Support
X-BeenThere: xen-devel@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Xen developer discussion <xen-devel.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-devel@lists.xensource.com>
List-Help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
Sender: xen-devel-bounces@lists.xensource.com
Errors-To: xen-devel-bounces@lists.xensource.com

This is a multi-part message in MIME format.
--------------010109090907020907080401
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

Add support for PPCI class, which represents physical pci devices.
This makes it possible for remote servers to get information about
devices the host contains.

Here is the fields for PPCI class.
-----------------------------
(RO_run) host
         domain
         bus
         slot
         func
         name
         vendor_id
         vendor_name
         device_id
         device_name
         revision_id
         class_code
         class_name
         subsystem_vendor_id
         subsystem_vendor_name
         subsystem_id
         subsystem_name
         driver
------------------------------

One thing to be noted; this patch uses 'lspci' command to obtain
information (such as vendor_name, device_name, class_name etc) which
we cannot get from sysfs. If 'lspci' command does not exist, these
fields will be just left blank.

Regards,
-----------------------
Yosuke Iwamatsu
        NEC Corporation

--------------010109090907020907080401
Content-Type: all/allfiles;
 name="xenapi_ppci.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="xenapi_ppci.patch"

XenAPI: Add Physical PCI Device (PPCI) Support

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>

diff -r 19970181d6a4 -r fdf409891cd6 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py	Tue Jul 01 14:50:35 2008 +0100
+++ b/tools/python/xen/util/pci.py	Wed Jul 02 17:59:30 2008 +0900
@@ -8,6 +8,8 @@ import sys
 import sys
 import os, os.path
 import resource
+import re
+import types
 
 PROC_MNT_PATH = '/proc/mounts'
 PROC_PCI_PATH = '/proc/bus/pci/devices'
@@ -22,6 +24,9 @@ SYSFS_PCI_DEV_DEVICE_PATH = '/device'
 SYSFS_PCI_DEV_DEVICE_PATH = '/device'
 SYSFS_PCI_DEV_SUBVENDOR_PATH = '/subsystem_vendor'
 SYSFS_PCI_DEV_SUBDEVICE_PATH = '/subsystem_device'
+SYSFS_PCI_DEV_CLASS_PATH = '/class'
+
+LSPCI_CMD = 'lspci'
 
 PCI_BAR_IO = 0x01
 PCI_BAR_IO_MASK = ~0x03
@@ -32,6 +37,9 @@ MSIX_BIR_MASK = 0x7
 MSIX_BIR_MASK = 0x7
 MSIX_SIZE_MASK = 0x7ff
 
+# Global variable to store information from lspci
+lspci_info = None
+
 #Calculate PAGE_SHIFT: number of bits to shift an address to get the page number
 PAGE_SIZE = resource.getpagesize()
 PAGE_SHIFT = 0
@@ -45,6 +53,15 @@ def PCI_DEVFN(slot, func):
 def PCI_DEVFN(slot, func):
     return ((((slot) & 0x1f) << 3) | ((func) & 0x07))
 
+def parse_hex(val):
+    try:
+        if isinstance(val, types.StringTypes):
+            return int(val, 16)
+        else:
+            return val
+    except ValueError:
+        return None
+
 def find_sysfs_mnt():
     mounts_file = open(PROC_MNT_PATH,'r')
 
@@ -57,6 +74,61 @@ def find_sysfs_mnt():
             return sline[1]
 
     return None
+
+def get_all_pci_names():
+    try:
+        sysfs_mnt = find_sysfs_mnt()
+    except IOError, (errno, strerr):
+        raise PciDeviceParseError(('Failed to locate sysfs mount: %s (%d)' %
+            (PROC_PCI_PATH, strerr, errno)))
+
+    pci_names = os.popen('ls ' + sysfs_mnt + SYSFS_PCI_DEVS_PATH).read().split()
+
+    return pci_names
+
+def get_all_pci_devices():
+    pci_devs = []
+    for pci_name in get_all_pci_names():
+        pci_match = re.match(r"((?P<domain>[0-9a-fA-F]{1,4})[:,])?" + \
+                r"(?P<bus>[0-9a-fA-F]{1,2})[:,]" + \
+                r"(?P<slot>[0-9a-fA-F]{1,2})[.,]" + \
+                r"(?P<func>[0-7])$", pci_name)
+        if pci_match is None:
+            raise PciDeviceParseError(('Failed to parse pci device name: %s' %
+                pci_name))
+        pci_dev_info = pci_match.groupdict('0')
+        domain = parse_hex(pci_dev_info['domain'])
+        bus = parse_hex(pci_dev_info['bus'])
+        slot = parse_hex(pci_dev_info['slot'])
+        func = parse_hex(pci_dev_info['func'])
+        try:
+            pci_dev = PciDevice(domain, bus, slot, func)
+        except:
+            continue
+        pci_devs.append(pci_dev)
+
+    return pci_devs
+
+def create_lspci_info():
+    global lspci_info
+    lspci_info = {}
+
+    # Execute 'lspci' command and parse the result.
+    # If the command does not exist, lspci_info will be kept blank ({}).
+    for paragraph in os.popen(LSPCI_CMD + ' -vmmD').read().split('\n\n'):
+        device_name = None
+        device_info = {}
+        for line in paragraph.split('\n'):
+            try:
+                (opt, value) = line.split(':\t')
+                if opt == 'Slot':
+                    device_name = value
+                else:
+                    device_info[opt] = value
+            except:
+                pass
+        if device_name is not None:
+            lspci_info[device_name] = device_info
 
 class PciDeviceNotFoundError(Exception):
     def __init__(self,domain,bus,slot,func):
@@ -92,7 +164,15 @@ class PciDevice:
         self.subdevice = None
         self.msix = 0
         self.msix_iomem = []
+        self.revision = 0
+        self.classcode = None
+        self.vendorname = ""
+        self.devicename = ""
+        self.classname = ""
+        self.subvendorname = ""
+        self.subdevicename = ""
         self.get_info_from_sysfs()
+        self.get_info_from_lspci()
 
     def find_capability(self, type):
         try:
@@ -208,9 +288,8 @@ class PciDevice:
                 self.name+SYSFS_PCI_DEV_DRIVER_DIR_PATH
         try:
             self.driver = os.path.basename(os.readlink(path))
-        except IOError, (errno, strerr):
-            raise PciDeviceParseError(('Failed to read %s: %s (%d)' %
-                (path, strerr, errno)))
+        except OSError, (errno, strerr):
+            self.driver = ""
 
         path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
                 self.name+SYSFS_PCI_DEV_VENDOR_PATH
@@ -243,6 +322,36 @@ class PciDevice:
         except IOError, (errno, strerr):
             raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
                 (path, strerr, errno)))
+
+        path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
+                self.name+SYSFS_PCI_DEV_CLASS_PATH
+        try:
+            self.classcode = int(open(path,'r').readline(), 16)
+        except IOError, (errno, strerr):
+            raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
+                (path, strerr, errno)))
+
+        return True
+
+    def get_info_from_lspci(self):
+        """ Get information such as vendor name, device name, class name, etc.
+        Since we cannot obtain these data from sysfs, use 'lspci' command.
+        """
+        global lspci_info
+
+        if lspci_info is None:
+            create_lspci_info()
+
+        try:
+            device_info = lspci_info[self.name]
+            self.revision = int(device_info['Rev'], 16)
+            self.vendorname = device_info['Vendor']
+            self.devicename = device_info['Device']
+            self.classname = device_info['Class']
+            self.subvendorname = device_info['SVendor']
+            self.subdevicename = device_info['SDevice']
+        except KeyError:
+            pass
 
         return True
 
diff -r 19970181d6a4 -r fdf409891cd6 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py	Tue Jul 01 14:50:35 2008 +0100
+++ b/tools/python/xen/xend/XendAPI.py	Wed Jul 02 17:59:30 2008 +0900
@@ -40,6 +40,7 @@ from XendVMMetrics import XendVMMetrics
 from XendVMMetrics import XendVMMetrics
 from XendPIF import XendPIF
 from XendPBD import XendPBD
+from XendPPCI import XendPPCI
 from XendXSPolicy import XendXSPolicy, XendACMPolicy
 
 from XendAPIConstants import *
@@ -476,7 +477,8 @@ classes = {
     'PIF'          : valid_object("PIF"),
     'VM_metrics'   : valid_object("VM_metrics"),
     'PBD'          : valid_object("PBD"),
-    'PIF_metrics'  : valid_object("PIF_metrics")
+    'PIF_metrics'  : valid_object("PIF_metrics"),
+    'PPCI'         : valid_object("PPCI"),
 }
 
 autoplug_classes = {
@@ -485,6 +487,7 @@ autoplug_classes = {
     'VM_metrics'  : XendVMMetrics,
     'PBD'         : XendPBD,
     'PIF_metrics' : XendPIFMetrics,
+    'PPCI'        : XendPPCI,
     'XSPolicy'    : XendXSPolicy,
     'ACMPolicy'   : XendACMPolicy,
 }
@@ -874,6 +877,7 @@ class XendAPI(object):
                     'resident_VMs',
                     'PBDs',
                     'PIFs',
+                    'PPCIs',
                     'host_CPUs',
                     'cpu_configuration',
                     'metrics',
@@ -952,6 +956,8 @@ class XendAPI(object):
         return xen_api_success(XendPBD.get_all())
     def host_get_PIFs(self, session, ref):
         return xen_api_success(XendNode.instance().get_PIF_refs())
+    def host_get_PPCIs(self, session, ref):
+        return xen_api_success(XendNode.instance().get_PPCI_refs())
     def host_get_host_CPUs(self, session, host_ref):
         return xen_api_success(XendNode.instance().get_host_cpu_refs())
     def host_get_metrics(self, _, ref):
@@ -1027,7 +1033,8 @@ class XendAPI(object):
                   'sched_policy': node.get_vcpus_policy(),
                   'logging': {},
                   'PIFs': XendPIF.get_all(),
-                  'PBDs': XendPBD.get_all()}
+                  'PBDs': XendPBD.get_all(),
+                  'PPCIs': XendPPCI.get_all()}
         return xen_api_success(record)
 
     # class methods
@@ -1288,7 +1295,7 @@ class XendAPI(object):
     def VM_get_consoles(self, session, vm_ref):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return xen_api_success(dom.get_consoles())
-    
+
     def VM_get_tools_version(self, session, vm_ref):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return dom.get_tools_version()
diff -r 19970181d6a4 -r fdf409891cd6 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py	Tue Jul 01 14:50:35 2008 +0100
+++ b/tools/python/xen/xend/XendNode.py	Wed Jul 02 17:59:30 2008 +0900
@@ -21,6 +21,7 @@ import xen.lowlevel.xc
 import xen.lowlevel.xc
 
 from xen.util import Brctl
+from xen.util import pci as PciUtil
 from xen.xend import XendAPIStore
 
 import uuid, arch
@@ -35,6 +36,7 @@ from XendNetwork import *
 from XendNetwork import *
 from XendStateStore import XendStateStore
 from XendMonitor import XendMonitor
+from XendPPCI import XendPPCI
      
 class XendNode:
     """XendNode - Represents a Domain 0 Host."""
@@ -49,6 +51,7 @@ class XendNode:
         * PIF_metrics
         * network
         * Storage Repository
+        * PPCI
         """
         
         self.xc = xen.lowlevel.xc.xc()
@@ -230,6 +233,41 @@ class XendNode:
                 except CreateUnspecifiedAttributeError:
                     log.warn("Error recreating PBD %s", pbd_uuid) 
 
+
+        # Initialise PPCIs
+        saved_ppcis = self.state_store.load_state('ppci')
+        saved_ppci_table = {}
+        if saved_ppcis:
+            for ppci_uuid, ppci_record in saved_ppcis.items():
+                try:
+                    saved_ppci_table[ppci_record['name']] = ppci_uuid
+                except KeyError:
+                    pass
+
+        for pci_dev in PciUtil.get_all_pci_devices():
+            ppci_record = {
+                'domain':                   pci_dev.domain,
+                'bus':                      pci_dev.bus,
+                'slot':                     pci_dev.slot,
+                'func':                     pci_dev.func,
+                'vendor_id':                pci_dev.vendor,
+                'vendor_name':              pci_dev.vendorname,
+                'device_id':                pci_dev.device,
+                'device_name':              pci_dev.devicename,
+                'revision_id':              pci_dev.revision,
+                'class_code':               pci_dev.classcode,
+                'class_name':               pci_dev.classname,
+                'subsystem_vendor_id':      pci_dev.subvendor,
+                'subsystem_vendor_name':    pci_dev.subvendorname,
+                'subsystem_id':             pci_dev.subdevice,
+                'subsystem_name':           pci_dev.subdevicename,
+                'driver':                   pci_dev.driver
+                }
+            # If saved uuid exists, use it. Otherwise create one.
+            ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString())
+            XendPPCI(ppci_uuid, ppci_record)
+
+
 ##    def network_destroy(self, net_uuid):
  ##       del self.networks[net_uuid]
   ##      self.save_networks()
@@ -270,6 +308,15 @@ class XendNode:
 
 ##         del self.pifs[pif_uuid]
 ##         self.save_PIFs()
+
+
+    def get_PPCI_refs(self):
+        return XendPPCI.get_all()
+
+    def get_ppci_by_uuid(self, ppci_uuid):
+        if ppci_uuid in self.get_PPCI_refs():
+            return ppci_uuid
+        return None
 
 
     def save(self):
@@ -284,6 +331,7 @@ class XendNode:
         self.save_networks()
         self.save_PBDs()
         self.save_SRs()
+        self.save_PPCIs()
 
     def save_PIFs(self):
         pif_records = dict([(pif_uuid, XendAPIStore.get(
@@ -307,6 +355,12 @@ class XendNode:
         sr_records = dict([(k, v.get_record(transient = False))
                             for k, v in self.srs.items()])
         self.state_store.save_state('sr', sr_records)
+
+    def save_PPCIs(self):
+        ppci_records = dict([(ppci_uuid, XendAPIStore.get(
+                                 ppci_uuid, "PPCI").get_record())
+                            for ppci_uuid in XendPPCI.get_all()])
+        self.state_store.save_state('ppci', ppci_records)
 
     def shutdown(self):
         return 0
diff -r 19970181d6a4 -r fdf409891cd6 tools/python/xen/xend/XendPPCI.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/python/xen/xend/XendPPCI.py	Wed Jul 02 17:59:30 2008 +0900
@@ -0,0 +1,158 @@
+#============================================================================
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#============================================================================
+# Copyright (c) 2008 NEC Corporation
+#       Yosuke Iwamatsu <y-iwamatsu at ab jp nec com>
+#============================================================================
+
+from xen.xend.XendBase import XendBase
+from xen.xend.XendBase import XendAPIStore
+from xen.xend import uuid as genuuid
+
+class XendPPCI(XendBase):
+    """Representation of a physical PCI device."""
+
+    def getClass(self):
+        return "PPCI"
+
+    def getAttrRO(self):
+        attrRO = ['host',
+                  'domain',
+                  'bus',
+                  'slot',
+                  'func',
+                  'name',
+                  'vendor_id',
+                  'vendor_name',
+                  'device_id',
+                  'device_name',
+                  'revision_id',
+                  'class_code',
+                  'class_name',
+                  'subsystem_vendor_id',
+                  'subsystem_vendor_name',
+                  'subsystem_id',
+                  'subsystem_name',
+                  'driver']
+        return XendBase.getAttrRO() + attrRO
+
+    def getAttrRW(self):
+        attrRW = []
+        return XendBase.getAttrRW() + attrRW
+
+    def getAttrInst(self):
+        attrInst = []
+        return XendBase.getAttrInst() + attrInst
+
+    def getMethods(self):
+        methods = []
+        return XendBase.getMethods() + methods
+
+    def getFuncs(self):
+        funcs = []
+        return XendBase.getFuncs() + funcs
+
+    getClass    = classmethod(getClass)
+    getAttrRO   = classmethod(getAttrRO)
+    getAttrRW   = classmethod(getAttrRW)
+    getAttrInst = classmethod(getAttrInst)
+    getMethods  = classmethod(getMethods)
+    getFuncs    = classmethod(getFuncs)
+ 
+    def get_by_sbdf(self, domain, bus, slot, func):
+        for ppci in XendAPIStore.get_all("PPCI"):
+            if ppci.get_domain() == int(domain, 16) and \
+               ppci.get_bus() == int(bus, 16) and \
+               ppci.get_slot() == int(slot, 16) and \
+               ppci.get_func() == int(func, 16):
+                return ppci.get_uuid()
+        return None
+
+    get_by_sbdf = classmethod(get_by_sbdf)
+
+    def __init__(self, uuid, record):
+        self.domain = record['domain']
+        self.bus = record['bus']
+        self.slot = record['slot']
+        self.func = record['func']
+        self.vendor_id = record['vendor_id']
+        self.vendor_name = record['vendor_name']
+        self.device_id = record['device_id']
+        self.device_name = record['device_name']
+        self.revision_id = record['revision_id']
+        self.class_code = record['class_code']
+        self.class_name = record['class_name']
+        self.subsystem_vendor_id = record['subsystem_vendor_id']
+        self.subsystem_vendor_name = record['subsystem_vendor_name']
+        self.subsystem_id = record['subsystem_id']
+        self.subsystem_name = record['subsystem_name']
+        self.driver = record['driver']
+        XendBase.__init__(self, uuid, record)
+
+    def get_host(self):
+        from xen.xend import XendNode
+        return XendNode.instance().get_uuid()
+
+    def get_domain(self):
+        return self.domain
+
+    def get_bus(self):
+        return self.bus
+
+    def get_slot(self):
+        return self.slot
+
+    def get_func(self):
+        return self.func
+
+    def get_name(self):
+        return "%04x:%02x:%02x.%01x" % (self.domain, self.bus, self.slot,
+                                        self.func)
+
+    def get_vendor_id(self):
+        return self.vendor_id
+
+    def get_vendor_name(self):
+        return self.vendor_name
+
+    def get_device_id(self):
+        return self.device_id
+
+    def get_device_name(self):
+        return self.device_name
+
+    def get_class_code(self):
+        return self.class_code
+
+    def get_class_name(self):
+        return self.class_name
+
+    def get_revision_id(self):
+        return self.revision_id
+
+    def get_subsystem_vendor_id(self):
+        return self.subsystem_vendor_id
+
+    def get_subsystem_vendor_name(self):
+        return self.subsystem_vendor_name
+
+    def get_subsystem_id(self):
+        return self.subsystem_id
+
+    def get_subsystem_name(self):
+        return self.subsystem_name
+
+    def get_driver(self):
+        return self.driver
+

--------------010109090907020907080401
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

--------------010109090907020907080401--


From xen-devel-bounces@lists.xensource.com Wed Jul 02 04:38:14 2008
Return-path: <xen-devel-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Wed, 02 Jul 2008 04:38:14 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KE0f8-0004X8-4e; Wed, 02 Jul 2008 04:38:14 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KE0eG-0003z7-1T
	for xen-devel@lists.xensource.com; Wed, 02 Jul 2008 04:37:20 -0700
X-ASG-Debug-ID: 1214998638-34ca00110000-8pertM
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from tyo201.gate.nec.co.jp (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP
	id 27F59544FC; Wed,  2 Jul 2008 04:37:18 -0700 (PDT)
Received: from tyo201.gate.nec.co.jp (TYO201.gate.nec.co.jp [202.32.8.193]) by
	spam.xensource.com with ESMTP id W4lCjmlHpNbHeQvq;
	Wed, 02 Jul 2008 04:37:18 -0700 (PDT)
Received: from mailgate3.nec.co.jp (mailgate53F.nec.co.jp [10.7.69.162])
	by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m62BbHqd026969; 
	Wed, 2 Jul 2008 20:37:17 +0900 (JST)
Received: (from root@localhost) by mailgate3.nec.co.jp
	(8.11.7/3.7W-MAILGATE-NEC)
	id m62BbHi13379; Wed, 2 Jul 2008 20:37:17 +0900 (JST)
Received: from shoin.jp.nec.com (shoin.jp.nec.com [10.26.220.3])
	by mailsv4.nec.co.jp (8.13.8/8.13.4) with ESMTP id m62BbHSe021853;
	Wed, 2 Jul 2008 20:37:17 +0900 (JST)
Received: from [10.34.123.125] ([10.34.123.125] [10.34.123.125]) by
	mail.jp.nec.com with ESMTP; Wed, 2 Jul 2008 20:37:15 +0900
Message-Id: <486B686A.8020305@ab.jp.nec.com>
Date: Wed, 02 Jul 2008 20:37:14 +0900
From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
To: xen-devel@lists.xensource.com, xen-api@lists.xensource.com
X-ASG-Orig-Subj: [PATCH][2/3] XenAPI: Add Direct PCI Assignment (DPCI) Support
Content-Type: multipart/mixed; boundary="------------030408030704010303090802"
X-Barracuda-Connect: TYO201.gate.nec.co.jp[202.32.8.193]
X-Barracuda-Start-Time: 1214998639
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.54947
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
Cc: 
Subject: [Xen-devel] [PATCH][2/3] XenAPI: Add Direct PCI Assignment (DPCI)
	Support
X-BeenThere: xen-devel@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Xen developer discussion <xen-devel.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-devel@lists.xensource.com>
List-Help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
Sender: xen-devel-bounces@lists.xensource.com
Errors-To: xen-devel-bounces@lists.xensource.com

This is a multi-part message in MIME format.
--------------030408030704010303090802
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

Add direct pci device assignment support.
This patch depends on the previous patch (1/3).

-----------------------------------------
Fields for DPCI class:
(RO_inst) VM
          PPCI
          hotplug_slot <- same as vslot param of pci-attach/detach.
(RO_run)  virtual_domain
          virtual_bus
          virtual_slot
          virtual_func
          virtual_name <- domain:bus:slot:func that is seen from guest.
RPCs for DPCI class:
          create(session_id, dpci_record)
          destroy(session_id, dpci_ref)
-----------------------------------------

Regards,
-----------------------
Yosuke Iwamatsu
        NEC Corporation

--------------030408030704010303090802
Content-Type: all/allfiles;
 name="xenapi_dpci.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="xenapi_dpci.patch"

XenAPI: Add Direct PCI Device (DPCI) Assignment Support

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>

diff -r bca35da3e14b tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py	Wed Jul 02 18:23:27 2008 +0900
+++ b/tools/python/xen/xend/XendAPI.py	Wed Jul 02 18:26:24 2008 +0900
@@ -41,6 +41,7 @@ from XendPIF import XendPIF
 from XendPIF import XendPIF
 from XendPBD import XendPBD
 from XendPPCI import XendPPCI
+from XendDPCI import XendDPCI
 from XendXSPolicy import XendXSPolicy, XendACMPolicy
 
 from XendAPIConstants import *
@@ -479,6 +480,7 @@ classes = {
     'PBD'          : valid_object("PBD"),
     'PIF_metrics'  : valid_object("PIF_metrics"),
     'PPCI'         : valid_object("PPCI"),
+    'DPCI'         : valid_object("DPCI")
 }
 
 autoplug_classes = {
@@ -488,6 +490,7 @@ autoplug_classes = {
     'PBD'         : XendPBD,
     'PIF_metrics' : XendPIFMetrics,
     'PPCI'        : XendPPCI,
+    'DPCI'        : XendDPCI,
     'XSPolicy'    : XendXSPolicy,
     'ACMPolicy'   : XendACMPolicy,
 }
@@ -1154,6 +1157,7 @@ class XendAPI(object):
                   'VIFs',
                   'VBDs',
                   'VTPMs',
+                  'DPCIs',
                   'tools_version',
                   'domid',
                   'is_control_domain',
@@ -1296,6 +1300,10 @@ class XendAPI(object):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return xen_api_success(dom.get_consoles())
 
+    def VM_get_DPCIs(self, session, vm_ref):
+        dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+        return xen_api_success(dom.get_dpcis())
+    
     def VM_get_tools_version(self, session, vm_ref):
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return dom.get_tools_version()
@@ -1675,6 +1683,7 @@ class XendAPI(object):
             'VIFs': xeninfo.get_vifs(),
             'VBDs': xeninfo.get_vbds(),
             'VTPMs': xeninfo.get_vtpms(),
+            'DPCIs': xeninfo.get_dpcis(),
             'PV_bootloader': xeninfo.info.get('PV_bootloader'),
             'PV_kernel': xeninfo.info.get('PV_kernel'),
             'PV_ramdisk': xeninfo.info.get('PV_ramdisk'),
diff -r bca35da3e14b tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py	Wed Jul 02 18:23:27 2008 +0900
+++ b/tools/python/xen/xend/XendConfig.py	Wed Jul 02 18:26:24 2008 +0900
@@ -24,6 +24,8 @@ from xen.xend import uuid
 from xen.xend import uuid
 from xen.xend import XendOptions
 from xen.xend import XendAPIStore
+from xen.xend.XendPPCI import XendPPCI
+from xen.xend.XendDPCI import XendDPCI
 from xen.xend.XendError import VmError
 from xen.xend.XendDevices import XendDevices
 from xen.xend.PrettyPrint import prettyprintstring
@@ -773,6 +775,11 @@ class XendConfig(dict):
         """
         log.debug('_sxp_to_xapi(%s)' % scrub_password(sxp_cfg))
 
+        # _parse_sxp() below will call device_add() and construct devices.
+        # Some devices (currently only pci) may require VM's uuid, so
+        # setup self['uuid'] beforehand.
+        self['uuid'] = sxp.child_value(sxp_cfg, 'uuid', uuid.createString())
+
         cfg = self._parse_sxp(sxp_cfg)
 
         for key, typ in XENAPI_CFG_TYPES.items():
@@ -1209,42 +1216,35 @@ class XendConfig(dict):
             dev_type = sxp.name(config)
             dev_info = {}
 
-            # Parsing the device SXP's. In most cases, the SXP looks
-            # like this:
-            #
-            # [device, [vif, [mac, xx:xx:xx:xx:xx:xx], [ip 1.3.4.5]]]
-            #
-            # However, for PCI devices it looks like this:
-            #
-            # [device, [pci, [dev, [domain, 0], [bus, 0], [slot, 1]]]]
-            #
-            # It seems the reasoning for this difference is because
-            # pciif.py needs all the PCI device configurations at
-            # the same time when creating the devices.
-            #
-            # To further complicate matters, Xen 2.0 configuration format
-            # uses the following for pci device configuration:
-            #
-            # [device, [pci, [domain, 0], [bus, 0], [dev, 1], [func, 2]]]
-
             if dev_type == 'pci':
                 pci_devs_uuid = sxp.child_value(config, 'uuid',
                                                 uuid.createString())
-                pci_devs = []
-                for pci_dev in sxp.children(config, 'dev'):
-                    pci_dev_info = {}
-                    for opt_val in pci_dev[1:]:
-                        try:
-                            opt, val = opt_val
-                            pci_dev_info[opt] = val
-                        except TypeError:
-                            pass
-                    pci_devs.append(pci_dev_info)
+
+                pci_dict = self.pci_convert_sxp_to_dict(config)
+                pci_devs = pci_dict['devs']
+
+                # create XenAPI DPCI objects.
+                for pci_dev in pci_devs:
+                    dpci_uuid = pci_dev.get('uuid')
+                    ppci_uuid = XendPPCI.get_by_sbdf(pci_dev['domain'],
+                                                    pci_dev['bus'],
+                                                    pci_dev['slot'],
+                                                    pci_dev['func'])
+                    if ppci_uuid is None:
+                        continue
+                    dpci_record = {
+                        'VM': self['uuid'],
+                        'PPCI': ppci_uuid,
+                        'hotplug_slot': pci_dev.get('vslot', 0)
+                    }
+                    XendDPCI(dpci_uuid, dpci_record)
+                    
                 target['devices'][pci_devs_uuid] = (dev_type,
                                                     {'devs': pci_devs,
                                                      'uuid': pci_devs_uuid})
 
                 log.debug("XendConfig: reading device: %s" % pci_devs)
+
                 return pci_devs_uuid
 
             for opt_val in config[1:]:
@@ -1482,6 +1482,76 @@ class XendConfig(dict):
 
         return ''
 
+    def pci_convert_sxp_to_dict(self, dev_sxp):
+        """Convert pci device sxp to dict
+        @param dev_sxp: device configuration
+        @type  dev_sxp: SXP object (parsed config)
+        @return: dev_config
+        @rtype: dictionary
+        """
+        # Parsing the device SXP's. In most cases, the SXP looks
+        # like this:
+        #
+        # [device, [vif, [mac, xx:xx:xx:xx:xx:xx], [ip 1.3.4.5]]]
+        #
+        # However, for PCI devices it looks like this:
+        #
+        # [device, [pci, [dev, [domain, 0], [bus, 0], [slot, 1], [func, 2]]]
+        #
+        # It seems the reasoning for this difference is because
+        # pciif.py needs all the PCI device configurations at
+        # the same time when creating the devices.
+        #
+        # To further complicate matters, Xen 2.0 configuration format
+        # uses the following for pci device configuration:
+        #
+        # [device, [pci, [domain, 0], [bus, 0], [dev, 1], [func, 2]]]
+
+        # For PCI device hotplug support, the SXP of PCI devices is
+        # extendend like this:
+        #
+        # [device, [pci, [dev, [domain, 0], [bus, 0], [slot, 1], [func, 2],
+        #                      [vslt, 0]],
+        #                [state, 'Initialising']]]
+        #
+        # 'vslt' shows the virtual hotplug slot number which the PCI device
+        # is inserted in. This is only effective for HVM domains.
+        #
+        # state 'Initialising' indicates that the device is being attached,
+        # while state 'Closing' indicates that the device is being detached.
+        #
+        # The Dict looks like this:
+        #
+        # { devs: [{domain: 0, bus: 0, slot: 1, func: 2, vslt: 0}],
+        #   states: ['Initialising'] }
+
+        dev_config = {}
+
+        pci_devs = []
+        for pci_dev in sxp.children(dev_sxp, 'dev'):
+            pci_dev_info = {}
+            for opt_val in pci_dev[1:]:
+                try:
+                    opt, val = opt_val
+                    pci_dev_info[opt] = val
+                except TypeError:
+                    pass
+                # append uuid for each pci device.
+                dpci_uuid = pci_dev_info.get('uuid', uuid.createString())
+                pci_dev_info['uuid'] = dpci_uuid
+            pci_devs.append(pci_dev_info)
+        dev_config['devs'] = pci_devs 
+
+        pci_states = []
+        for pci_state in sxp.children(dev_sxp, 'state'):
+            try:
+                pci_states.append(pci_state[1])
+            except IndexError:
+                raise XendError("Error reading state while parsing pci sxp")
+        dev_config['states'] = pci_states
+
+        return dev_config
+
     def console_add(self, protocol, location, other_config = {}):
         dev_uuid = uuid.createString()
         if protocol == 'vt100':
@@ -1556,16 +1626,29 @@ class XendConfig(dict):
             dev_type, dev_info = self['devices'][dev_uuid]
 
             if dev_type == 'pci': # Special case for pci
-                pci_devs = []
-                for pci_dev in sxp.children(config, 'dev'):
-                    pci_dev_info = {}
-                    for opt_val in pci_dev[1:]:
-                        try:
-                            opt, val = opt_val
-                            pci_dev_info[opt] = val
-                        except TypeError:
-                            pass
-                    pci_devs.append(pci_dev_info)
+                pci_dict = self.pci_convert_sxp_to_dict(config)
+                pci_devs = pci_dict['devs']
+
+                # destroy existing XenAPI DPCI objects
+                for dpci_uuid in XendDPCI.get_by_VM(self['uuid']):
+                    XendAPIStore.deregister(dpci_uuid, "DPCI")
+
+                # create XenAPI DPCI objects.
+                for pci_dev in pci_devs:
+                    dpci_uuid = pci_dev.get('uuid')
+                    ppci_uuid = XendPPCI.get_by_sbdf(pci_dev['domain'],
+                                                     pci_dev['bus'],
+                                                     pci_dev['slot'],
+                                                     pci_dev['func'])
+                    if ppci_uuid is None:
+                        continue
+                    dpci_record = {
+                        'VM': self['uuid'],
+                        'PPCI': ppci_uuid,
+                        'hotplug_slot': pci_dev.get('vslot', 0)
+                    }
+                    XendDPCI(dpci_uuid, dpci_record)
+
                 self['devices'][dev_uuid] = (dev_type,
                                              {'devs': pci_devs,
                                               'uuid': dev_uuid})
diff -r bca35da3e14b tools/python/xen/xend/XendDPCI.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/python/xen/xend/XendDPCI.py	Wed Jul 02 18:26:24 2008 +0900
@@ -0,0 +1,154 @@
+#============================================================================
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of version 2.1 of the GNU Lesser General Public
+# License as published by the Free Software Foundation.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#============================================================================
+# Copyright (c) 2008 NEC Corporation
+#       Yosuke Iwamatsu <y-iwamatsu at ab jp nec com>
+#============================================================================
+
+from xen.xend.XendBase import XendBase
+from xen.xend.XendPPCI import XendPPCI
+from xen.xend import XendAPIStore
+from xen.xend import uuid as genuuid
+
+import XendDomain, XendNode
+
+from XendError import *
+from XendTask import XendTask
+from XendLogging import log
+
+class XendDPCI(XendBase):
+    """Representation of a passthrough PCI device."""
+
+    def getClass(self):
+        return "DPCI"
+
+    def getAttrRO(self):
+        attrRO = ['virtual_domain',
+                  'virtual_bus',
+                  'virtual_slot',
+                  'virtual_func',
+                  'virtual_name',
+                  'VM',
+                  'PPCI',
+                  'hotplug_slot']
+        return XendBase.getAttrRO() + attrRO
+
+    def getAttrRW(self):
+        attrRW = []
+        return XendBase.getAttrRW() + attrRW
+
+    def getAttrInst(self):
+        attrInst = ['VM',
+                    'PPCI',
+                    'hotplug_slot']
+        return XendBase.getAttrInst() + attrInst
+
+    def getMethods(self):
+        methods = ['destroy']
+        return XendBase.getMethods() + methods
+
+    def getFuncs(self):
+        funcs = ['create']
+        return XendBase.getFuncs() + funcs
+
+    getClass    = classmethod(getClass)
+    getAttrRO   = classmethod(getAttrRO)
+    getAttrRW   = classmethod(getAttrRW)
+    getAttrInst = classmethod(getAttrInst)
+    getMethods  = classmethod(getMethods)
+    getFuncs    = classmethod(getFuncs)
+ 
+    def create(self, dpci_struct):
+
+        # Check if VM is valid
+        xendom = XendDomain.instance()
+        if not xendom.is_valid_vm(dpci_struct['VM']):
+            raise InvalidHandleError('VM', dpci_struct['VM'])
+        dom = xendom.get_vm_by_uuid(dpci_struct['VM'])
+
+        # Check if PPCI is valid
+        xennode = XendNode.instance()
+        ppci_uuid = xennode.get_ppci_by_uuid(dpci_struct['PPCI'])
+        if not ppci_uuid:
+            raise InvalidHandleError('PPCI', dpci_struct['PPCI'])
+        for existing_dpci in XendAPIStore.get_all('DPCI'):
+            if ppci_uuid == existing_dpci.get_PPCI():
+                raise DirectPCIError("Device is in use")
+
+        # Assign PPCI to VM
+        try:
+            dpci_ref = XendTask.log_progress(0, 100, dom.create_dpci,
+                                             dpci_struct)
+        except XendError, e:
+            raise DirectPCIError("Failed to assign device")
+
+        # TODO: Retrive virtual pci device infomation.
+
+        return dpci_ref
+
+    create = classmethod(create)
+
+    def get_by_VM(cls, VM_ref):
+        result = []
+        for dpci in XendAPIStore.get_all("DPCI"):
+            if dpci.get_VM() == VM_ref:
+                result.append(dpci.get_uuid())
+        return result
+
+    get_by_VM = classmethod(get_by_VM)
+
+    def __init__(self, uuid, record):
+        XendBase.__init__(self, uuid, record)
+
+        self.virtual_domain = -1
+        self.virtual_bus = -1
+        self.virtual_slot = -1
+        self.virtual_func = -1
+
+        self.VM = record['VM']
+        self.PPCI = record['PPCI']
+        self.hotplug_slot = record['hotplug_slot']
+
+    def destroy(self):
+        xendom = XendDomain.instance()
+        dom = xendom.get_vm_by_uuid(self.get_VM())
+        if not dom:
+            raise InvalidHandleError("VM", self.get_VM())
+        XendTask.log_progress(0, 100, dom.destroy_dpci, self.get_uuid())
+
+    def get_virtual_domain(self):
+        return self.virtual_domain
+
+    def get_virtual_bus(self):
+        return self.virtual_bus
+
+    def get_virtual_slot(self):
+        return self.virtual_slot
+
+    def get_virtual_func(self):
+        return self.virtual_func
+
+    def get_virtual_name(self):
+        return "%04x:%02x:%02x.%01x" % (self.virtual_domain, self.virtual_bus,
+                                        self.virtual_slot, self.virtual_func)
+
+    def get_VM(self):
+        return self.VM
+
+    def get_PPCI(self):
+        return self.PPCI
+
+    def get_hotplug_slot(self):
+        return self.hotplug_slot
+
diff -r bca35da3e14b tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py	Wed Jul 02 18:23:27 2008 +0900
+++ b/tools/python/xen/xend/XendDomain.py	Wed Jul 02 18:26:24 2008 +0900
@@ -478,6 +478,8 @@ class XendDomain:
             
             if domid in self.domains:
                 del self.domains[domid]
+
+            info.destroy_xapi_device_instances()
         else:
             log.warning("Attempted to remove non-existent domain.")
 
@@ -1091,6 +1093,7 @@ class XendDomain:
         self._managed_domain_unregister(dominfo)
         self._remove_domain(dominfo)
         XendDevices.destroy_device_state(dominfo)
+        dominfo.destroy_xapi_device_instances()
 
 
     def domain_configure(self, config):
diff -r bca35da3e14b tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py	Wed Jul 02 18:23:27 2008 +0900
+++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Jul 02 18:26:24 2008 +0900
@@ -54,6 +54,10 @@ from xen.xend.XendAPIConstants import *
 from xen.xend.XendAPIConstants import *
 
 from xen.xend.XendVMMetrics import XendVMMetrics
+
+from xen.xend.XendPPCI import XendPPCI
+from xen.xend.XendDPCI import XendDPCI
+from xen.xend import XendAPIStore
 
 MIGRATE_TIMEOUT = 30.0
 BOOTLOADER_LOOPBACK_DEVICE = '/dev/xvdp'
@@ -642,50 +646,7 @@ class XendDomainInfo:
         xen.xend.XendDomain.instance().managed_config_save(self)
         return self.getDeviceController(dev_type).sxpr(devid)
 
-    def pci_convert_sxp_to_dict(self, dev_sxp):
-        """Convert pci device sxp to dict
-        @param dev_sxp: device configuration
-        @type  dev_sxp: SXP object (parsed config)
-        @return: dev_config
-        @rtype: dictionary
-        """
-        # In reconfigure phase, config of PCI device looks like below:
-        #
-        # sxp:
-        # [device, [pci, [dev, [domain, '0x0'], [bus, '0x0'], [slot, '0x0'],
-        #                      [func, '0x0'], [vslt, '0x0']],
-        #                [state, 'Initialising']]]
-        #
-        # dict:
-        # {devs: [{domain: '0x0', bus: '0x0', slot: '0x0', func: '0x0',
-        #          vslt: '0x0'}],
-        #  states: ['Initialising']}
-        #
-        # state 'Initialising' means the device is being attached.
-        # state 'Closing' means the device is being detached.
-
-        dev_config = {}
-        pci_devs = []
-        for pci_dev in sxp.children(dev_sxp, 'dev'):
-            pci_dev_info = {}
-            for opt_val in pci_dev[1:]:
-                try:
-                    opt, val = opt_val
-                    pci_dev_info[opt] = val
-                except TypeError:
-                    pass
-            pci_devs.append(pci_dev_info)
-        dev_config['devs'] = pci_devs 
-        pci_states = []
-        for pci_state in sxp.children(dev_sxp, 'state'):
-            try:
-                pci_states.append(pci_state[1])
-            except IndexError:
-                raise XendError("Error reading state while parsing pci sxp")
-        dev_config['states'] = pci_states
-        
-        return dev_config
- 
+
     def pci_device_configure(self, dev_sxp, devid = 0):
         """Configure an existing pci device.
         
@@ -711,7 +672,7 @@ class XendDomainInfo:
             raise XendError("Cannot detach when pci platform does not exist")
 
         pci_dev = sxp.children(dev_sxp, 'dev')[0]
-        dev_config = self.pci_convert_sxp_to_dict(dev_sxp)
+        dev_config = self.info.pci_convert_sxp_to_dict(dev_sxp)
         dev = dev_config['devs'][0]
                 
         # Do HVM specific processing
@@ -785,6 +746,8 @@ class XendDomainInfo:
                 self.destroyDevice('pci', devid)
                 del self.info['devices'][dev_uuid]
 
+        xen.xend.XendDomain.instance().managed_config_save(self)
+
         return True
 
     def device_configure(self, dev_sxp, devid = None):
@@ -3169,6 +3132,9 @@ class XendDomainInfo:
     def get_vtpms(self):
         return self.info.get('vtpm_refs', [])
 
+    def get_dpcis(self):
+        return XendDPCI.get_by_VM(self.info.get('uuid'))
+
     def create_vbd(self, xenapi_vbd, vdi_image_path):
         """Create a VBD using a VDI from XendStorageRepository.
 
@@ -3291,6 +3257,64 @@ class XendDomainInfo:
 
     def set_console_other_config(self, console_uuid, other_config):
         self.info.console_update(console_uuid, 'other_config', other_config)
+
+    def create_dpci(self, xenapi_pci):
+        """Create pci device from the passed struct in Xen API format.
+
+        @param xenapi_pci: DPCI struct from Xen API
+        @rtype: bool
+        #@rtype: string
+        @return: True if successfully created device
+        #@return: UUID
+        """
+
+        dpci_uuid = uuid.createString()
+
+        # Convert xenapi to sxp
+        ppci = XendAPIStore.get(xenapi_pci.get('PPCI'), 'PPCI')
+
+        target_pci_sxp = \
+            ['pci', 
+                ['dev',
+                    ['domain', '0x%02x' % ppci.get_domain()],
+                    ['bus', '0x%02x' % ppci.get_bus()],
+                    ['slot', '0x%02x' % ppci.get_slot()],
+                    ['func', '0x%1x' % ppci.get_func()],
+                    ['vslt', '0x%02x' % xenapi_pci.get('hotplug_slot')],
+                    ['uuid', dpci_uuid]
+                ],
+                ['state', 'Initialising']
+            ]
+
+        if self._stateGet() != XEN_API_VM_POWER_STATE_RUNNING:
+
+            old_pci_sxp = self._getDeviceInfo_pci(0)
+
+            if old_pci_sxp is None:
+                dev_uuid = self.info.device_add('pci', cfg_sxp = target_pci_sxp)
+                if not dev_uuid:
+                    raise XendError('Failed to create device')
+
+            else:
+                new_pci_sxp = ['pci']
+                for existing_dev in sxp.children(old_pci_sxp, 'dev'):
+                    new_pci_sxp.append(existing_dev)
+                new_pci_sxp.append(sxp.child0(target_pci_sxp, 'dev'))
+
+                dev_uuid = sxp.child_value(old_pci_sxp, 'uuid')
+                self.info.device_update(dev_uuid, new_pci_sxp)
+
+            xen.xend.XendDomain.instance().managed_config_save(self)
+
+        else:
+            try:
+                self.device_configure(target_pci_sxp)
+
+            except Exception, exn:
+                raise XendError('Failed to create device')
+
+        return dpci_uuid
+
 
     def destroy_device_by_uuid(self, dev_type, dev_uuid):
         if dev_uuid not in self.info['devices']:
@@ -3318,6 +3342,63 @@ class XendDomainInfo:
 
     def destroy_vtpm(self, dev_uuid):
         self.destroy_device_by_uuid('vtpm', dev_uuid)
+
+    def destroy_dpci(self, dev_uuid):
+
+        dpci = XendAPIStore.get(dev_uuid, 'DPCI')
+        ppci = XendAPIStore.get(dpci.get_PPCI(), 'PPCI')
+
+        old_pci_sxp = self._getDeviceInfo_pci(0)
+        dev_uuid = sxp.child_value(old_pci_sxp, 'uuid')
+        target_dev = None
+        new_pci_sxp = ['pci']
+        for dev in sxp.children(old_pci_sxp, 'dev'):
+            domain = int(sxp.child_value(dev, 'domain'), 16)
+            bus = int(sxp.child_value(dev, 'bus'), 16)
+            slot = int(sxp.child_value(dev, 'slot'), 16)
+            func = int(sxp.child_value(dev, 'func'), 16)
+            name = "%04x:%02x:%02x.%01x" % (domain, bus, slot, func)
+            if ppci.get_name() == name:
+                target_dev = dev
+            else:
+                new_pci_sxp.append(dev)
+
+        if target_dev is None:
+            raise XendError('Failed to destroy device')
+
+        target_pci_sxp = ['pci', target_dev, ['state', 'Closing']]
+
+        if self._stateGet() != XEN_API_VM_POWER_STATE_RUNNING:
+
+            self.info.device_update(dev_uuid, new_pci_sxp)
+            if len(sxp.children(new_pci_sxp, 'dev')) == 0:
+                del self.info['devices'][dev_uuid]
+            xen.xend.XendDomain.instance().managed_config_save(self)
+
+        else:
+            try:
+                self.device_configure(target_pci_sxp)
+
+            except Exception, exn:
+                raise XendError('Failed to destroy device')
+
+    def destroy_xapi_device_instances(self):
+        """Destroy Xen-API device instances stored in XendAPIStore.
+        """
+        # Xen-API classes based on XendBase have their instances stored
+        # in XendAPIStore. Cleanup these virtual device instances here
+        # if they are supposed to be destroyed when the parent domain is dead.
+        #
+        # Most of the virtual devices (vif, vbd, vfb, etc) are not based on
+        # XendBase and there's no need to remove them from XendAPIStore.
+
+        from xen.xend import XendDomain
+        if XendDomain.instance().is_valid_vm(self.info.get('uuid')):
+            # domain still exists.
+            return
+
+        for dpci_uuid in XendDPCI.get_by_VM(self.info.get('uuid')):
+            XendAPIStore.deregister(dpci_uuid, "DPCI")
             
     def has_device(self, dev_class, dev_uuid):
         return (dev_uuid in self.info['%s_refs' % dev_class.lower()])
diff -r bca35da3e14b tools/python/xen/xend/XendError.py
--- a/tools/python/xen/xend/XendError.py	Wed Jul 02 18:23:27 2008 +0900
+++ b/tools/python/xen/xend/XendError.py	Wed Jul 02 18:26:24 2008 +0900
@@ -174,6 +174,17 @@ class NetworkError(XendAPIError):
 
     def __str__(self):
         return 'NETWORK_ERROR: %s %s' % (self.error, self.network)
+
+class DirectPCIError(XendAPIError):
+    def __init__(self, error):
+        XendAPIError.__init__(self)
+        self.error = error
+
+    def get_api_error(self):
+        return ['DIRECT_PCI_ERROR', self.error]
+
+    def __str__(self):
+        return 'DIRECT_PCI_ERROR: %s' % self.error
 
 from xen.util.xsconstants import xserr2string
 
diff -r bca35da3e14b tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py	Wed Jul 02 18:23:27 2008 +0900
+++ b/tools/python/xen/xend/server/pciif.py	Wed Jul 02 18:26:24 2008 +0900
@@ -76,6 +76,7 @@ class PciController(DevController):
 
             back['dev-%i' % pcidevid] = "%04x:%02x:%02x.%02x" % \
                                         (domain, bus, slot, func)
+            back['uuid-%i' % pcidevid] = pci_config.get('uuid', '')
             pcidevid += 1
 
         if vslots != "":
@@ -101,6 +102,7 @@ class PciController(DevController):
             try:
                 dev = back['dev-%i' % i]
                 state = states[i]
+                uuid = back['uuid-%i' %i]
             except:
                 raise XendError('Error reading config')
 
@@ -121,6 +123,7 @@ class PciController(DevController):
                 self.writeBackend(devid, 'dev-%i' % (num_olddevs + i), dev)
                 self.writeBackend(devid, 'state-%i' % (num_olddevs + i),
                                   str(xenbusState['Initialising']))
+                self.writeBackend(devid, 'uuid-%i' % (num_olddevs + i), uuid)
                 self.writeBackend(devid, 'num_devs', str(num_olddevs + i + 1))
 
                 # Update vslots
@@ -141,7 +144,7 @@ class PciController(DevController):
                     raise XendError('Device %s is not connected' % dev)
 
                 # Update vslots
-                if back['vslots'] is not None:
+                if back.get('vslots') is not None:
                     vslots = old_vslots
                     for vslt in back['vslots'].split(';'):
                         if vslt != '':
@@ -185,6 +188,9 @@ class PciController(DevController):
                                  'bus': '0x%(bus)s' % pci_dev_info,
                                  'slot': '0x%(slot)s' % pci_dev_info,
                                  'func': '0x%(func)s' % pci_dev_info}
+
+                # Per device uuid info
+                dev_dict['uuid'] = self.readBackend(devid, 'uuid-%d' % i)
 
                 #append vslot info
                 if vslots is not None:
@@ -442,6 +448,7 @@ class PciController(DevController):
                 self.removeBackend(devid, 'dev-%i' % i)
                 self.removeBackend(devid, 'vdev-%i' % i)
                 self.removeBackend(devid, 'state-%i' % i)
+                self.removeBackend(devid, 'uuid-%i' % i)
             else:
                 if new_num_devs != i:
                     tmpdev = self.readBackend(devid, 'dev-%i' % i)
@@ -455,6 +462,9 @@ class PciController(DevController):
                     tmpstate = self.readBackend(devid, 'state-%i' % i)
                     self.writeBackend(devid, 'state-%i' % new_num_devs, tmpstate)
                     self.removeBackend(devid, 'state-%i' % i)
+                    tmpuuid = self.readBackend(devid, 'uuid-%i' % i)
+                    self.writeBackend(devid, 'uuid-%i' % new_num_devs, tmpuuid)
+                    self.removeBackend(devid, 'uuid-%i' % i)
                 new_num_devs = new_num_devs + 1
 
         self.writeBackend(devid, 'num_devs', str(new_num_devs))

--------------030408030704010303090802
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

--------------030408030704010303090802--


From xen-devel-bounces@lists.xensource.com Wed Jul 02 04:39:11 2008
Return-path: <xen-devel-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Wed, 02 Jul 2008 04:39:11 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KE0g3-000582-8c; Wed, 02 Jul 2008 04:39:11 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KE0eR-00045n-CB
	for xen-devel@lists.xensource.com; Wed, 02 Jul 2008 04:37:31 -0700
X-ASG-Debug-ID: 1214998649-34b300180000-8pertM
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from tyo202.gate.nec.co.jp (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP
	id 28B1E54500; Wed,  2 Jul 2008 04:37:29 -0700 (PDT)
Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [202.32.8.206]) by
	spam.xensource.com with ESMTP id yywGJmwD0J6Bzom3;
	Wed, 02 Jul 2008 04:37:29 -0700 (PDT)
Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.161])
	by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id m62BbSXu015067; 
	Wed, 2 Jul 2008 20:37:28 +0900 (JST)
Received: (from root@localhost) by mailgate3.nec.co.jp
	(8.11.7/3.7W-MAILGATE-NEC)
	id m62BbSB22814; Wed, 2 Jul 2008 20:37:28 +0900 (JST)
Received: from saigo.jp.nec.com (saigo.jp.nec.com [10.26.220.6])
	by mailsv4.nec.co.jp (8.13.8/8.13.4) with ESMTP id m62BbSYi021930;
	Wed, 2 Jul 2008 20:37:28 +0900 (JST)
Received: from [10.34.123.125] ([10.34.123.125] [10.34.123.125]) by
	mail.jp.nec.com with ESMTP; Wed, 2 Jul 2008 20:37:25 +0900
Message-Id: <486B6875.60802@ab.jp.nec.com>
Date: Wed, 02 Jul 2008 20:37:25 +0900
From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
To: xen-devel@lists.xensource.com, xen-api@lists.xensource.com
X-ASG-Orig-Subj: [PATCH][3/3] XenAPI: Example Scripts for PCI Assignment
Content-Type: multipart/mixed; boundary="------------010603080203060501010805"
X-Barracuda-Connect: TYO202.gate.nec.co.jp[202.32.8.206]
X-Barracuda-Start-Time: 1214998650
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.54947
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
Cc: 
Subject: [Xen-devel] [PATCH][3/3] XenAPI: Example Scripts for PCI Assignment
X-BeenThere: xen-devel@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Xen developer discussion <xen-devel.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-devel@lists.xensource.com>
List-Help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>,
	<mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
Sender: xen-devel-bounces@lists.xensource.com
Errors-To: xen-devel-bounces@lists.xensource.com

This is a multi-part message in MIME format.
--------------010603080203060501010805
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

These attachments are examples for pci assignment via xen-api.

ppci_get_record.py: demonstrates physical pci information acquisition.
dpci_create.py: adds a pci device to a domain.
dpci_destroy.py: removes a pci device from a domain.

Regards,
-----------------------
Yosuke Iwamatsu
        NEC Corporation

--------------010603080203060501010805
Content-Type: text/plain;
 name="dpci_create.py"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="dpci_create.py"

IyEvdXNyL2Jpbi9weXRob24KIiIiVGVzdCBwcm9ncmFtIGZvciBYZW4tQVBJIGRpcmVjdCBQ
Q0kgZGV2aWNlIGF0dGFjaG1lbnQiIiIKClNFUlZFUl9VUkw9J2h0dHA6Ly9sb2NhbGhvc3Q6
OTM2MycKVVNFUj0nbWUnClBBU1NXT1JEPSdteXBhc3N3b3JkJwoKVk1fTkFNRT0nbXlkb21h
aW4nClBDSV9OQU1FPScwMDAwOjBjOjAwLjEnCgppbXBvcnQgc3lzCnN5cy5wYXRoLmFwcGVu
ZCgiL3Vzci9saWIvcHl0aG9uIikKCmZyb20geGVuLnhtLlhlbkFQSSBpbXBvcnQgU2Vzc2lv
bgoKZGVmIG1haW4oYXJndiA9IHN5cy5hcmd2KToKICAgIHNlcnZlciA9IFNlc3Npb24oU0VS
VkVSX1VSTCkKICAgIHNlcnZlci5sb2dpbl93aXRoX3Bhc3N3b3JkKFVTRVIsIFBBU1NXT1JE
KQoKICAgICMgZ2V0IFZNCiAgICB2bV9yZWZzID0gc2VydmVyLnhlbmFwaS5ob3N0LmdldF9y
ZXNpZGVudF9WTXMoCiAgICAgICAgICAgIHNlcnZlci54ZW5hcGkuc2Vzc2lvbi5nZXRfdGhp
c19ob3N0KHNlcnZlci5nZXRTZXNzaW9uKCkpKQogICAgZm9yIHZtX3JlZiBpbiB2bV9yZWZz
OgogICAgICAgIHZtX3JlY29yZCA9IHNlcnZlci54ZW5hcGkuVk0uZ2V0X3JlY29yZCh2bV9y
ZWYpCiAgICAgICAgaWYgdm1fcmVjb3JkWyduYW1lX2xhYmVsJ10gPT0gVk1fTkFNRToKICAg
ICAgICAgICAgYnJlYWsKCiAgICAjIGdldCBQUENJCiAgICBwcGNpX3JlZnMgPSBzZXJ2ZXIu
eGVuYXBpLmhvc3QuZ2V0X1BQQ0lzKAogICAgICAgICAgICBzZXJ2ZXIueGVuYXBpLnNlc3Np
b24uZ2V0X3RoaXNfaG9zdChzZXJ2ZXIuZ2V0U2Vzc2lvbigpKSkKICAgIGZvciBwcGNpX3Jl
ZiBpbiBwcGNpX3JlZnM6CiAgICAgICAgcHBjaV9yZWNvcmQgPSBzZXJ2ZXIueGVuYXBpLlBQ
Q0kuZ2V0X3JlY29yZChwcGNpX3JlZikKICAgICAgICBpZiBwcGNpX3JlY29yZFsnbmFtZSdd
ID09IFBDSV9OQU1FOgogICAgICAgICAgICBicmVhawoKICAgICMgY3JlYXRlIERQQ0kKICAg
IGRwY2lfcmVjb3JkID0gewogICAgICAgICdWTSc6IHZtX3JlZiwKICAgICAgICAnUFBDSSc6
IHBwY2lfcmVmLAogICAgICAgICdob3RwbHVnX3Nsb3QnOiAwLAogICAgICAgIH0KICAgIGRw
Y2lfcmVmID0gc2VydmVyLnhlbmFwaS5EUENJLmNyZWF0ZShkcGNpX3JlY29yZCkKCiAgICBz
ZXJ2ZXIubG9nb3V0KCkKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICBtYWluKCkK

--------------010603080203060501010805
Content-Type: text/plain;
 name="dpci_destroy.py"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="dpci_destroy.py"

IyEvdXNyL2Jpbi9weXRob24KIiIiVGVzdCBwcm9ncmFtIGZvciBYZW4tQVBJIGRpcmVjdCBQ
Q0kgZGV2aWNlIGRldGFjaG1lbnQiIiIKClNFUlZFUl9VUkw9J2h0dHA6Ly9sb2NhbGhvc3Q6
OTM2MycKVVNFUj0nbWUnClBBU1NXT1JEPSdteXBhc3N3b3JkJwoKVk1fTkFNRT0nbXlkb21h
aW4nClBDSV9OQU1FPScwMDAwOjBjOjAwLjEnCgppbXBvcnQgc3lzCnN5cy5wYXRoLmFwcGVu
ZCgiL3Vzci9saWIvcHl0aG9uIikKCmZyb20geGVuLnhtLlhlbkFQSSBpbXBvcnQgU2Vzc2lv
bgoKZGVmIG1haW4oYXJndiA9IHN5cy5hcmd2KToKICAgIHNlcnZlciA9IFNlc3Npb24oU0VS
VkVSX1VSTCkKICAgIHNlcnZlci5sb2dpbl93aXRoX3Bhc3N3b3JkKFVTRVIsIFBBU1NXT1JE
KQoKICAgICMgZ2V0IFZNCiAgICB2bV9yZWZzID0gc2VydmVyLnhlbmFwaS5ob3N0LmdldF9y
ZXNpZGVudF9WTXMoCiAgICAgICAgICAgIHNlcnZlci54ZW5hcGkuc2Vzc2lvbi5nZXRfdGhp
c19ob3N0KHNlcnZlci5nZXRTZXNzaW9uKCkpKQogICAgZm9yIHZtX3JlZiBpbiB2bV9yZWZz
OgogICAgICAgIHZtX3JlY29yZCA9IHNlcnZlci54ZW5hcGkuVk0uZ2V0X3JlY29yZCh2bV9y
ZWYpCiAgICAgICAgaWYgdm1fcmVjb3JkWyduYW1lX2xhYmVsJ10gPT0gVk1fTkFNRToKICAg
ICAgICAgICAgYnJlYWsKCiAgICAjIGdldCBEUENJCiAgICBkcGNpX3JlZnMgPSBzZXJ2ZXIu
eGVuYXBpLkRQQ0kuZ2V0X2FsbCgpCiAgICBmb3IgZHBjaV9yZWYgaW4gZHBjaV9yZWZzOgog
ICAgICAgIGRwY2lfcmVjb3JkID0gc2VydmVyLnhlbmFwaS5EUENJLmdldF9yZWNvcmQoZHBj
aV9yZWYpCiAgICAgICAgcHBjaV9yZWNvcmQgPSBzZXJ2ZXIueGVuYXBpLlBQQ0kuZ2V0X3Jl
Y29yZChkcGNpX3JlY29yZFsnUFBDSSddKQogICAgICAgIGlmIHBwY2lfcmVjb3JkWyduYW1l
J10gPT0gUENJX05BTUU6CiAgICAgICAgICAgIGJyZWFrCgogICAgIyBkZXN0cm95CiAgICBz
ZXJ2ZXIueGVuYXBpLkRQQ0kuZGVzdHJveShkcGNpX3JlZikKCiAgICBzZXJ2ZXIubG9nb3V0
KCkKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICBtYWluKCkK
--------------010603080203060501010805
Content-Type: text/plain;
 name="ppci_get_record.py"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="ppci_get_record.py"

IyEvdXNyL2Jpbi9weXRob24KIiIiVGVzdCBwcm9ncmFtIGZvciBYZW4tQVBJIFBQQ0kgY2xh
c3MiIiIKClNFUlZFUl9VUkw9J2h0dHA6Ly9sb2NhbGhvc3Q6OTM2MycKVVNFUj0nbWUnClBB
U1NXT1JEPSdteXBhc3N3b3JkJwoKaW1wb3J0IHN5cwpzeXMucGF0aC5hcHBlbmQoIi91c3Iv
bGliL3B5dGhvbiIpCgpmcm9tIHhlbi54bS5YZW5BUEkgaW1wb3J0IFNlc3Npb24KCmRlZiBt
YWluKGFyZ3YgPSBzeXMuYXJndik6CiAgICBzZXJ2ZXIgPSBTZXNzaW9uKFNFUlZFUl9VUkwp
CiAgICBzZXJ2ZXIubG9naW5fd2l0aF9wYXNzd29yZChVU0VSLCBQQVNTV09SRCkKCiAgICBw
cmludCAiPT09IFBQQ0kgSU5GT1JNQVRJT04gPT09IgogICAgcHBjaV9yZWZzID0gc2VydmVy
LnhlbmFwaS5ob3N0LmdldF9QUENJcygKICAgICAgICAgICAgc2VydmVyLnhlbmFwaS5zZXNz
aW9uLmdldF90aGlzX2hvc3Qoc2VydmVyLmdldFNlc3Npb24oKSkpCiAgICBwcmludCAicHBj
aV9yZWZzID0gJXMiICUgcHBjaV9yZWZzCiAgICBmb3IgcHBjaV9yZWYgaW4gcHBjaV9yZWZz
OgogICAgICAgIHBwY2lfcmVjb3JkID0gc2VydmVyLnhlbmFwaS5QUENJLmdldF9yZWNvcmQo
cHBjaV9yZWYpCiAgICAgICAgcHJpbnQgInBwY2lfcmVjb3JkID0gJXMiICUgcHBjaV9yZWNv
cmQKICAgIHByaW50CgogICAgc2VydmVyLmxvZ291dCgpCgppZiBfX25hbWVfXyA9PSAiX19t
YWluX18iOgogICAgbWFpbigpCg==
--------------010603080203060501010805
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

--------------010603080203060501010805--


From xen-api-bounces@lists.xensource.com Wed Jul 02 10:36:52 2008
Return-path: <xen-api-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Wed, 02 Jul 2008 10:36:52 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KE6GB-0000d1-SR; Wed, 02 Jul 2008 10:36:51 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KE6G2-0000X2-6Z
	for xen-api@lists.xensource.com; Wed, 02 Jul 2008 10:36:42 -0700
X-ASG-Debug-ID: 1215020200-252100090000-trChs3
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from smtp-vbr2.xs4all.nl (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP id 7187954A91
	for <xen-api@lists.xensource.com>; Wed,  2 Jul 2008 10:36:40 -0700 (PDT)
Received: from smtp-vbr2.xs4all.nl (smtp-vbr2.xs4all.nl [194.109.24.22]) by
	spam.xensource.com with ESMTP id lUnOkjbA7qAG6cnv for
	<xen-api@lists.xensource.com>; Wed, 02 Jul 2008 10:36:40 -0700 (PDT)
Received: from [192.168.1.3] (kinkrsoftware.xs4all.nl [213.84.249.129])
	(authenticated bits=0)
	by smtp-vbr2.xs4all.nl (8.13.8/8.13.8) with ESMTP id m62HaaZj001618;
	Wed, 2 Jul 2008 19:36:37 +0200 (CEST)
	(envelope-from skinkie@xs4all.nl)
Message-ID: <486BBCA4.9010401@xs4all.nl>
Date: Wed, 02 Jul 2008 19:36:36 +0200
From: Stefan de Konink <skinkie@xs4all.nl>
User-Agent: Thunderbird 2.0.0.14 (X11/20080519)
MIME-Version: 1.0
To: Stephen Spector <stephen.spector@citrix.com>
X-ASG-Orig-Subj: Re: [Xen-API] Xen API Project Meeting Tommorow
Subject: Re: [Xen-API] Xen API Project Meeting Tommorow
References: <E3ADFAD82A5FE147AEF0C82912BC002004FADBA1@FTLPEXCH05.citrite.net>
In-Reply-To: <E3ADFAD82A5FE147AEF0C82912BC002004FADBA1@FTLPEXCH05.citrite.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: by XS4ALL Virus Scanner
X-Barracuda-Connect: smtp-vbr2.xs4all.nl[194.109.24.22]
X-Barracuda-Start-Time: 1215020201
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.54969
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
Cc: xen-api@lists.xensource.com
X-BeenThere: xen-api@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-api@lists.xensource.com>
List-Help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=subscribe>
Sender: xen-api-bounces@lists.xensource.com
Errors-To: xen-api-bounces@lists.xensource.com

http://irc.netsplit.de/webchat/?net=freenode



Stefan

_______________________________________________
xen-api mailing list
xen-api@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-api

From xen-api-bounces@lists.xensource.com Wed Jul 02 11:29:10 2008
Return-path: <xen-api-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Wed, 02 Jul 2008 11:29:10 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KE74o-00037A-HO; Wed, 02 Jul 2008 11:29:10 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KE74l-00036h-Pb
	for xen-api@lists.xensource.com; Wed, 02 Jul 2008 11:29:07 -0700
X-ASG-Debug-ID: 1215023345-4c1800030000-trChs3
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from SMTP02.CITRIX.COM (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP id 59D5654ABD
	for <xen-api@lists.xensource.com>; Wed,  2 Jul 2008 11:29:05 -0700 (PDT)
Received: from SMTP02.CITRIX.COM (smtp02.citrix.com [66.165.176.63]) by
	spam.xensource.com with ESMTP id SklJh9ibP6p7AiC9 for
	<xen-api@lists.xensource.com>; Wed, 02 Jul 2008 11:29:05 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.27,738,1204520400"; d="scan'208,217";a="10383287"
Received: from ftlpexchmx02.citrite.net ([10.9.154.127])
	by FTLPIPO02.CITRIX.COM with ESMTP; 02 Jul 2008 14:29:05 -0400
Received: from FTLPEXCH05.citrite.net ([10.13.100.93]) by
	FTLPEXCHMX02.citrite.net with Microsoft SMTPSVC(6.0.3790.3959); 
	Wed, 2 Jul 2008 14:29:05 -0400
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
X-ASG-Orig-Subj: Xen-API Project Meeting #2 Update
Date: Wed, 2 Jul 2008 14:28:35 -0400
Message-ID: <E3ADFAD82A5FE147AEF0C82912BC0020050AFB4D@FTLPEXCH05.citrite.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Xen-API Project Meeting #2 Update
thread-index: AcjccXCAmy+YQfQfTzau6gfv8HBfJw==
From: "Stephen Spector" <stephen.spector@citrix.com>
To: <xen-api@lists.xensource.com>
X-OriginalArrivalTime: 02 Jul 2008 18:29:05.0229 (UTC)
	FILETIME=[821B1FD0:01C8DC71]
X-Barracuda-Connect: smtp02.citrix.com[66.165.176.63]
X-Barracuda-Start-Time: 1215023346
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.54973
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	0.00 HTML_MESSAGE           BODY: HTML included in message
Subject: [Xen-API] Xen-API Project Meeting #2 Update
X-BeenThere: xen-api@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-api@lists.xensource.com>
List-Help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1576209377=="
Sender: xen-api-bounces@lists.xensource.com
Errors-To: xen-api-bounces@lists.xensource.com

This is a multi-part message in MIME format.

--===============1576209377==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C8DC71.7187E9DF"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C8DC71.7187E9DF
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

For those of you who couldn't attend today's Xen API Meeting; here are
some links to more information:

=20

*         Meeting Minutes -
http://wiki.xensource.com/xenwiki/XenApi?action=3DAttachFile&do=3Dget&tar=
get
=3DMeeting+2+Minutes.txt

*         Questions Sent in for Meeting -
http://wiki.xensource.com/xenwiki/XenApi?action=3DAttachFile&do=3Dget&tar=
get
=3DMeeting+2+Questions.txt

*         New Wiki Section in XenAPI

Xen API Project To Do List

List of Current Xen API 1.0 Functions that need completion or update:=20

*         [example]=20

List of Features for future Xen API desired:=20

*         [example]=20

The first step moving forward is to identify which Xen API functions
from the 1.0 specification
<http://wiki.xensource.com/xenwiki/XenApi?action=3DAttachFile&do=3Dget&ta=
rge
t=3Dxenapi-1.0.0.pdf>  need to be either updated or written. From there,
people can put their name up on the Wiki next to a function they will
work on to avoid duplication of efforts. Please also post any relevant
information on that API on the Wiki as well. Finally, if you have a
feature or new API you would like to see, please add it to the Wiki list
as well.=20

=20

Based on the community response to these actions we can determine when
our next meeting will be. Thanks.

=20

Thanks.

=20

Stephen Spector

Sr. Program Manager, Xen.org

954.267.2853

stephen.spector@xen.org <mailto:stephen.spector@xen.org>=20

=20


------_=_NextPart_001_01C8DC71.7187E9DF
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:x=3D"urn:schemas-microsoft-com:office:excel" =
xmlns:p=3D"urn:schemas-microsoft-com:office:powerpoint" =
xmlns:a=3D"urn:schemas-microsoft-com:office:access" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:s=3D"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" =
xmlns:rs=3D"urn:schemas-microsoft-com:rowset" xmlns:z=3D"#RowsetSchema" =
xmlns:b=3D"urn:schemas-microsoft-com:office:publisher" =
xmlns:ss=3D"urn:schemas-microsoft-com:office:spreadsheet" =
xmlns:c=3D"urn:schemas-microsoft-com:office:component:spreadsheet" =
xmlns:oa=3D"urn:schemas-microsoft-com:office:activation" =
xmlns:html=3D"http://www.w3.org/TR/REC-html40" =
xmlns:q=3D"http://schemas.xmlsoap.org/soap/envelope/" xmlns:D=3D"DAV:" =
xmlns:x2=3D"http://schemas.microsoft.com/office/excel/2003/xml" =
xmlns:ois=3D"http://schemas.microsoft.com/sharepoint/soap/ois/" =
xmlns:dir=3D"http://schemas.microsoft.com/sharepoint/soap/directory/" =
xmlns:ds=3D"http://www.w3.org/2000/09/xmldsig#" =
xmlns:dsp=3D"http://schemas.microsoft.com/sharepoint/dsp" =
xmlns:udc=3D"http://schemas.microsoft.com/data/udc" =
xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" =
xmlns:sub=3D"http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/"=
 xmlns:ec=3D"http://www.w3.org/2001/04/xmlenc#" =
xmlns:sp=3D"http://schemas.microsoft.com/sharepoint/" =
xmlns:sps=3D"http://schemas.microsoft.com/sharepoint/soap/" =
xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =
xmlns:udcxf=3D"http://schemas.microsoft.com/data/udc/xmlfile" =
xmlns:wf=3D"http://schemas.microsoft.com/sharepoint/soap/workflow/" =
xmlns:mver=3D"http://schemas.openxmlformats.org/markup-compatibility/2006=
" xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns:mrels=3D"http://schemas.openxmlformats.org/package/2006/relationshi=
ps" =
xmlns:ex12t=3D"http://schemas.microsoft.com/exchange/services/2006/types"=
 =
xmlns:ex12m=3D"http://schemas.microsoft.com/exchange/services/2006/messag=
es" xmlns:Z=3D"urn:schemas-microsoft-com:" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
h4
	{mso-style-priority:9;
	mso-style-link:"Heading 4 Char";
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{mso-style-priority:34;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
span.Heading4Char
	{mso-style-name:"Heading 4 Char";
	mso-style-priority:9;
	mso-style-link:"Heading 4";
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.line874, li.line874, div.line874
	{mso-style-name:line874;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
.MsoChpDefault
	{mso-style-type:export-only;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:239683106;
	mso-list-template-ids:-1199143814;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
@list l1
	{mso-list-id:1117875967;
	mso-list-type:hybrid;
	mso-list-template-ids:-75053150 67698689 67698691 67698693 67698689 =
67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:Symbol;}
@list l1:level2
	{mso-level-number-format:bullet;
	mso-level-text:o;
	mso-level-tab-stop:none;
	mso-level-number-position:left;
	text-indent:-.25in;
	font-family:"Courier New";}
@list l2
	{mso-list-id:1518227987;
	mso-list-template-ids:-868969504;}
@list l2:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:.5in;
	mso-level-number-position:left;
	text-indent:-.25in;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal>For those of you who couldn&#8217;t attend =
today&#8217;s Xen
API Meeting; here are some links to more information:<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l1 =
level1 lfo1'><![if !supportLists]><span
style=3D'font-family:Symbol'><span =
style=3D'mso-list:Ignore'>&middot;<span
style=3D'font:7.0pt "Times New =
Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]>Meeting Minutes - <a
href=3D"http://wiki.xensource.com/xenwiki/XenApi?action=3DAttachFile&amp;=
do=3Dget&amp;target=3DMeeting+2+Minutes.txt">http://wiki.xensource.com/xe=
nwiki/XenApi?action=3DAttachFile&amp;do=3Dget&amp;target=3DMeeting+2+Minu=
tes.txt</a><o:p></o:p></p>

<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l1 =
level1 lfo1'><![if !supportLists]><span
style=3D'font-family:Symbol'><span =
style=3D'mso-list:Ignore'>&middot;<span
style=3D'font:7.0pt "Times New =
Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]>Questions Sent in for Meeting - <a
href=3D"http://wiki.xensource.com/xenwiki/XenApi?action=3DAttachFile&amp;=
do=3Dget&amp;target=3DMeeting+2+Questions.txt">http://wiki.xensource.com/=
xenwiki/XenApi?action=3DAttachFile&amp;do=3Dget&amp;target=3DMeeting+2+Qu=
estions.txt</a><o:p></o:p></p>

<p class=3DMsoListParagraph style=3D'text-indent:-.25in;mso-list:l1 =
level1 lfo1'><![if !supportLists]><span
style=3D'font-family:Symbol'><span =
style=3D'mso-list:Ignore'>&middot;<span
style=3D'font:7.0pt "Times New =
Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]>New Wiki Section in XenAPI<o:p></o:p></p>

<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:1.0in'><b><span style=3D'font-size:12.0pt;font-family:"Times =
New Roman","serif"'>Xen
API Project To Do List<o:p></o:p></span></b></p>

<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:1.0in'><span style=3D'font-size:12.0pt;font-family:"Times =
New Roman","serif"'>List
of Current Xen API 1.0 Functions that need completion or update: =
<o:p></o:p></span></p>

<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:1.5in;text-indent:-.25in;mso-list:l0 level1 lfo2'><![if =
!supportLists]><span
style=3D'font-size:10.0pt;font-family:Symbol'><span =
style=3D'mso-list:Ignore'>&middot;<span
style=3D'font:7.0pt "Times New =
Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span =
style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'>[example]
<o:p></o:p></span></p>

<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:1.0in'><span style=3D'font-size:12.0pt;font-family:"Times =
New Roman","serif"'>List
of Features for future Xen API desired: <o:p></o:p></span></p>

<p class=3DMsoNormal =
style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
margin-left:1.5in;text-indent:-.25in;mso-list:l2 level1 lfo3'><![if =
!supportLists]><span
style=3D'font-size:10.0pt;font-family:Symbol'><span =
style=3D'mso-list:Ignore'>&middot;<span
style=3D'font:7.0pt "Times New =
Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span =
style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'>[example]
<o:p></o:p></span></p>

<p class=3DMsoNormal>The first step moving forward is to identify which =
Xen API
functions from the <a
href=3D"http://wiki.xensource.com/xenwiki/XenApi?action=3DAttachFile&amp;=
do=3Dget&amp;target=3Dxenapi-1.0.0.pdf">1.0
specification</a> need to be either updated or written. From there, =
people can
put their name up on the Wiki next to a function they will work on to =
avoid duplication
of efforts. Please also post any relevant information on that API on the =
Wiki
as well. Finally, if you have a feature or new API you would like to =
see,
please add it to the Wiki list as well. <o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Based on the community response to these actions we =
can
determine when our next meeting will be. Thanks.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Thanks.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Stephen
Spector</span><span style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>Sr.
Program Manager, Xen.org</span><span =
style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'>954.267.2853<=
/span><span
style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Arial","sans-serif"'><a
href=3D"mailto:stephen.spector@xen.org"><span =
style=3D'color:blue'>stephen.spector@xen.org</span></a></span><span
style=3D'font-size:12.0pt;font-family:"Times New =
Roman","serif"'><o:p></o:p></span></p>

<p class=3DMsoNormal><span style=3D'font-size:12.0pt;font-family:"Times =
New Roman","serif"'>&nbsp;</span><o:p></o:p></p>

</div>

</body>

</html>

------_=_NextPart_001_01C8DC71.7187E9DF--


--===============1576209377==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
xen-api mailing list
xen-api@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-api

--===============1576209377==--


From xen-api-bounces@lists.xensource.com Wed Jul 02 11:55:49 2008
Return-path: <xen-api-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Wed, 02 Jul 2008 11:55:49 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KE7Ua-0003iG-UT; Wed, 02 Jul 2008 11:55:48 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KE7US-0003hm-Uw
	for xen-api@lists.xensource.com; Wed, 02 Jul 2008 11:55:40 -0700
X-ASG-Debug-ID: 1215024939-5d7700050000-trChs3
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from vrsex1.csdcomm.com (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP id 80518539AF
	for <xen-api@lists.xensource.com>; Wed,  2 Jul 2008 11:55:39 -0700 (PDT)
Received: from vrsex1.csdcomm.com (mail.csdvrs.com [216.249.212.9]) by
	spam.xensource.com with ESMTP id dbYPGmyZwZisHsSe for
	<xen-api@lists.xensource.com>; Wed, 02 Jul 2008 11:55:39 -0700 (PDT)
Received: from 10.1.20.2 ([10.1.20.2]) by vrsex1.csdcomm.com ([192.168.64.9])
	with Microsoft Exchange Server HTTP-DAV ; 
	Wed,  2 Jul 2008 18:54:07 +0000
User-Agent: Microsoft-Entourage/12.11.0.080522
Date: Wed, 02 Jul 2008 14:55:37 -0400
X-ASG-Orig-Subj: Observations and opinions from the 2nd phonecall
From: Ian Blenke <iblenke@csdvrs.com>
To: <xen-api@lists.xensource.com>
Message-ID: <C4914769.9D8%iblenke@csdvrs.com>
Thread-Topic: Observations and opinions from the 2nd phonecall
Thread-Index: AcjcdTbgASjEF5W/N0WN9jJP1qV3rg==
Mime-version: 1.0
X-Barracuda-Connect: mail.csdvrs.com[216.249.212.9]
X-Barracuda-Start-Time: 1215024939
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.95
X-Barracuda-Spam-Status: No, SCORE=0.95 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_10_20,
	HTML_MESSAGE
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.54975
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	0.00 HTML_MESSAGE           BODY: HTML included in message
	0.94 HTML_10_20             BODY: Message is 10% to 20% HTML
Subject: [Xen-API] Observations and opinions from the 2nd phonecall
X-BeenThere: xen-api@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-api@lists.xensource.com>
List-Help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0632750504=="
Sender: xen-api-bounces@lists.xensource.com
Errors-To: xen-api-bounces@lists.xensource.com

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--===============0632750504==
Content-type: multipart/alternative;
	boundary="B_3297855337_41784979"

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3297855337_41784979
Content-type: text/plain;
	charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

It was mentioned that Citrix may have an internal interest in bringing the
OpenSource XenAPI in to sync with their current commercial offering.

- Can we get some kind of commitment from Citrix to this end?
- Should we be trying to follow the commercial XenAPI direction either way?
- Any commercial third party apps, or customer written management harnesses=
,
written against the commercial XenAPI could conceivably be used against the
OpenSource XenAPI in this case.

It was also mentioned that there is a pluggable storage backend to the
commercial XenAPI for mapping UUIDs to actual storage elements.
- Should we be trying to augment the XenAPI to do something beyond UUID vdi
mapping?
- Would it be better to define a XenAPI =B3backend=B2 SPI layer for plugins to
be written in a implementation specific way?

It appears to me that the opensource XenAPI really needs to be a bit more
flexible than the Citrix commercial product offering. The Citrix commercial
offering has a cluster aware management layer behind their XenAPI. Clustere=
d
storage and networking is managed behind the scenes, abstracted out of view=
.

The opensource XenAPI implementation has no such layer, it was intended to
manage one dom0 node at a time, independently.

After the call, it seems like everyone likes the idea of a pluggable
backend. In this case, the XenAPI becomes more of a middleware layer of
sorts, providing a unified API frontend and a pluggable =B3SPI=B2 backend to
graft onto whatever management harness a user should decide to use.

This is the approach the libvirt project has taken, with any number of
virtual backends available for the API frontend (qemu, kvm, etc, etc). The
downside to trying to be everything to everyone, however, is that you=B9re
stuck with a least-common-denominator approach.

The opensource Xen project as a whole seems to have generally avoided the
need for a single management harness to date. This appears to have been
delegated purely to commercial offerings.
That has led to a gamut of turn-key commercial offerings that seem to
completely disregard integrating with the opensource Xen project based
servers generally based on licensing models.

I=B9m ok with commercial offerings like Xen Enterprise/Server, Virtual Iron,
xVM Ops Center 2.0, Hyperic, etc, users need vendor supported product
offerings.

OTOH, it sure would be nice to see OpenQRM, ZenOSS, zentific, xengine, and
other opensource based engines easily integrate and manage opensource Xen
based servers regardless of distribution and packaging.

So I guess the question I=B9m asking here is: how can we make XenAPI somethin=
g
that can support a pluggable backend to encourage opensource management
harnesses to be written?

* Ian C. Blenke <iblenke@csdvrs.com> <ian@blenke.com> http://ian.blenke.com=
/=20


--B_3297855337_41784979
Content-type: text/html;
	charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Observations and opinions from the 2nd phonecall</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:11pt=
'>It was mentioned that Citrix may have an internal interest in bringing the=
 OpenSource XenAPI in to sync with their current commercial offering.<BR>
<BR>
- Can we get some kind of commitment from Citrix to this end?<BR>
- Should we be trying to follow the commercial XenAPI direction either way?=
<BR>
- Any commercial third party apps, or customer written management harnesses=
, written against the commercial XenAPI could conceivably be used against th=
e OpenSource XenAPI in this case.<BR>
<BR>
It was also mentioned that there is a pluggable storage backend to the comm=
ercial XenAPI for mapping UUIDs to actual storage elements.<BR>
- Should we be trying to augment the XenAPI to do something beyond UUID vdi=
 mapping?<BR>
- Would it be better to define a XenAPI &#8220;backend&#8221; SPI layer for=
 plugins to be written in a implementation specific way?<BR>
<BR>
It appears to me that the opensource XenAPI really needs to be a bit more f=
lexible than the Citrix commercial product offering. The Citrix commercial o=
ffering has a cluster aware management layer behind their XenAPI. Clustered =
storage and networking is managed behind the scenes, abstracted out of view.=
<BR>
<BR>
The opensource XenAPI implementation has no such layer, it was intended to =
manage one dom0 node at a time, independently.<BR>
<BR>
After the call, it seems like everyone likes the idea of a pluggable backen=
d. In this case, the XenAPI becomes more of a middleware layer of sorts, pro=
viding a unified API frontend and a pluggable &#8220;SPI&#8221; backend to g=
raft onto whatever management harness a user should decide to use.<BR>
<BR>
This is the approach the libvirt project has taken, with any number of virt=
ual backends available for the API frontend (qemu, kvm, etc, etc). The downs=
ide to trying to be everything to everyone, however, is that you&#8217;re st=
uck with a least-common-denominator approach.<BR>
<BR>
The opensource Xen project as a whole seems to have generally avoided the n=
eed for a single management harness to date. This appears to have been deleg=
ated purely to commercial offerings.<BR>
That has led to a gamut of turn-key commercial offerings that seem to compl=
etely disregard integrating with the opensource Xen project based servers ge=
nerally based on licensing models.<BR>
<BR>
I&#8217;m ok with commercial offerings like Xen Enterprise/Server, Virtual =
Iron, &nbsp;xVM Ops Center 2.0, Hyperic, etc, users need vendor supported pr=
oduct offerings.<BR>
<BR>
OTOH, it sure would be nice to see OpenQRM, ZenOSS, zentific, xengine, and =
other opensource based engines easily integrate and manage opensource Xen ba=
sed servers regardless of distribution and packaging.<BR>
<BR>
So I guess the question I&#8217;m asking here is: how can we make XenAPI so=
mething that can support a pluggable backend to encourage opensource managem=
ent harnesses to be written?<BR>
<BR>
</SPAN></FONT><UL><LI><FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"><SPAN=
 STYLE=3D'font-size:11pt'>Ian C. Blenke &lt;<a href=3D"iblenke@csdvrs.com">iblen=
ke@csdvrs.com</a>&gt; &lt;<a href=3D"ian@blenke.com">ian@blenke.com</a>&gt; <a=
 href=3D"http://ian.blenke.com/">http://ian.blenke.com/</a>
</SPAN></FONT><LI></UL>
</BODY>
</HTML>


--B_3297855337_41784979--



--===============0632750504==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
xen-api mailing list
xen-api@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-api

--===============0632750504==--



From xen-api-bounces@lists.xensource.com Fri Jul 04 06:38:05 2008
Return-path: <xen-api-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Fri, 04 Jul 2008 06:38:05 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KElUD-00041A-KY; Fri, 04 Jul 2008 06:38:05 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KElUB-00040i-SX
	for xen-api@lists.xensource.com; Fri, 04 Jul 2008 06:38:03 -0700
X-ASG-Debug-ID: 1215178682-4b1f000d0000-trChs3
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from ug-out-1314.google.com (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP id 171B8570AB
	for <xen-api@lists.xensource.com>; Fri,  4 Jul 2008 06:38:02 -0700 (PDT)
Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168])
	by spam.xensource.com with ESMTP id PwUL8HzlYDho2KLs for
	<xen-api@lists.xensource.com>; Fri, 04 Jul 2008 06:38:02 -0700 (PDT)
Received: by ug-out-1314.google.com with SMTP id u40so1006805ugc.12
	for <xen-api@lists.xensource.com>; Fri, 04 Jul 2008 06:38:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:mime-version:content-type;
	bh=R0xqXEhp8t5IexzoUbQSMQoevJTP37za3/fR0lGfUxI=;
	b=sKGX4DDXvxdIht2S5FIa6uxaUCQkODUTek93ngWx/HuZ7b0VAx86P1/k3gp9U/EUhp
	jJPNrcyGBtT30HkdAuhV2Yr42mFPpx1v8NwiDlEnEWuX6xrxwqbrFiU1Vbv3gsKOa7Eo
	yiK6WUEeAVCymLqov83Xd65EVAhHoIKwnQzE4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:mime-version:content-type;
	b=lmKFf5m09Whw6X4n+ZSayg087zta7iu6ELRBm7gZhCMuyk6X3EO0UjZE+H1+ANk2WZ
	yeZUVoGQ9FiVrUCVeCjQZ4Hxmlz9fMU0l3x1kiYMhBLHsfbalvtRgn5eY1dmn6J2Q6Ex
	Abru4lys/rfMNB65Q+MNP6SL/uxSEssZfkcRI=
Received: by 10.125.149.3 with SMTP id b3mr152920mko.81.1215178680915;
	Fri, 04 Jul 2008 06:38:00 -0700 (PDT)
Received: by 10.125.98.5 with HTTP; Fri, 4 Jul 2008 06:38:00 -0700 (PDT)
Message-ID: <4a8ede090807040638s5370ebb0gbe604344414421e0@mail.gmail.com>
Date: Fri, 4 Jul 2008 15:38:00 +0200
From: "=?ISO-8859-2?Q?Micha=B3_Krysi=F1ski?=" <rozbudowywowywacz@gmail.com>
To: xen-api@lists.xensource.com
X-ASG-Orig-Subj: VM.create
MIME-Version: 1.0
X-Barracuda-Connect: ug-out-1314.google.com[66.249.92.168]
X-Barracuda-Start-Time: 1215178683
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.55135
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	0.00 HTML_MESSAGE           BODY: HTML included in message
Subject: [Xen-API] VM.create
X-BeenThere: xen-api@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-api@lists.xensource.com>
List-Help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0273774352=="
Sender: xen-api-bounces@lists.xensource.com
Errors-To: xen-api-bounces@lists.xensource.com

--===============0273774352==
Content-Type: multipart/alternative; 
	boundary="----=_Part_6809_33020199.1215178680915"

------=_Part_6809_33020199.1215178680915
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: base64
Content-Disposition: inline

SGVsbG8sCkknbSB3b3JraW5nIG9uIGEgcHJvamVjdCBpbnZvbHZpbmcgdGhlIGR5bmFtaWMgbWFu
YWdlbWVudCBvZiBYZW4gZG9tYWlucy4KSSdtIHVzaW5nIHRoZSBvcGVuIHNvdXJjZSB2ZXJzaW9u
IG9mIFhlbiAoMy4yKSwgTFZNIGZvciBzdG9yYWdlIGFuZCBKYXZhCmJpbmRpbmdzLiBJIHdhcyBh
YmxlIHRvIGxpc3QgcnVubmluZyBWTXMgYnkgY2FsbGluZwpWTS5nZXRBbGxSZWNvcmRzKGNvbm5l
Y3Rpb24pLiBUaGUgbmV4dCB0aGluZyBJJ20gdHJ5aW5nIHRvIGRvIGlzIHRvIGNyZWF0ZSBhCm5l
dyBWTS4gSXQncyBub3QgYSBwcm9ibGVtIHdpdGggdGhlIGNvbW1hbmQgbGluZSB0b29sIHhtOi4K
CnhtIGNyZWF0ZSBteUNvbmZpZyAtYwoKaGVyZSBhcmUgdGhlIGNvbnRlbnRzIG9mIHRoZSBjb25m
aWcgZmlsZToKCm5hbWU9ImRlYmlhbkd1ZXN0IgptZW1vcnk9MjU2Cmtlcm5lbD0iL2Jvb3Qvdm1s
aW51ei0yLjYuMjQtMTgteGVuIgpyYW1kaXNrPSIvYm9vdC9pbml0cmQuaW1nLTIuNi4yNC0xOC14
ZW4iCnZpZj1bJ2JyaWRnZT1ldGgwJ10KZGlzaz1bJ3BoeTovZGV2L3hlbi1kaXNrcy9kZWJpYW5H
dWVzdFJvb3Qsc2RhMSx3JywncGh5Oi9kZXYveGVuLWRpc2tzL2RlYmlhbkd1ZXN0U3dhcCxzZGEy
LHcnXQpyb290PSIvZGV2L3NkYTEgcm8iCgpIb3cgYW0gSSBzdXBwb3NlZCB0byBkbyB0aGUgc2Ft
ZSB0aGluZyB3aXRoIEphdmEgY2FsbHMgKHRoZSBwcm9ibGVtIGlzIHdpdGgKdGhlIGRpc2sgcGFy
dCwgb3RoZXIgYXJndW1lbnRzIHNlZW0gcmF0aGVyIHN0cmFpZ2hmb3J3YXJkKT8KCiAgICAgICBW
REkuUmVjb3JkIHZkaXJlYyA9IG5ldyBWREkuUmVjb3JkKCk7CiAgICAgICAgdmRpcmVjLmxvY2F0
aW9uID0gInBoeTovZGV2L3hlbi1kaXNrcy9kZWJpYW5HdWVzdFJvb3QiOwogICAgICAgIHZkaXJl
Yy5uYW1lTGFiZWwgPSAiZGViaWFuR3Vlc3RSb290IjsKICAgICAgICB0cnkgewogICAgICAgICAg
ICBWREkuY3JlYXRlKGMsdmRpcmVjKTsKICAgICAgICAgICAgLy9mYWlsczogW0hBTkRMRV9JTlZB
TElELCBTUiwgT3BhcXVlUmVmOk5VTExdCiAgICAgICAgfSBjYXRjaCAuLi4KClNob3VsZCBJIGNy
ZWF0ZSBhbiBTUiBvciBpbnRyb2R1Y2UgdGhlIHBhcnRpdGlvbiBzdG9yaW5nIExWTSBpbWFnZXMg
dG8gWGVuCnNvbWVob3c/IChTUi5pbnRyb2R1Y2UgZmFpbHM6IE1FU1NBR0VfTUVUSE9EX1VOS05P
V04pCgpSZWdhcmRzLCBNaWNoYbMgS3J5c2nxc2tpCg==
------=_Part_6809_33020199.1215178680915
Content-Type: text/html; charset=ISO-8859-2
Content-Transfer-Encoding: base64
Content-Disposition: inline

SGVsbG8sPGJyPkkmIzM5O20gd29ya2luZyBvbiBhIHByb2plY3QgaW52b2x2aW5nIHRoZSBkeW5h
bWljIG1hbmFnZW1lbnQgb2YgWGVuIGRvbWFpbnMuIEkmIzM5O20gdXNpbmcgdGhlIG9wZW4gc291
cmNlIHZlcnNpb24gb2YgWGVuICgzLjIpLCBMVk0gZm9yIHN0b3JhZ2UgYW5kIEphdmEgYmluZGlu
Z3MuIEkgd2FzIGFibGUgdG8gbGlzdCBydW5uaW5nIFZNcyBieSBjYWxsaW5nIFZNLmdldEFsbFJl
Y29yZHMoY29ubmVjdGlvbikuIFRoZSBuZXh0IHRoaW5nIEkmIzM5O20gdHJ5aW5nIHRvIGRvIGlz
IHRvIGNyZWF0ZSBhIG5ldyBWTS4gSXQmIzM5O3Mgbm90IGEgcHJvYmxlbSB3aXRoIHRoZSBjb21t
YW5kIGxpbmUgdG9vbCB4bTouPGJyPgo8YnI+eG0gY3JlYXRlIG15Q29uZmlnIC1jPGJyPjxicj5o
ZXJlIGFyZSB0aGUgY29udGVudHMgb2YgdGhlIGNvbmZpZyBmaWxlOjxicj48YnI+bmFtZT0mcXVv
dDtkZWJpYW5HdWVzdCZxdW90Ozxicj5tZW1vcnk9MjU2PGJyPmtlcm5lbD0mcXVvdDsvYm9vdC92
bWxpbnV6LTIuNi4yNC0xOC14ZW4mcXVvdDs8YnI+cmFtZGlzaz0mcXVvdDsvYm9vdC9pbml0cmQu
aW1nLTIuNi4yNC0xOC14ZW4mcXVvdDs8YnI+CnZpZj1bJiMzOTticmlkZ2U9ZXRoMCYjMzk7XTxi
cj5kaXNrPVsmIzM5O3BoeTovZGV2L3hlbi1kaXNrcy9kZWJpYW5HdWVzdFJvb3Qsc2RhMSx3JiMz
OTssJiMzOTtwaHk6L2Rldi94ZW4tZGlza3MvZGViaWFuR3Vlc3RTd2FwLHNkYTIsdyYjMzk7XTxi
cj5yb290PSZxdW90Oy9kZXYvc2RhMSBybyZxdW90Ozxicj48YnI+SG93IGFtIEkgc3VwcG9zZWQg
dG8gZG8gdGhlIHNhbWUgdGhpbmcgd2l0aCBKYXZhIGNhbGxzICh0aGUgcHJvYmxlbSBpcyB3aXRo
IHRoZSBkaXNrIHBhcnQsIG90aGVyIGFyZ3VtZW50cyBzZWVtIHJhdGhlciBzdHJhaWdoZm9yd2Fy
ZCk/IDxicj4KJm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7IDxicj4m
bmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsgVkRJLlJlY29yZCB2ZGlyZWMgPSBu
ZXcgVkRJLlJlY29yZCgpOzxicj4mbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsm
bmJzcDsgdmRpcmVjLmxvY2F0aW9uID0gJnF1b3Q7cGh5Oi9kZXYveGVuLWRpc2tzL2RlYmlhbkd1
ZXN0Um9vdCZxdW90Ozs8YnI+Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5i
c3A7IHZkaXJlYy5uYW1lTGFiZWwgPSAmcXVvdDtkZWJpYW5HdWVzdFJvb3QmcXVvdDs7PGJyPiZu
YnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyB0cnkgezxicj4mbmJzcDsm
bmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJz
cDsgVkRJLmNyZWF0ZShjLHZkaXJlYyk7PGJyPgombmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJz
cDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsgLy9mYWlsczogW0hBTkRMRV9J
TlZBTElELCBTUiwgT3BhcXVlUmVmOk5VTExdPGJyPiZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOyZu
YnNwOyZuYnNwOyZuYnNwOyB9IGNhdGNoIC4uLiA8YnI+Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7
Jm5ic3A7Jm5ic3A7Jm5ic3A7IDxicj5TaG91bGQgSSBjcmVhdGUgYW4gU1Igb3IgaW50cm9kdWNl
IHRoZSBwYXJ0aXRpb24gc3RvcmluZyBMVk0gaW1hZ2VzIHRvIFhlbiBzb21laG93PyAoU1IuaW50
cm9kdWNlIGZhaWxzOiBNRVNTQUdFX01FVEhPRF9VTktOT1dOKTxicj4KPGJyPlJlZ2FyZHMsIE1p
Y2hhsyBLcnlzafFza2k8YnI+Cg==
------=_Part_6809_33020199.1215178680915--


--===============0273774352==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
xen-api mailing list
xen-api@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-api

--===============0273774352==--


From xen-api-bounces@lists.xensource.com Sat Jul 05 12:55:21 2008
Return-path: <xen-api-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Sat, 05 Jul 2008 12:55:21 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KFDqr-0007Po-1L; Sat, 05 Jul 2008 12:55:21 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KFDqo-0007PR-Bq
	for xen-api@lists.xensource.com; Sat, 05 Jul 2008 12:55:18 -0700
X-ASG-Debug-ID: 1215287716-4aa100010000-trChs3
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from farnsworth.unet.brandeis.edu (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with ESMTP id 20A51586B6
	for <xen-api@lists.xensource.com>; Sat,  5 Jul 2008 12:55:16 -0700 (PDT)
Received: from farnsworth.unet.brandeis.edu (farnsworth.unet.brandeis.edu
	[129.64.99.56]) by spam.xensource.com with ESMTP id
	EjAag15je6XxAdp2 for <xen-api@lists.xensource.com>;
	Sat, 05 Jul 2008 12:55:16 -0700 (PDT)
Received: from [192.168.0.4] (c-76-110-3-199.hsd1.fl.comcast.net
	[76.110.3.199])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested) (Authenticated sender: jwest)
	by farnsworth.unet.brandeis.edu (Postfix) with ESMTP id 061E852275;
	Sat,  5 Jul 2008 15:55:15 -0400 (EDT)
Message-ID: <486FD17D.1010507@brandeis.edu>
Date: Sat, 05 Jul 2008 15:54:37 -0400
From: Joshua West <jwest@brandeis.edu>
User-Agent: Thunderbird 2.0.0.14 (X11/20080421)
MIME-Version: 1.0
To: =?ISO-8859-2?Q?Micha=B3_Krysi=F1ski?= <rozbudowywowywacz@gmail.com>
X-ASG-Orig-Subj: Re: [Xen-API] VM.create
Subject: Re: [Xen-API] VM.create
References: <4a8ede090807040638s5370ebb0gbe604344414421e0@mail.gmail.com>
In-Reply-To: <4a8ede090807040638s5370ebb0gbe604344414421e0@mail.gmail.com>
X-Enigmail-Version: 0.95.6
Content-Type: text/plain; charset=ISO-8859-2
X-Barracuda-Connect: farnsworth.unet.brandeis.edu[129.64.99.56]
X-Barracuda-Start-Time: 1215287717
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.55238
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
Content-Transfer-Encoding: quoted-printable
Cc: xen-api@lists.xensource.com
X-BeenThere: xen-api@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-api@lists.xensource.com>
List-Help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=subscribe>
Sender: xen-api-bounces@lists.xensource.com
Errors-To: xen-api-bounces@lists.xensource.com

Hi Michal,

VDI creation requires that one specifies the Storage Repository used.=20
Most likely, what you're concerned with is just the "Local" storage
repository... meaning nothing fancy thats handled by Xen (like iSCSI
connection setup/teardown, as I believe is implemented in Citrix XenServe=
r).

So, how does one get the reference ID of the Local storage repository?=20
I'm not sure how it is in Java, but with Python:

sr_uuid =3D session.xenapi.SR.get_by_name_label('Local')

You'll need to do the same in your Java code and then pass the Local SR
reference ID as an attribute of your vdirec object.  Meaning, vdirec.SR
=3D sr_uuid;.

Here's some example code used in Python to build a VDI:

def CreateVDI(SR, Name, Location):
	VDI_ref =3D session.xenapi.VDI.create({	'name_label': Name,=20
						'name_description': "",=20
						'SR': SR,=20
						'virtual_size': 0,=20
						'type': "system",=20
						'sharable': True,=20
						'read_only': False,=20
						'other_config': { 'location': Location }})
	return VDI_ref

Note how the location (aka phy:/dev/xen-disks/debianGuestRoot) is part
of the other_config attribute.  Not sure if this is the case in the Xen
3.2 API, but it is such in Xen 3.1.x's.

Hope this helps.

Micha=B3 Krysi=F1ski wrote:
> Hello,
> I'm working on a project involving the dynamic management of Xen
> domains. I'm using the open source version of Xen (3.2), LVM for
> storage and Java bindings. I was able to list running VMs by calling
> VM.getAllRecords(connection). The next thing I'm trying to do is to
> create a new VM. It's not a problem with the command line tool xm:.
>
> xm create myConfig -c
>
> here are the contents of the config file:
>
> name=3D"debianGuest"
> memory=3D256
> kernel=3D"/boot/vmlinuz-2.6.24-18-xen"
> ramdisk=3D"/boot/initrd.img-2.6.24-18-xen"
> vif=3D['bridge=3Deth0']
> disk=3D['phy:/dev/xen-disks/debianGuestRoot,sda1,w','phy:/dev/xen-disks=
/debianGuestSwap,sda2,w']
> root=3D"/dev/sda1 ro"
>
> How am I supposed to do the same thing with Java calls (the problem is
> with the disk part, other arguments seem rather straighforward)?
>       =20
>        VDI.Record vdirec =3D new VDI.Record();
>         vdirec.location =3D "phy:/dev/xen-disks/debianGuestRoot";
>         vdirec.nameLabel =3D "debianGuestRoot";
>         try {
>             VDI.create(c,vdirec);
>             //fails: [HANDLE_INVALID, SR, OpaqueRef:NULL]
>         } catch ...
>       =20
> Should I create an SR or introduce the partition storing LVM images to
> Xen somehow? (SR.introduce fails: MESSAGE_METHOD_UNKNOWN)
>
> Regards, Micha=B3 Krysi=F1ski
> -----------------------------------------------------------------------=
-
>
> _______________________________________________
> xen-api mailing list
> xen-api@lists.xensource.com
> http://lists.xensource.com/mailman/listinfo/xen-api
>  =20


--=20
Joshua West
Systems Engineer
Brandeis University
http://www.brandeis.edu


_______________________________________________
xen-api mailing list
xen-api@lists.xensource.com
http://lists.xensource.com/mailman/listinfo/xen-api

From xen-api-bounces@lists.xensource.com Tue Jul 08 08:51:27 2008
Return-path: <xen-api-bounces@lists.xensource.com>
Envelope-to: www-data@lists.xensource.com
Delivery-date: Tue, 08 Jul 2008 08:51:27 -0700
Received: from localhost ([127.0.0.1] helo=lists.colo.xensource.com)
	by lists.xensource.com with esmtp (Exim 4.43)
	id 1KGFTS-0006zC-RL; Tue, 08 Jul 2008 08:51:26 -0700
Received: from spam.xensource.com ([70.42.241.90])
	by lists.xensource.com with esmtp (Exim 4.43) id 1KGFSc-0006QA-EM
	for xen-api@lists.xensource.com; Tue, 08 Jul 2008 08:50:34 -0700
X-ASG-Debug-ID: 1215532233-7bee00240000-trChs3
X-Barracuda-URL: http://spam.xensource.com:8000/cgi-bin/mark.cgi
Received: from exprod7og115.obsmtp.com (localhost [127.0.0.1])
	by spam.xensource.com (Spam Firewall) with SMTP id B10735B226
	for <xen-api@lists.xensource.com>; Tue,  8 Jul 2008 08:50:33 -0700 (PDT)
Received: from exprod7og115.obsmtp.com (exprod7ob115.obsmtp.com [64.18.2.216])
	by spam.xensource.com with SMTP id 0Nv0YN76RjY1GbGC for
	<xen-api@lists.xensource.com>; Tue, 08 Jul 2008 08:50:33 -0700 (PDT)
Received: from source ([198.177.232.249]) by exprod7ob115.postini.com
	([64.18.6.12]) with SMTP; Tue, 08 Jul 2008 08:50:32 PDT
Received: from sun-email.corp.avocent.com ([172.26.4.16]) by
	hsv-email2.corp.avocent.com with Microsoft SMTPSVC(6.0.3790.3959); 
	Tue, 8 Jul 2008 10:50:32 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
X-ASG-Orig-Subj: Powering Down/Up  Virtual Machines
Date: Tue, 8 Jul 2008 11:50:48 -0400
Message-ID: <4821D5B6CD3C1B4880E6E94C6E70913E02EFC7B0@sun-email.corp.avocent.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Powering Down/Up  Virtual Machines
Thread-Index: AcjhEmQjjw+zkZU9RK+LmZa/TSaNyw==
From: "Caruso, Joseph" <Joseph.Caruso@avocent.com>
To: <xen-api@lists.xensource.com>
X-OriginalArrivalTime: 08 Jul 2008 15:50:32.0521 (UTC)
	FILETIME=[5A919390:01C8E112]
X-Barracuda-Connect: exprod7ob115.obsmtp.com[64.18.2.216]
X-Barracuda-Start-Time: 1215532233
X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at xensource.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=3.5
	QUARANTINE_LEVEL=6.0 KILL_LEVEL=1000.0 tests=HTML_MESSAGE
X-Barracuda-Spam-Report: Code version 3.1, rules version 3.1.55491
	Rule breakdown below
	pts rule name              description
	---- ----------------------
	--------------------------------------------------
	0.00 HTML_MESSAGE           BODY: HTML included in message
Subject: [Xen-API] Powering Down/Up  Virtual Machines
X-BeenThere: xen-api@lists.xensource.com
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-Unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
List-Post: <mailto:xen-api@lists.xensource.com>
List-Help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-Subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>,
	<mailto:xen-api-request@lists.xensource.com?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1758404998=="
Sender: xen-api-bounces@lists.xensource.com
Errors-To: xen-api-bounces@lists.xensource.com

This is a multi-part message in MIME format.

--===============1758404998==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C8E112.67866FC6"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C8E112.67866FC6
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello,

=20

My application is using the Java API and I'm running into a problem.
The application first makes a connection to the master host and
successfully retrieves all the resident Virtual
machines(Host.Record.residentVMs).   Next, a single virtual machine
running on the  master host is powered down.  Finally, my application
retrieves all the Virtual machines.  The powered down virtual machine is
no longer resident on the master host.   What happened to it?  I
eventually need my application shutdown and then restart  virtual
machines. I can't restart since it's not on the host system.  I'm using
the Java API.

=20

Any help is appreciated.

Joe


------_=_NextPart_001_01C8E112.67866FC6
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal>Hello,<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>My application is using the Java API and I&#8217;m =
running
into a problem.&nbsp; &nbsp;The application first makes a connection to =
the
master host and successfully retrieves all the resident Virtual =
machines(Host.Record.residentVMs).&nbsp;
&nbsp;Next, a single virtual machine running on the &nbsp;master host is
powered down.&nbsp; Finally, my application retrieves all the Virtual
machines.&nbsp; The powered down virtual machine is no longer resident =
on the
master host.&nbsp;&nbsp; What happened to it? &nbsp;I eventually need my
application shutdown and then restart &nbsp;virtual machines. I =
can&#8217;t
restart since it&#8217;s not on the host system.&nbsp; I&#8217;m using =
the Java
API.<o:p></o:p></p>

<p class=3DMsoNormal><o:p>&nbsp;</o:p></p>

<p class=3DMsoNormal>Any help is appreciated.<o:p></o:p></p>

<p class=3DMsoNormal>Joe<o:p></o:p></p>

</div>

</body>

</html>

------_=_NextPart_001_01C8E112.67866FC6--


--===============1758404998==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: