[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xm: needless to check 'kernel/ramdisk' is existent or not
Hi, Ian Campbell wrote: >> xl now cannot use 'bootloader' format (before your patchs), >> it just use 'kernel + ramdisk' format, so it should check 'kernel' >> is existent in Dom0 or not. >> >> But xm can use 'bootloader' format, in this format, 'kernel' should not be >> check in Dom0 because it is path in DomU. > > Correct. > Just ignore path check of kernel if bootloader is specified can fix this problem. Please refer to this patch. Yu ------------ When create DomU, if bootloader is specified, 'kernel/ramdisk' will be used by bootloader when boots DomU. So it is needless to check the path is existent or not. Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx> diff -r d867eb643fe4 -r 05e57f4db35d tools/python/xen/xm/create.py --- a/tools/python/xen/xm/create.py Tue Jul 13 18:17:28 2010 +0100 +++ b/tools/python/xen/xm/create.py Thu Jul 15 18:33:04 2010 +0800 @@ -708,7 +708,12 @@ return None config_image = [ vals.builder ] if vals.kernel: - if os.path.dirname(vals.kernel) != "" and os.path.exists(vals.kernel): + if vals.bootloader: + # If bootloader is specified, vals.kernel will be used + # by bootloader when boots DomU. So it is needless to + # check the path is existent or not. + config_image.append([ 'kernel', vals.kernel ]) + elif os.path.dirname(vals.kernel) != "" and os.path.exists(vals.kernel): config_image.append([ 'kernel', vals.kernel ]) elif vals.kernel == 'hvmloader': # Keep hvmloader w/o a path and let xend find it. @@ -721,7 +726,10 @@ else: raise ValueError('Cannot find kernel "%s"' % vals.kernel) if vals.ramdisk: - if os.path.dirname(vals.ramdisk) != "" and os.path.exists(vals.ramdisk): + if vals.bootloader: + # Same with 'kernel' above + config_image.append([ 'ramdisk', vals.ramdisk ]) + elif os.path.dirname(vals.ramdisk) != "" and os.path.exists(vals.ramdisk): config_image.append([ 'ramdisk', vals.ramdisk ]) elif os.path.exists(os.path.abspath(vals.ramdisk)): # Keep old behaviour, if path is valid. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |