Ask Your Question
0

Select Disk format will convert image format?

asked 2017-02-04 01:03:25 -0600

p.bagherpour gravatar image

updated 2017-02-04 02:54:18 -0600

Hi

When create an image which is raw (.img) format, I have an option named Format, If I select disk format as qcow2, it will convert my raw image as qcow2? if not, what is utility of disk format field? I select --Create Image-- in Horizon, select my raw image file, select qcow2 in --Format-- section, after creation, it show me disk format of image is qcow2, I wanna know that means my raw source image convert to Qcow2? I also select --Format-- of my raw image as VMDK and it created. converted? I can use vmdk or AMI as image file, when using KVM as hypervisor?!

Thanks

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-02-04 01:38:04 -0600

The image is not converted. The disk format is used when an instance is launched from the image.

You can create an image from any file (try /etc/passwd) and pretend it has any format. Glance will neither check nor convert the file you provide; it will just create an entry in the image catalog and upload the file to the store. Of course, launching an instance from an image with an incorrect disk format won't work.

edit flag offensive delete link more

Comments

Thanks Bernd Bausch, You want to say disk format is different from image format? I know there are difference between raw and Qcow2 images, I have a raw base image, I select format qcow2 (when uploading image in openstack), in this way I have features of QCOW2 images or raw?

p.bagherpour gravatar imagep.bagherpour ( 2017-02-04 03:47:55 -0600 )edit

In Glance terminology, it's called disk format. There is also the container format, but for most purposes only one container format (bare) is supported. The raw base image is what Nova (not Glance) uses by default when copying the image to the compute node. Config parameter force_raw_images.

Bernd Bausch gravatar imageBernd Bausch ( 2017-02-04 04:27:40 -0600 )edit

So what is format that I see when uploading an image in horizon? that is for what? and if nova use raw by default, it means even if I upload a qcow2 image in my backend I will have a raw cached image in my compute node?

p.bagherpour gravatar imagep.bagherpour ( 2017-02-04 05:32:03 -0600 )edit

The format in the Horizon form is the Glance disk format. When force_raw_images is set, Nova creates a raw image on the compute node. For each instance that uses the same image, it also creates a qcow2 file with the raw image as backing file.

Bernd Bausch gravatar imageBernd Bausch ( 2017-02-04 08:38:20 -0600 )edit

sorry I could not understand, 1.we upload an image with a raw format, 2. then select Disk format qcow2, till now we have a raw or qcow2 image in glance backend? 3.My default Config parameter is force_raw_images, so 1&2 does not matter and Nova creates a raw image on the compute node? So what is 1-2?

p.bagherpour gravatar imagep.bagherpour ( 2017-02-04 23:50:47 -0600 )edit
0

answered 2017-02-04 03:47:05 -0600

p.bagherpour gravatar image

Thanks Bernd Bausch, You want to say disk format is different from image format? I know there are difference between raw and Qcow2 images, I have a raw base image, I select format qcow2 (when uploading image in openstack), image is uploaded and show disk format is qcow2, in this way I have features of QCOW2 images or raw?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-02-04 01:03:25 -0600

Seen: 343 times

Last updated: Feb 04 '17