xenapi: Use supported interfaces for image upload/download
Use supported interfaces for image upload / download to/from XenAPI compute nodes.
At the moment XenServer is using tarballs of vhd chains as images, and using a dom0 plugin to download/upload them.
This is a non-supported way, and using non-supported tools. This blueprint is about to come up with an image upload/download method through a supported interface.
Blueprint information
- Status:
- Complete
- Approver:
- Russell Bryant
- Priority:
- Low
- Drafter:
- Mate Lakat
- Direction:
- Approved
- Assignee:
- Mate Lakat
- Definition:
- Approved
- Series goal:
- Accepted for havana
- Implementation:
- Implemented
- Milestone target:
- 2013.2
- Started by
- Russell Bryant
- Completed by
- Russell Bryant
Related branches
Related bugs
Sprints
Whiteboard
Can we be clear about the required steps to create an "supported" import mechanism? Glance is planning to do image conversion, so you could assume a raw image is available from glance, rather than doing the conversion on the DomU -- johngarbutt
The proposed solution is:
Glance images are raw disk image files inside a tar.gz. This is how we get sparse format, and "metadata" information. We are expecting only one raw disk image file per glance image.
Download - import an image to the hypervisor:
- Look at the beginning of the image, and get hold of the size of the raw file
- Create a VDI with a size retrieved in the previous step
- Attach the VDI to domU, and unpack the raw disk image to the vdi
Upload - upload an image to glance:
- Attach the VDI
- On-line compress its contents and stream it to glance.
Gerrit topic: https:/
Addressed by: https:/
xenapi: refactor - extract get_stream_
Addressed by: https:/
xenapi: refactor - extract get_virtual_size
Addressed by: https:/
xenapi: ovf - virtual size retrieved from stream
Addressed by: https:/
xenapi: ovf - decompress image stream
Addressed by: https:/
xenapi: test functions for _stream_disk
Image upload is implemented here:
https:/
All code submitted, waiting for review.
Addressed by: https:/
xenapi: refactor - extract image_utils
Work Items
Work items:
Implement image download: INPROGRESS
Implement image upload: INPROGRESS