WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Xend doesn't allow domain creation with multiple empty CD-RO

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Xend doesn't allow domain creation with multiple empty CD-ROM devices
From: "John" <lists.xen@xxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Sep 2009 23:14:30 -0700
Delivery-date: Tue, 29 Sep 2009 23:16:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
This is a very simple bug. "xm create" complains when you try to use a line like this in your cfg to specify multiple unused virtual CD-ROMs:

disk = [ 'file:/servers/customers/test.img,hda,w', ',hdc:cdrom,r', ',hdd:cdrom,r' ]

...by giving this error:

Error: The file "None" is already used

I don't know if it's the proper way of going about it, but this patch (against a xen-unstable from a week or two ago) seems to address it.

--- a/tools/python/xen/xend/XendConfig.py 2009-09-17 13:44:27.000000000 -0500 +++ b/tools/python/xen/xend/XendConfig.py 2009-09-26 20:53:04.714226516 -0500
@@ -1198,12 +1198,12 @@
if o_dev_type == 'vbd' or o_dev_type == 'tap' or o_dev_type == 'tap2':
                    blkdev_file = blkdev_uname_to_file(dev_uname)
                    o_dev_uname = sxp.child_value(o_dev_info, 'uname')
-                    if o_dev_uname != None:
+                    if o_dev_uname and o_dev_uname != None:
                        o_blkdev_file = blkdev_uname_to_file(o_dev_uname)
                        if blkdev_file == o_blkdev_file:
raise XendConfigError('The file "%s" is already used' %
                                                  blkdev_file)
-                    if dev_uname == o_dev_uname:
+                    if dev_uname and dev_uname == o_dev_uname:
raise XendConfigError('The uname "%s" is already defined' %
                                             dev_uname)
                    o_blkdev_name = sxp.child_value(o_dev_info, 'dev')

-John

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Xend doesn't allow domain creation with multiple empty CD-ROM devices, John <=