This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] exception looking up device number for hda

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] exception looking up device number for hda
From: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
Date: Tue, 09 Aug 2005 10:58:17 +0800
Cc: Arun Sharma <arun.sharma@xxxxxxxxx>, Mike Wray <mike.wray@xxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, takebe_akio@xxxxxxxxxxxxxx
Delivery-date: Tue, 09 Aug 2005 02:58:50 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200508090249.52113.mark.williamson@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <42F3BF2C.70403@xxxxxxxxx> <200508081548.18887.mark.williamson@xxxxxxxxxxxx> <42F7F39E.3020300@xxxxxxxxx> <200508090249.52113.mark.williamson@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510
I've already made a patch when I doing para-driver debugging.
see the attach patch.
Does it fit the requirement?
It will skip setupping up the loop device for ioemu image files,
but by xm vbd-list, it can still see the file bind to hda.
so  this command is still useful.

Mark Williamson wrote:
Hope about an optional: vbd:/emu: prefix (or similar) on the second part
of the triplet for a disk?  The default (for non VMX domains) could be
"vbd" so existing behaviour would remain the same.

Sounds good to me. How about:

hda             = VBD hda
vbd://hda       = VBD hda
ioemu://hda     = IDE hda

Sounds fine but I think I'd actually ditch the // to fit in with the phy: and file: syntax we already have. (and as David said in another post, to avoid looking like a URL).

diff -r 48aed1403fe3 tools/examples/xmexample.vmx
--- a/tools/examples/xmexample.vmx      Fri Jul 22 16:44:33 2005
+++ b/tools/examples/xmexample.vmx      Tue Aug  9 10:54:01 2005
@@ -46,7 +46,7 @@
 # and MODE is r for read-only, w for read-write.
 #disk = [ 'phy:hda1,hda1,r' ]
-disk = [ 'file:/var/images/min-el3-i386.img,hda,w' ]
+disk = [ 'ioemu:/var/images/min-el3-i386.img,hda,w' ]
 # Set the kernel command line for the new domain.
diff -r 48aed1403fe3 tools/python/xen/xend/Blkctl.py
--- a/tools/python/xen/xend/Blkctl.py   Fri Jul 22 16:44:33 2005
+++ b/tools/python/xen/xend/Blkctl.py   Tue Aug  9 10:54:01 2005
@@ -30,7 +30,7 @@
     # Special case phy devices - they don't require any (un)binding
     # Parallax also doesn't need script-based binding.
-    if (type == 'phy') or (type == 'parallax'):
+    if (type == 'phy') or (type == 'parallax') or (type == 'ioemu'):
         return dets
     if script is None:
diff -r 48aed1403fe3 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Fri Jul 22 16:44:33 2005
+++ b/tools/python/xen/xend/image.py    Tue Aug  9 10:54:01 2005
@@ -287,12 +287,14 @@
         device = sxp.child(self.vm.config, 'device')
         vbdinfo = sxp.child(device, 'vbd')
         if not vbdinfo:
-            raise VmError("vmx: missing vbd configuration")
+            continue
         uname = sxp.child_value(vbdinfo, 'uname')
         vbddev = sxp.child_value(vbdinfo, 'dev')
         (vbdtype, vbdparam) = string.split(uname, ':', 1)
         vbddev_list = ['hda', 'hdb', 'hdc', 'hdd']
-        if vbdtype != 'file' or vbddev not in vbddev_list:
+        if vbdtype != 'ioemu':
+            continue
+        if vbddev not in vbddev_list:
             raise VmError("vmx: for qemu vbd type=file&dev=hda~hdd")
         ret.append("-%s" % vbddev)
         ret.append("%s" % vbdparam)
diff -r 48aed1403fe3 tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Fri Jul 22 16:44:33 2005
+++ b/tools/python/xen/xend/server/blkif.py     Tue Aug  9 10:54:01 2005
@@ -243,6 +243,8 @@
             node = Blkctl.block('bind', self.type, self.params)
+            if self.type == 'ioemu':
+                return
         if change:
Xen-devel mailing list