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 来实现的. ...
随机推荐
- Manthan, Codefest 16 B 数学
B. A Trivial Problem time limit per test 2 seconds memory limit per test 256 megabytes input standar ...
- windows server 2008 密码破解
个人是不太喜欢windows 系统的,但有时候没办法 业务已经用在Windows系统上面,今天碰到管理员密码还忘记了的情况,在此记录下 破解密码的过程 1.下载小白菜装机版u盘制作PE启动,详情参考 ...
- redux使用需要注意的地方
1. react和redux没有直接联系,当react需要结合redux使用的时候,需要引入 react-redux ,该插件提供了connet等方法使得react可以注入redux属性. 2. re ...
- hdu 1423 最长上升递增子序列
#include <iostream> #include <cstdio> #include <cstring> using namespace std; ; in ...
- HDU [P3849]
tarjan 求 无向图的割边 (桥) 边 (x,y) 是桥当且仅当, 对于 x 的子节点 y ,low[x] < dfn[y] 对于连向父节点的边要特殊处理 #include <iost ...
- poj 2280 Islands and Bridges 哈密尔顿路 状压dp
题目链接 题意 给定一个\(N\)个点的无向图,求一条哈密尔顿路径\(C_1C_2...C_n\),使其\(value\)最大. \(value\)的计算方式如下:\[\begin{aligned}v ...
- android基本控件学习-----TextView
一.TextView的讲解 <实例一> <?xml version="1.0" encoding="utf-8"?> <Linea ...
- python --- comment
single line comment : multiple line comment :
- guacamole 基本学习使用
基本介绍: Guacamole 是一个基于 HTML 5 和 JavaScript 的 VNC 查看器,服务端基于 Java 的 VNC-to-XML 代理开发.要求浏览器支持HTML5. Apach ...
- 10.1综合强化刷题 Day3 morning
竞赛时间:????年??月??日??:??-??:?? 题目名称 a b c 名称 a b c 输入 a.in b.in c.in 输出 a.out b.out c.out 每个测试点时限 1s 1s ...