Skip to contentSkip to conversation

: Fix blktap disks used with bootloader

PATCH New Daniel P. Berrange 1 participant 1 message Oct 4, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix blktap disks used with bootloader

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

Regards,
Dan.

Signature · 4 lines
|=- 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  -=| 
tools/python/xen/xend/XendDomainInfo.py +1 -1
diff -r 6a8ae4c34abe tools/python/xen/xend/XendDomainInfo.py
@@ -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:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel