zoukankan      html  css  js  c++  java
  • 《转》 Openstack Grizzly 指定 compute node 创建 instance

    声明:此文档仅仅做学习交流使用,请勿用作其它商业用途

    作者:朝阳_tony

    邮箱:linzhaolover@gmail.com

    2013年6月4日9:37:44 星期二

    转载请注明出处:http://blog.csdn.net/linzhaolove



    有时我们有几个 compute node 。openstack默认是进行平衡创建,但有是我们想将某个instance 特定创建在某个compute node ,我们该如何做呢?


    1、查看挂接的节点

    查看一下我们挂接了哪些compute node,如我已经成功挂接了node-1;node-0是我的controller节点,也是我的计算节点;

    # nova-manage service list
    Binary           Host                                 Zone             Status     State Updated_At
    nova-conductor    node-0                         internal         enabled    :-)   2013-06-04 01:19:01
    nova-console      node-0                         internal         enabled    :-)   2013-06-04 01:19:00
    nova-consoleauth  node-0                         internal         enabled    :-)   2013-06-04 01:19:00
    nova-scheduler    node-0                         internal         enabled    :-)   2013-06-04 01:19:03
    nova-cert         node-0                         internal         enabled    :-)   2013-06-04 01:19:00
    nova-compute      node-0                         nova             enabled    :-)   2013-06-04 01:18:55
    nova-compute      node-1                          nova             enabled     :-)   2013-05-28 03:31:39


    2、查看有哪些image


    # nova image-list
    +--------------------------------------+--------------+--------+--------+
    | ID                                   | Name         | Status | Server |
    +--------------------------------------+--------------+--------+--------+
    | fe64ff58-5a0d-48e0-972d-0f8455d28f1e | fedora       | ACTIVE |        |
    +--------------------------------------+--------------+--------+--------+

    我有一个fedora 17 的image。是在网上下载的;

    3、指定compute node 创建instance

    $> nova help boot 

    採用上面命令。我们发现有这样 --availability-zone <availability-zone>             The availability zone for instance placement. 一个參数我们通过它,就能够知道compute node;


    比如:

    $>  nova boot --image fedora  --flavor 1  test1  --availability-zone nova:node-1

    我们将fedora这个image 创建级别为flavor 1  , 名字为 test1    创建到node-1 这个计算节点上;


    4、验证一下实际启动在哪

    # nova show fd1
    +-------------------------------------+----------------------------------------------------------+
    | Property                            | Value                                                    |
    +-------------------------------------+----------------------------------------------------------+
    | status                              | ACTIVE                                                   |
    | updated                             | 2013-06-03T12:20:45Z                                     |
    | OS-EXT-STS:task_state               | None                                                     |
    | OS-EXT-SRV-ATTR:host                | node-1                                             |


    我已经成功创建在node-1了;



  • 相关阅读:
    ruby直接底层连接数据库
    debian和ubuntu的sh dash bash
    find locate
    apt-get
    ERROR: The partition with /var/lib/mysql is too full! failed!
    linux访问ftp服务器命令
    win7配置ftp服务器
    黑马程序员_Java基础视频-深入浅出精华版--PPT 文件列表
    黑马程序员_Java基础视频-深入浅出精华版--视频列表
    转:Java项目开发规范参考
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/5123189.html
Copyright © 2011-2022 走看看