[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Create command fail if giving an empty disk file path, such as ', hdc:cdrom, r'
Hi all, >From changeset 11814, default HVM config can not be created up. It just repot strange "xm create" usage error. It need to remove ',hdc:cdrom,r' option or add a full file path like 'file:/abc.iso,hdc:cdrom,r' to create HVM successfully. Actually it is also same to xenU, if not giving disk image file path. I have located the issue is adding unify_resname function in tools/python/xen/util/security.py This function doesn't judge whether "resource" is empty string. If "resource" is empty string, following line will generate "ValueError" exception and capture by main.py. (type, resfile) = resource.split(":") The easiest fixing is to add judgment to resource. If so, Guests can be created even if not providing any disk image file, and let the boot process to tell that user didn't give the right disk. This is also the used to be. But I am not sure if it is an acceptable fixing. Could anybody give some advice? diff -r 8113c55a6efd tools/python/xen/util/security.py --- a/tools/python/xen/util/security.py Sun Oct 22 16:38:59 2006 +++ b/tools/python/xen/util/security.py Mon Oct 23 16:48:46 2006 @@ -601,6 +601,9 @@ """Makes all resource locations absolute. In case of physical resources, '/dev/' is added to local file names""" + if not resource: + return resource + # sanity check on resource name (type, resfile) = resource.split(":") if type == "phy": Best Regards, Yongkang (Kangkang) 永康 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |