changeset 11706:bf0deb09facd

[XEND] Fix pygrub when run server-side on a domain with blktap disks.

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.

Signed-off-by: Daniel P. Berrange <>
author kfraser@localhost.localdomain
date Thu Oct 05 16:14:50 2006 +0100 (2006-10-05)
parents b3cba293e61a
children efb8b20004b7
files tools/python/xen/xend/
line diff
     1.1 --- a/tools/python/xen/xend/	Thu Oct 05 16:05:12 2006 +0100
     1.2 +++ b/tools/python/xen/xend/	Thu Oct 05 16:14:50 2006 +0100
     1.3 @@ -1745,7 +1745,7 @@ class XendDomainInfo:
     1.4          blcfg = None
     1.5          # FIXME: this assumes that we want to use the first disk device
     1.6          for (n,c) in['device']:
     1.7 -            if not n or not c or n != "vbd":
     1.8 +            if not n or not c or not(n in ["vbd", "tap"]):
     1.9                  continue
    1.10              disk = sxp.child_value(c, "uname")
    1.11              if disk is None: