From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: [PATCH]: Fix blktap disks used with bootloader Date: Wed, 4 Oct 2006 22:34:47 +0100 Message-ID: <20061004213447.GK474@redhat.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline For some slightly-crazy reason the blktap patches changed the name of the SEXPR block containing the disk definition 'vbd' to 'tap', even though merely changing the 'uname' fragement was sufficient. eg (vbd (backend 0) (dev hda:disk) (uname file:/xen/rhel4x86_64.img) (mode w) ) changes to (tap (backend 0) (dev hda:disk) (uname tap:aio:/xen/rhel4x86_64.img) (mode w) ) If you create a domain with xm, then xm runs pygrub client side which works fine. If you create a domain by feeding a block of SEXPR to Xend over its network port, then pygrub is run server side. The code in XenD which decides which disk to run pygrub against only looks for 'device/vbd' in the SEXPR so fails to see any blktap disks. The attached patch fixes this Signed-off-by: Daniel P. Berrange Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xen-tap-bootloader.patch" diff -r 6a8ae4c34abe tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Oct 04 09:43:45 2006 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Wed Oct 04 17:23:28 2006 -0400 @@ -1745,7 +1745,7 @@ class XendDomainInfo: blcfg = None # FIXME: this assumes that we want to use the first disk device for (n,c) in self.info['device']: - if not n or not c or n != "vbd": + if not n or not c or not(n in ["vbd", "tap"]): continue disk = sxp.child_value(c, "uname") if disk is None: --5vNYLRcllDrimb99 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 --5vNYLRcllDrimb99--