openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #14351
Re: Compressed image support ?
Hi Wang,
Horizon simply uses the Python interface to Glance and tells it to create the image. Glance supports creating images from remote locations that are in a compressed format. There are examples in the Glance documentation here: https://github.com/openstack/glance/blob/master/doc/source/glance.rst#examples-of-uploading-different-kinds-of-images and in the Glance binary itself here: https://github.com/openstack/glance/blob/master/bin/glance#L190 So this is widely supported and documented in Glance.
The caveats are that through Horizon, the file MUST be accessible via the network configuration where Glance resides, if it is not accessible due to network configuration or something else, it will fail but seem to have succeeded. Also, you need to make sure you are linking DIRECTLY to the image itself, as if it is a redirect or any other HTTP response besides the file, Glance will still create an image out of it and it will seem to have worked. Sometimes you can even launch said instances that are totally invalid. (During my testing of this I was able to successfully launch instances that were just the HTTP data from 302 redirects.)
I would first confirm that where Horizon is installed is able to communicate to where you are trying to copy the image from, and that the link you are using for the image is, in fact, a valid binary and not some other HTTP response.
John Postlethwait
Nebula, Inc.
On Monday, July 9, 2012 at 1:04 AM, Wang Li wrote:
> hi, all
>
> As to the horizon UI, zip and tar.gz image files are supported.
>
> """
> Specify an image to upload to the Image Service.
>
> Currently only images available via an HTTP URL are supported. The image location must be accessible to the Image Service. Compressed image binaries are supported (.zip and .tar.gz.)
>
> """
>
> My test environment is as follow:
>
> 1. LVM as image backend of vms.
> 2. running vms on Xen in PV mode
>
> But when I upload a tar gzipped raw image file, nova just dd from it to logical volume, thus, nova error logged
>
> "Boot loader didn't return any data!"
>
> I grepped the nova and glance source code, found nothing about of "gz" or "zip" that related to image.
>
> This feature is valuable to our use case, for the raw image file is 4GB, but the compressed version is only 400MB.
>
> Did I misunderstand the compressed image support?
>
>
> Regards.
> Wang Li
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx (mailto:openstack@xxxxxxxxxxxxxxxxxxx)
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
References