diff options
| author | Salvatore Orlando <salvatore.orlando@eu.citrix.com> | 2011-02-24 16:25:13 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-02-24 16:25:13 +0000 |
| commit | f5666735d0cd7909b4e7241d923494ab65562f01 (patch) | |
| tree | 6427f5ba2bf3b0fecc7a238e51e0c56f2a7201f3 | |
| parent | 829573b1b629ce8bc0709939dc212563504a5506 (diff) | |
| parent | 7e463d262339acc7c611b86471b1422dea50d1ee (diff) | |
This fix checks whether the boot/guest directory exists on the hypervisor.
If that is not the case, it creates it.
And this time I'm pretty sure I'm not breaking anything with this fix! (see bug 723298)
| -rw-r--r-- | plugins/xenserver/xenapi/etc/xapi.d/plugins/glance | 4 |
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') |
