您的位置:首页 > 运维架构

Openstack-API之CreateServer中diskConfig参数

2014-07-15 14:35 302 查看
小记一下,以免日后忘记:

在创建虚机时,diskConfig(Optional)参数是可选项,并且值只能是“AUTO” or “MANUAL”,默认是AUTO分一个区;

AUTO:

表示创建虚机时自动分成一个区,且分区的大小跟flavor提供的disk大小一样;

MANUAL:

表示创建虚机时,自动分一个10G大小的分区,再按照flavor的disk大小,剩下的磁盘空间为未分区状态。

注:通过虚机创建的镜像快照,也带有此diskConfig属性。

不过通过MANUAL方式创建,进入虚机查看时,并不是按上文说的那样分配的,而且跟自动分区没什么区别


此处验证没有成功,也可能是自己的原因,这里就不上图了


也希望有大神能出来指点一下


----------------------------------------------------------------------------------------------------------------------------------------------------

引用ops的官方说法:

When a server is created from an image with the diskConfig value set to AUTO,

the server will be built with a single partition which is expanded to the size of the flavor selected.

When the attribute is set to MANUAL the server will be created with a 10 gigabyte partition

and the remaining disk space allocated to the flavor will remain unpartitioned.

A server inherits the diskConfig attribute from the image from which it is created.



Note, that images also inherit the diskConfig from a server.

So, if an image is created from the server it will also have a diskConfig value of MANUAL.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐