Openstack-API之CreateServer中diskConfig参数

小记一下,以免日后忘记:

在创建虚机时,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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值