summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>2011-01-11 01:50:14 +0000
committerSalvatore Orlando <salvatore.orlando@eu.citrix.com>2011-01-11 01:50:14 +0000
commit6ba35582eec774253d725ab7a6959fdc12cea215 (patch)
tree0a37f27dc9b3654c0d274d359cbe205922ea3b21 /plugins
parent97ff39bd1d83f3cfa412f291087e025a91d147cd (diff)
Now removing kernel/ramdisk VDI after copy
Code tested with PV and HVM guests Fixed pep8 errors Could not run tests - test environment broken on dev machine
Diffstat (limited to 'plugins')
-rw-r--r--plugins/xenserver/xenapi/etc/xapi.d/plugins/glance3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
index 7f0b375e1..97cf32dcf 100644
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
@@ -18,7 +18,7 @@
# under the License.
#
-# XenAPI plugin for putting images into glance
+# XenAPI plugin for managing glance images
#
import base64
@@ -62,6 +62,7 @@ def _copy_kernel_vdi(dest,copy_args):
#read data from /dev/ and write into a file on /boot/guest
of=open(filename,'wb')
f=open(dest,'rb')
+ #copy only vdi_size bytes
data=f.read(vdi_size)
of.write(data)
f.close()