summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-02-24 16:53:10 -0800
committerVishvananda Ishaya <vishvananda@gmail.com>2011-02-24 16:53:10 -0800
commit6cd8097642647d34e1f1f9c96a035a1efd96b754 (patch)
tree28282cc09e530870f1117c6b48254112bba4e8dc /plugins
parentfc465b2a9f1c639e44e59c43cbe4d9a9a188f396 (diff)
parentc59109e32678535320a39599cce50fec65689082 (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')