summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-02-25 13:02:12 -0800
committerVishvananda Ishaya <vishvananda@gmail.com>2011-02-25 13:02:12 -0800
commit2439182bc2e91b1de460f72a8c73b651b551265d (patch)
tree271f925befd58a11ee88ba5fd66b980a6b2dacac /plugins
parentcc8276655cd2424b71689776f24e2a5cc767e844 (diff)
parent8b37ae8c291a38407654859d7ff659ced92c0270 (diff)
merged trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/xenserver/xenapi/etc/xapi.d/plugins/glance4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
index 8cb439259..61b947c25 100644
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
@@ -73,6 +73,10 @@ def _copy_kernel_vdi(dest, copy_args):
logging.debug("copying kernel/ramdisk file from %s to /boot/guest/%s",
dest, vdi_uuid)
filename = KERNEL_DIR + '/' + vdi_uuid
+ #make sure KERNEL_DIR exists, otherwise create it
+ if not os.path.isdir(KERNEL_DIR):
+ logging.debug("Creating directory %s", KERNEL_DIR)
+ os.makedirs(KERNEL_DIR)
#read data from /dev/ and write into a file on /boot/guest
of = open(filename, 'wb')
f = open(dest, 'rb')