openstack 用nova API 指定 compute node 创建 instance
感谢朋友支持本博客,欢迎共同探讨交流,因为能力和时间有限,错误之处在所难免,欢迎指正!
假设转载,请保留作者信息。
博客地址:http://blog.csdn.net/qq_21398167
原博文地址:http://blog.csdn.net/qq_21398167/article/details/46924597
我们在博客中能够知道 能用命令行定向创建虚拟机到指定计算节点
http://blog.csdn.net/qq_21398167/article/details/46710175
nova boot --image fedora --flavor 1 test1 --availability-zone nova:node-1
为此我想看看是否能通过API 创建这种instance
通过查看 官网中的开源API 能够看到
http://blog.csdn.net/qq_21398167/article/details/46530305
中有这样一个API:
- create(name,image,flavor,meta=None,
files=None, reservation_id=None,min_count=None,max_count=None,security_groups=None,
userdata=None, key_name=None, availability_zone=None,
block_device_mapping=None,block_device_mapping_v2=None,nics=None,scheduler_hints=None,config_drive=None,
disk_config=None,**kwargs) -
Create (boot) a new server.
Parameters: - name – Something to name the server.
- image – The Image to boot with.
- flavor – The Flavor to boot onto.
- meta – A dict of arbitrary key/value metadata to store for thisserver. Both keys and values must be <=255 characters.
- files – A dict of files to overrwrite on the server upon boot.Keys are file names (i.e./etc/passwd) and valuesare the file contents (either as a string or as afile-like object).
A maximum of five entries is allowed,and each file must be 10k or less. - reservation_id – a UUID for the set of servers being requested.
- min_count – (optional extension) The minimum number ofservers to launch.
- max_count – (optional extension) The maximum number ofservers to launch.
- security_groups – A list of security group names
- userdata – user data to pass to be exposed by the metadataserver this can be a file type object as well or astring.
- key_name – (optional extension) name of previously createdkeypair to inject into the instance.
- availability_zone – Name of the availability zone for instanceplacement.
- block_device_mapping – (optional extension) A dict of blockdevice mappings for this server.
- block_device_mapping_v2 – (optional extension) A dict of blockdevice mappings for this server.
- nics – (optional extension) an ordered list of nics to beadded to this server, with information aboutconnected networks, fixed IPs, port etc.
- scheduler_hints – (optional extension) arbitrary key-value pairsspecified by the client to help boot an instance
- config_drive – (optional extension) value for config driveeither boolean, or volume-id
- disk_config – (optional extension) control how the disk ispartitioned when the server is created. possiblevalues are ‘AUTO’ or ‘MANUAL’.
这个API 中有同样參数 --availability-zone
所以直接在使用这个API 的时候将默认參数 None 替换成你想定向的那个计算节点名就Ok了!
openstack 用nova API 指定 compute node 创建 instance的更多相关文章
- 《转》 Openstack Grizzly 指定 compute node 创建 instance
声明:此文档仅仅做学习交流使用,请勿用作其它商业用途 作者:朝阳_tony 邮箱:linzhaolover@gmail.com 2013年6月4日9:37:44 星期二 转载请注明出处:http:// ...
- openstack nova 源码解析 — Nova API 执行过程从(novaclient到Action)
目录 目录 Nova API Nova API 的执行过程 novaclient 将 Commands 转换为标准的HTTP请求 PasteDeploy 将 HTTP 请求路由到具体的 WSGI Ap ...
- [原][openstack-pike][compute node][issue-1]openstack-nova-compute.service holdoff time over, scheduling restart.
在安装pike compute node节点的时候遇到启动nova-compute失败,问题如下(注意红色字体): [root@compute1 nova]# systemctl start ope ...
- Openstack之Nova创建虚机流程分析
前言 Openstack作为一个虚拟机管理平台,核心功能自然是虚拟机的生命周期的管理,而负责虚机管理的模块就是Nova. 本文就是openstack中Nova模块的分析,所以本文重点是以 ...
- Openstack组件部署 — Nova_Install and configure a compute node
目录 目录 前文列表 Prerequisites 先决条件 Install and configure a compute node Install the packages Edit the etc ...
- OpenStack:安装Nova
>安装Nova1. 安装# apt-get install nova-novncproxy novnc nova-api \ nova-ajax-console-proxy nova-cert ...
- OpenStack核心组件-nova计算服务
1. nova介绍 Nova 是 OpenStack 最核心的服务,负责维护和管理云环境的计算资源.OpenStack 作为 IaaS 的云操作系统,虚拟机生命周期管理也就是通过 Nova 来实现的. ...
- openstack核心组件--nova计算服务(3)
一.nova介绍: Nova 是 OpenStack 最核心的服务,负责维护和管理云环境的计算资源.OpenStack 作为 IaaS 的云操作系统,虚拟机生命周期管理也就是通过 Nova ...
- OpenStack组件——Nova计算资源管理
1.nova介绍 Nova 是 OpenStack 最核心的服务,负责维护和管理云环境的计算资源.OpenStack 作为 IaaS 的云操作系统,虚拟机生命周期管理也就是通过 Nova 来实现的. ...
随机推荐
- 采花 flower
采花 flower 题目描述 萧芸斓是 Z 国的公主,平时的一大爱好是采花. 今天天气晴朗,阳光明媚,公主清晨便去了皇宫中新建的花园采花.花园足够大,容纳 了 n 朵花,花有 c 种颜色(用整数 1- ...
- 使用iview如何使左上的添加按钮和右上的搜索框和边框对齐
使用iview如何使左上的添加按钮和右上的搜索框和边框对齐呢? 效果如下: 使用iview自带的Grid 栅格进行布局,但是由于按钮和搜索框的大小不正好是一个栅格的宽度,所以不是很好跳转,且栅格也不支 ...
- HDOJ-1671 Phone List
Phone List Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Probl ...
- config .net webapi to return json.
1.add content negotiator using System; using System.Collections.Generic; using System.Linq; using Sy ...
- java网络编程学习笔记(四):线程池的实现
package QQ; import java.util.LinkedList; /** * Created by hu on 2015/11/9. */ public class ThreadPoo ...
- Qualcomm defconfig
xxx_defconfig - for debugging xxx-perf_defconfig - for final live user's version.
- C#图解教程学习笔记——类相关的概念
一.一些基本概念1. 字段:隶属于类的变量,即类的成员变量.2. 方法:隶属于类的函数,即类的成员函数.3. 实例成员:类的每个实例拥有自己的各个类成员的副本,这些成员称为实例成员. 改变一个实例字段 ...
- 多线程中sleep和wait的区别
前几天去UC笔试,有一道简答题问到了.之前还真一直没留意到这个问题,所以答得也不好. 无论学习什么都好,通过对比学习更有利于发现事物的共性和个性,对于知识点的理解更有明显效果(这也可能是UC笔试题上, ...
- spring整合jedis时所遇问题
@Test public void testSpringJedisPool(){ ApplicationContext ac = new ClassPathXmlApplicationContext( ...
- 注意这几点,轻轻松松配置 Nginx + Tomcat 的集群和负载均衡
Tomcat 集群是当单台服务器达到性能瓶颈,通过横向扩展的方式提高整体系统性能的有效手段.Nginx 是一个高性能的 HTTP 和反向代理 web 服务器,可以通过简单的配置实现 Tomcat 集群 ...