summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorNaveed Massjouni <naveedm9@gmail.com>2011-02-28 12:03:07 -0500
committerNaveed Massjouni <naveedm9@gmail.com>2011-02-28 12:03:07 -0500
commitf61718cc1f9dd9c65d389de8dfc3ca4dd54f8436 (patch)
treeafe78923410e9d039e54e2705f6c7514377a2163 /plugins
parenta55fefdd78ac984b366c8e1701cbbd8f5ad18e97 (diff)
parentedf5da85648659b1a7ad105248d69ef9f8c977e4 (diff)
Merging trunk to my branch. Fixed a conflict in servers.py.
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')