openstack扩展方法

1.虚拟机内部信息相关
在image的properties中增加key,即扩展instance's system metadata
消息体image['properties']
可配置的key为
[root@host ~]# cat /etc/nova/nova.conf |grep non_inheritable_image_properties
#non_inheritable_image_properties=cache_in_nova,bittorrent
\nova\nova\virt\libvirt\driver.py:
目前支持的key有hw_qemu_guest_agent

2.资源相关
flavor的extra_spec增加key
消息体instance_type['extra_specs']
目前支持的key有quota等
quota:cpu_shares
quota:cpu_period
quota:cpu_quota


3.调度相关
SchedulerDriver的filter_properties增加key
消息体filter_properties['scheduler_hints']
/etc/nova/nova.conf:
isolated_hosts
isolated_images
cpu_allocation_ratio=16.0
ram_allocation_ratio=1.5
disk_allocation_ratio=1.0
max_io_ops_per_host=8
max_instances_per_host=50

4.
ComputeDriver的capabilities增加key
目前支持的key有cpu_info

5.派生
新增_api、_rpcapi、_scheduler和_manger
/etc/nova/nova.conf:

compute_api_class=nova.compute.api.API

scheduler_manager=nova.scheduler.manager.SchedulerManager
scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
scheduler_host_manager=nova.scheduler.host_manager.HostManager

compute_manager=nova.compute.manager.ComputeManager

db扩展
db_driver=nova.db

driver扩展
compute_driver=libvirt.LibvirtDriver


抽空学习
http://www.choudan.net/tags.html?#

提交代码参考
http://www.cloudcraft.cn/openstack-code-submit/

rpo安装
http://openstack.redhat.com/QuickStartDevelRelease

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值