|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] xm: Do not check path of kernel if bootlo
# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1279207970 -3600
# Node ID 6fdb00dc93a5d4d8a29b2af52053f3e65b645c93
# Parent bb3b28cb72089d8f07d899b68426f2ff4bd06eac
xm: Do not check path of kernel if bootloader is specified
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>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
tools/python/xen/xm/create.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff -r bb3b28cb7208 -r 6fdb00dc93a5 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Thu Jul 15 16:30:24 2010 +0100
+++ b/tools/python/xen/xm/create.py Thu Jul 15 16:32:50 2010 +0100
@@ -708,7 +708,12 @@ def configure_image(vals):
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 @@ def configure_image(vals):
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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] xm: Do not check path of kernel if bootloader is specified,
Xen patchbot-unstable <=
|
|
|
|
|