Ask Your Question
0

Confused about boot from image (create new volume) and root disk size

asked 2014-02-04 03:34:06 -0600

dtaylor gravatar image

updated 2014-02-05 03:46:47 -0600

I am a bit confused about the various boot options for instances disks in OpenStack. Currently I have a number of CentOS templates stored as images in Glance, and so far I have been creating new instances, and selecting 'Boot from image (create new volume)'. This lets me specify the volume size. My first boot scripts are able to resize the root partition with no problems. However, I am confused about the root disk size value in the instance flavor.

If I boot directly from the image, will this create a new image file at the root disk size? Will this use the existing image in Glance? I do not want to modify the Glance image, but keep it in its current state as a VM template. Maybe I am confused as to what the best-practices are for instance templates, and creating new VMs. If anyone can explain this to me I would appreciate it.

UPDATE:

Thanks for the answer Bill. What you said makes sense. I guess my main concern is the best method for setting up images for consumption in a production cloud-provider environment (boot from image, vs boot from image (new volume), vs boot from volume snapshot (new volume)). If I boot from an image/or volume (without creating a new volume), that will make any changes to the image persistent (which I obviously don't want in the case of using a number of templates). However, if I boot from an image and create a new volume, it looks like the flavor disk size is completely ignored in favor of the disk size property which you can manually specify.

I haven't tried booting from a volume snapshot yet (maybe that is different, but I will try that next).

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-02-04 11:55:16 -0600

Answers to your questions:

I am confused about the root disk size value in the instance flavor? Check this link for how this works. https://wiki.openstack.org/wiki/VariableSizeRootDisk

If I boot directly from the image, will this create a new image file at the root disk size? Will this use the existing image in Glance?

Yes - The image will be downloaded from Glance and put in onto the hypervisor node and booted into an instance you asked for. Once the instance is running you can update packages, install applications, and then take a snapshot of it and put it back in Glance so you can launch and boot it again as a clone of what you build. So to answer your question you can do this instance template idea two ways, either with a Golden Image you build and upload to glance for consumption, or by Cloning or snapshotting something that was build in the cloud and then bring it back into glance as an image (thru the snapshot process) then can be re-launched. You also have 2 options for images, public and protected, anything that is Golden should be protected so no one can delete it, and its probably public as well for general consumption of other Projects or Tenants. You can use Private for single tenant use, testing, development that sort of thing, until its ready to be consumed by all the users.

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: 2014-02-04 03:34:06 -0600

Seen: 6,363 times

Last updated: Feb 05 '14