﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>IT博客-SA Blog --系统管理员的博客生涯-随笔分类-Cloud</title><link>http://www.cnitblog.com/201/category/8915.html</link><description>书写自己的系统管理博客生涯</description><language>zh-cn</language><lastBuildDate>Tue, 26 Feb 2013 02:03:57 GMT</lastBuildDate><pubDate>Tue, 26 Feb 2013 02:03:57 GMT</pubDate><ttl>60</ttl><item><title>OpenStack云平台的网络模式及其工作机制 </title><link>http://www.cnitblog.com/201/archive/2013/02/26/87007.html</link><dc:creator>David</dc:creator><author>David</author><pubDate>Tue, 26 Feb 2013 01:48:00 GMT</pubDate><guid>http://www.cnitblog.com/201/archive/2013/02/26/87007.html</guid><wfw:comment>http://www.cnitblog.com/201/comments/87007.html</wfw:comment><comments>http://www.cnitblog.com/201/archive/2013/02/26/87007.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/201/comments/commentRss/87007.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/201/services/trackbacks/87007.html</trackback:ping><description><![CDATA[<div><p><span style="font-family:'Microsoft YaHei'; font-size:16px">网络，是OpenStack的部署中最容易出问题的，也是其结构中难以理清的部分。经常收到关于<a href="http://onestack.googlecode.com" target="_blank">OneStack</a>部署网络方面问题和OpenStack网络结构问题的邮件。下面根据自己</span><span style="font-family:'Microsoft YaHei'; font-size:16px">的理解，谈一谈OpenStack的虚拟网络、网络拓扑和网络流。个人理解有限，仅抛砖引玉，有问题请指正，谢谢。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><strong><span style="font-family:'Microsoft YaHei'; font-size:16px">一、相关概念和要点（可跳过）</span></strong></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">1、OpenStack中nova-network的作用</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">OpenStack 平台中有两种类型的物理节点，控制节点和计算节点。控制节点包括网络控制、调度管理、api服务、存储卷管理、数据库管理、身份管理和镜像管理等，计算节 点主要提供nova-compute服务。控制节点的服务可以分开在多个节点，我们把提供nova-network服务的节点称为网络控制器。<br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">OpenStack的网络由nova-network（网络控制器）管理，它会创建虚拟网络，使主机之间以及与外部网络互相访问。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">OpenStack的<span style="text-indent:24px">API</span><span style="text-indent:24px">服务器</span><span style="text-indent:24px">通过消息队列分发nova-network提供的命令，这些命令之后会被nova-network处理，主要的操作有：分配ip地址、配置虚拟网络和通信。</span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="text-indent:24px"><br /> </span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="text-indent:24px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="color:#ff0000">区分以下两个概念：控制节点和网络控制器</span></span><br /> </span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="text-indent:24px"><span style="font-family:'Microsoft YaHei'; font-size:16px">在最简单的情况下，所有服务都部署在一个主机，这就是all-in-one；</span></span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="text-indent:24px"><span style="font-family:'Microsoft YaHei'; font-size:16px">稍微复杂点，除了nova-compute外所有服务都部署在一个主机，这个主机进行各种控制管理，因此也就是控制节点（本文把2个或以上节点的部署都称为&#8220;多节点&#8221;）；</span></span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="text-indent:24px"><span style="font-family:'Microsoft YaHei'; font-size:16px">但是，很多情况下（比如为了高可用性），需要把各种管理服务分别部署在不同主机（比如分别提供数据库集群服务、消息队列、镜像管理、网络控制等）。这个时候网络控制器（运行nova-network）只是控制节点群中的一部分。</span></span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="text-indent:24px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></span></span></p> <p><span style="text-indent:24px"><span style="font-family:'Microsoft YaHei'; font-size:16px">2、<span style="font-family:'Microsoft YaHei'; font-size:16px">OpenStack中network的2种ip、<span style="font-family:'Microsoft YaHei'; font-size:16px">3种管理模式</span></span></span></span></p>  <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">Nova有固定IP和浮动IP的概念。固定IP被分发到创建的实例不再改变，浮动IP是一些可以和实例动态绑定和释放的IP地址。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">Nova支持3种类型的网络，对应3种&#8220;网络管理&#8221;类型：Flat管理模式、FlatDHCP管理模式、VLAN管理模式。默认使用VLAN摸式。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">这3种类型的网络管理模式，可以在一个ОpenStack部署里面共存，可以在不同节点不一样，可以进行多种配置实现高可用性。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">简要介绍这3种管理模式，后面再详细分析。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> </p> <ol><li><span style="font-family:'Microsoft YaHei'; font-size:16px">Flat（扁平）：&nbsp;所有实例桥接到同一个虚拟网络，需要手动设置网桥。</span></li><li><span style="font-family:'Microsoft YaHei'; font-size:16px">FlatDHCP：&nbsp;与Flat（扁平）管理模式类似，这种网络所有实例桥接到同一个虚拟网络，扁平拓扑。不同的是，正如名字的区别，实例的ip提供dhcp获取（nova-network节点提供dhcp服务），而且可以自动帮助建立网桥。</span></li><li><span style="font-family:'Microsoft YaHei'; font-size:16px">VLAN：&nbsp;为每个项目提供受保护的网段（虚拟LAN）。</span></li></ol>  <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>二、3种网络模式的工作机制</strong></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>&#8226;Flat模式</strong></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">1）指定一个子网，规定虚拟机能使用的ip范围，也就是一个ip池（</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> </p> <ul><li><span style="font-family:'Microsoft YaHei'; font-size:16px">分配ip不会超过这个范围，也就是配置里面的fixed_range，比如10.0.0.1/27，那么可用ip就有32个；</span></li><li><span style="font-family:'Microsoft YaHei'; font-size:16px">这个网络是可以改变的，比如配置好节点nova.conf和interfaces后，nova-manage network delete 10.0.0.1/27 1 32；nova-manage network create<span style="font-family:'Microsoft YaHei'; font-size:16px">192.168.1.0/24 1 255</span></span></li></ul>  <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">）；</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">2）创建实例时，<span style="font-family:'Microsoft YaHei'; font-size:16px">从有效ip地址池接取一个IP，</span>为虚拟机实例分配，然后在虚拟机启动时候注入虚拟机镜像（文件系统）；</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">3）必须手动配置好网桥（br100），</span><span style="font-family:'Microsoft YaHei'; font-size:16px">所有的系统实例都是和同一个网桥连接；</span><span style="font-family:'Microsoft YaHei'; font-size:16px">网桥与连到网桥的实例组成一个虚拟网络，nova-network所在的节点作为默认网关。比如flat_interface=eth1;eth1的ip为10.0.0.1，其它网络ip在<span style="font-family:'Microsoft YaHei'; font-size:16px">10.0.0.1/27内。flat  interface--&gt;br100--&gt;flat network</span></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">4）此后，网络控制器（nova-network节点）对虚拟机实例进行NAT转换，实现<span style="font-family:'Microsoft YaHei'; font-size:16px">与外部的通信。</span></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">注意：目前好像配置注入只能够对Linux类型的操作系统实例正常工作，网络配置保存在/etc/network/interfaces文件。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>&#8226;Flat DHCP模式</strong></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">与Flat模式一样，从ip池取出ip分配给虚拟机实例，所有的实例都在计算节点中和一个网桥相关。不过，<span style="font-family:'Microsoft YaHei'; font-size:16px">在这个模式里，控制节点做了更多一些的配置，尝试和以太网设备(默认为eth0)建立网桥，通过dhcp自动为实例分配flat网络的固定ip，可以回收释放ip。</span></span><br /> </span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">1）网络控制器（运行nova-network服务的节点）</span><span style="font-family:'Microsoft YaHei'; font-size:16px">运行dusmasq作为DHCP服务器监听这个网桥；</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">2）实例做一次dhcp discover操作，发送请求；</span><br /> </span></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">3）网络控制器</span></span></span></span><span style="font-family:'Microsoft YaHei'; font-size:16px">把</span><span style="font-family:'Microsoft YaHei'; font-size:16px">从</span><span style="font-family:'Microsoft YaHei'; font-size:16px">一个指定的子网中获得的I</span><span style="font-family:'Microsoft YaHei'; font-size:16px">P地址响应给虚拟机实例；</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">4）实例通过网络控制器与外部实现互相访问。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>&#8226;VLAN网络模式</strong></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">OpenStack的默认网络管理模式，没有设置<span style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono','Lucida Console',monospace; white-space:pre-wrap"><span style="color:#666600">--</span><span style="color:#000000">network_manager</span><span style="color:#666600">=</span><span style="color:#000000">nova</span><span style="color:#666600">.</span><span style="color:#000000">network</span><span style="color:#666600">.</span><span style="color:#000000">manager</span><span style="color:#666600">.</span><span style="color:#660066">FlatDHCPManager或者FlatManager的时候默认为vlan</span></span>。为了实现多台机器的安装，VLAN网络模式需要一个支持VLAN标签(IEEE  802.1Q)的交换机（switch）。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">在这个模式里，为每个项目创建了VLAN和网桥。所有属于某个项目的实例都会连接到同一个VLAN，必要的时候会创建Linux网桥和VLAN。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">每个项目获得一些只能从VLAN内部访问的私有IP地址，即私网网段。每个项目拥有它自己的VLAN，Linux网桥还有子网。被网络管理员所指定的子网都会在需要的时候动态地分配给一个项目。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">1）网络控制器上的DHCP服务器为所有的VLAN所启动，从被分配到项目的子网中获取IP地址并传输到虚拟机实例。<br /> </span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">2）为了实现用户获得项目的实例，访问私网网段，需要创建一个特殊的VPN实例（代码名为cloudpipe，用了创建整数、key和vpn访问实例）。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">3）计算节点为用户生成了证明书和key，使得用户可以访问VPN，同时计算节点自动启动VPN。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">4）vpn访问。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>Flat与vLAN的比较</strong></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">在两种Flat模式里，网络控制器扮演默认网关的角色，实例都被分配了公共的IP地址（扁平式结构，都在一个桥接网络里）。</span></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> </p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> </p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">vLAN模式功</span><span style="font-family:'Microsoft YaHei'; font-size:16px">能丰富，</span><span style="font-family:'Microsoft YaHei'; font-size:16px">很适合提供给企业内部部署使用。但是，需要支持vLAN的switches来连接，而且相对比较复杂，在小范围实验中常采用FlatDHCP模式。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">三、</span><strong><span style="font-family:'Microsoft YaHei'; font-size:16px">详解</span><span style="font-family:'Microsoft YaHei'; font-size:16px">FlatDHCP</span></strong><span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>模式</strong>（Flat模式类似，只是少了dhcp的部分而已，就略过了）</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">可以有多种部署方式，比如为了实现高可用性，可以使用多网卡、外部网关、multi_host 等方法。这里主要介绍基本的部署方式（一个控制节点，或者说一个网络控制器）。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">1、网卡与节点</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">由于网卡和节点数的不同，可以简单分为：单节点（all-in-one）单网卡、</span><span style="font-family:'Microsoft YaHei'; font-size:16px">多节点单网卡、</span><span style="font-family:'Microsoft YaHei'; font-size:16px">多节点单网卡、</span><span style="font-family:'Microsoft YaHei'; font-size:16px">多节点多网卡</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">单节点的情况下，网络控制器（运行nova-network）与计算（运行nova-compute，或者更确切的说，运行虚拟机实例）部署在一个主机。这样就不需要控制节点与计算节点之间的通信，也就少了很多网络概念，这也是入门者常用的方式。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">多节点时，网络控制器与计算节点分别在不同主机，普通部署方式下（不是multi_host），只有nova-network控制网络，而它仅仅在控制节点运行。因此，所有计算节点的实例都需要通过控制节点来与外网通信。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">单网卡时，网卡需要作为public网络的接口使用，也需要作为flat网络的接口，因此需要处于混杂模式。不过建立的网络与双网卡类似，都分为flat网络和public网络。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">使用单网卡，需要在nova.conf中使public_interface和flat_interface都为eth0。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">2、网络流</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">如上面分析，在普通部署方式下，只有一个控制节点（或网络控制器），dhcp和外网访问都需要经过它。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">dhcp时：</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">1）网络控制器（运行nova-network服务的节点）一直</span><span style="font-family:'Microsoft YaHei'; font-size:16px">运行dusmasq作为DHCP服务器监听网桥（br100）；</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">2）实例做一次dhcp discover操作，发送请求；</span><br /> </span></span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">3）网络控制器</span></span></span></span><span style="font-family:'Microsoft YaHei'; font-size:16px">把</span><span style="font-family:'Microsoft YaHei'; font-size:16px">从</span><span style="font-family:'Microsoft YaHei'; font-size:16px">一个指定的子网中获得的I</span><span style="font-family:'Microsoft YaHei'; font-size:16px">P地址响应给虚拟机实例。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">实例访问外网时：</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">1）实例经过所在主机的flat_interface（这是一个flat网络），连接到nova-network所在的主机（控制节点）；</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> <span style="font-family:'Microsoft YaHei'; font-size:16px">2）网络控制器对外出网络流进行转发。</span></p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> 外网访问实例时：</p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> 1）网络控制器对floating ip进行nat；</p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> 2）通过flat网络将流入数据路由给对应的实例。</p> <p style="margin-top:0px; margin-right:auto; margin-bottom:15px; margin-left:auto; padding-top:0px; padding-bottom:0px; border-top-width:0px; border-right-width:0px; border-bottom-width:0px; border-left-width:0px; border-style:initial; border-color:initial"> 下图1、图2可以比较单网卡和双网卡的网络流（traffic）情况，图2、图3可以比较单节点和多节点的网络流。</p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><img src="http://my.csdn.net/uploads/201207/07/1341648628_2648.png" alt="" /><br /> </span></p> <p style="text-align:center"><span style="font-family:'Microsoft YaHei'; font-size:16px">图1：双网卡多节点OpenStack网络流</span></p> <p style="text-align:center"><span style="font-family:'Microsoft YaHei'; font-size:16px"><img src="http://my.csdn.net/uploads/201207/07/1341648622_7142.png" alt="" /><br /> </span></p> <p style="text-align:center"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">图2：单网卡多节点OpenStack网络流</span><br /> </span></p> <p style="text-align:center"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><img src="http://my.csdn.net/uploads/201207/07/1341648616_5248.png" alt="" /><br /> </span></span></p> <p style="text-align:center"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">图3：单网卡单节点OpenStack网络流</span><br /> </span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">3、多节点时控制节点和计算节点的工作原理</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">控制节点：</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">1）在主机上创建一个网桥（br100），把网关ip赋给这个桥；如果已经有ip，会自动把这个ip赋给网桥作为网关，并修复网关；</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">2）建立dhcp server，监听这个网桥；并在数据库记录ip的分配和释放，从而判定虚拟机释放正常关闭dhcp；</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">3）监听到ip请求时，从ip池取出ip，响应这个ip给实例；</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">4）建立iptables规则，限制和开放与外网的通信或与其它服务的访问。</span></p>  <p><span style="font-family:'Microsoft YaHei'; font-size:16px">计算节点：</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">1）在主机上建立一个对应控制节点的网桥（br100），把其上实例（虚拟机）桥接到一个网络（br100所在的网络）；</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">2）此后，这个桥、控制节点的桥和实例的虚拟网卡都在同一虚拟网络，通过控制节点对外访问。</span></p> 可见，这种方式有以下特点： <p><span style="font-family:'Microsoft YaHei'; font-size:16px">1）所有实例与外网通信都经过网络控制器，这也就是SPoF（单故障点）；</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">2）控制节点提供dhcp服务、nat、建立子网，作为虚拟网络的网关；</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">3）计算节点可以没有外网ip，同其上的实例一样，可以把控制节点作为网关对外访问；</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">4）实例与外网通信太多，会造成控制节点网络的堵塞或者高负载。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>四、VLAN模式的特点</strong></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">VLAN模式的目的是为每个项目提供受保护的网段，具有以下特点：</span></p> <ul><li><span style="font-family:'Microsoft YaHei'; font-size:16px">NAT实现public ip</span></li><li><span style="font-family:'Microsoft YaHei'; font-size:16px">除了public NAT外没有其它途径进入每个lan</span></li><li><span style="font-family:'Microsoft YaHei'; font-size:16px">受限的流出网络，project-admin可以控制</span></li><li><span style="font-family:'Microsoft YaHei'; font-size:16px">受限的项目之间的访问，同样project-admin控制</span></li><li><span style="font-family:'Microsoft YaHei'; font-size:16px">所以实例和api的连接通过vpn</span></li></ul> <p>vLAN模式了解较少，借用OpenStack文档里的一个图供对比了解：</p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><img src="http://docs.openstack.org/developer/nova/_images/cloudpipe.png" alt="../_images/cloudpipe.png" width="825" height="455" /><br /> </span></p> <p style="text-align:center"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">图4：VLAN模式OpenStack网络结构</span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>五、网络部署</strong></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">1、网络配置</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">apt-get install bridge-utils</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">安装<span style="font-family:'Microsoft YaHei'; font-size:16px">bridge-utils就是为了建立虚拟网桥，实现虚拟网络。OpenStack会自动的创建br100这个网桥，所以不用自己创建。</span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono','Lucida Console',monospace; font-size:16px; white-space:pre-wrap"><span style="color:#666600">--</span><span style="color:#000000">network_manager</span><span style="color:#666600">=</span><span style="color:#000000">nova</span><span style="color:#666600">.</span><span style="color:#000000">network</span><span style="color:#666600">.</span><span style="color:#000000">manager</span><span style="color:#666600">.</span><span style="color:#660066">FlatDHCPManager</span></span></span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">设置网络管理模式，一般使用FlatDHCP，还可以配合multi_host实现高可用。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"># Network Configuration<br /> --dhcpbridge_flagfile=/etc/nova/nova.conf<br /> --dhcpbridge=/usr/bin/nova-dhcpbridge<br /> --flat_network_bridge=br100<br /> --flat_interface=eth1<br /> --flat_injected=False<br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">--public_interface=eth0<br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">dhcpbridge_flagfile指定配置文件，</span></span></span><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">flat_injected实现ipv6地址的注入，因此关闭。</span></span></span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">flat_network_bridge指定网桥。</span><br /> </span></span></span></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">fla</span><span style="font-family:'Microsoft YaHei'; font-size:16px">t_i</span><span style="font-family:'Microsoft YaHei'; font-size:16px">nterface指定网卡，这个主机节点（一般就是控制节点）用来建立桥，桥接实例和虚拟网络以及public网络。单网卡是设为eth0，与public的同一个。</span></p>   <span style="font-family:'Microsoft YaHei'; font-size:16px">#Block of IP addresses that are fixed IPs<br /> --fixed_range=10.0.0.1/27<br /> </span>  <p><span style="font-family:'Microsoft YaHei'; font-size:16px">指定ip池的范围，文中多次提到的从指定的ip池取出ip分配给实例，就是这个ip池。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><strong>2、OpenStack中网络的高可用性（HA）</strong></span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">在基本的网络管理方式中，所有实例的网络流都要经过网络控制器。当网络控制器出现问题时，网络就出现故障，网络控制器是一个SPoF（单故障点）。《<a href="http://blog.csdn.net/hilyoo/article/details/7704280" target="_blank" style="list-style-type:none; list-style-position:initial; text-decoration:none; word-break:break-all; word-wrap:break-word; color:#3b5998; text-align:left">构建OpenStack的高可用性（HA，High  Availability）</a>》简单介绍了4种方法和未来的Quantum。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">主要的部署方式是FlagDHCP + multi_host：</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">1）、每个计算节点 安装nova-network，设置multi_host为true。这样，每个计算节点上flat_interface作为网桥，提供dhcp、 dns，作为其上所有实例的网关（gateway）。实例不再都从控制节点经过，控制节点出现问题不会影响网络。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">2）、每个计算节点的flat_interface提供switch连接，实现实例之间的虚拟网络的传输和通信。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">3）、每个计算节点有个public_interface，与外网连接。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">4）、为每个实例分配floating ip，作为实例的第二个虚拟ip，与外网通信。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">也就是发生了如下的变化：</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><img src="http://my.csdn.net/uploads/201207/07/1341648633_5324.png" alt="" /><br /> </span></p> <p style="text-align:center"><span style="font-family:'Microsoft YaHei'; font-size:16px"><span style="font-family:'Microsoft YaHei'; font-size:16px">图5：multi_host部署方式时的OpenStack网络流</span><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px">未来的 Quantum和Melarge提供更好的网络服务，值得期待。Quantum项目实现二层网络相关的功能，如创建和管理虚拟网络、端口等。 Melange负责三层网络相关，它的主要任务是IP地址管理（IPAM）、DHCP、NAT甚至负载均衡。不过由于其实现需要一定的时间，需要多个阶 段，现在还是需要了解以上的各种网络模式和部署。</span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><br /> </span></p> <p><span style="font-family:'Microsoft YaHei'; font-size:16px"><a href="http://weibo.com/kayven" target="_blank">Kayven</a></span></p></div><img src ="http://www.cnitblog.com/201/aggbug/87007.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/201/" target="_blank">David</a> 2013-02-26 09:48 <a href="http://www.cnitblog.com/201/archive/2013/02/26/87007.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Installing Rackspace Private Cloud - VMWare ESXi</title><link>http://www.cnitblog.com/201/archive/2013/02/26/87006.html</link><dc:creator>David</dc:creator><author>David</author><pubDate>Tue, 26 Feb 2013 01:46:00 GMT</pubDate><guid>http://www.cnitblog.com/201/archive/2013/02/26/87006.html</guid><wfw:comment>http://www.cnitblog.com/201/comments/87006.html</wfw:comment><comments>http://www.cnitblog.com/201/archive/2013/02/26/87006.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/201/comments/commentRss/87006.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/201/services/trackbacks/87006.html</trackback:ping><description><![CDATA[<p><strong>CAUTION:  Rackspace strongly recommends that you install Rackspace Private Cloud  Software on physical hardware nodes (bare metal) for best results.  Installation on virtual platforms should only be performed for  evaluation purposes.</strong></p> <p>An all-in-one installation is available, in which the controller and  compute components are installed on the same device. However, for best  results, we recommend a minimum of two nodes.</p> <h2><a name="vmwareesxi-install-controller" id="vmwareesxi-install-controller"></a>Installing the Controller</h2> <p>Before you begin, run the following command on each physical ESXi device to enable VM nesting:</p> <pre>$ <code>echo 'vhv.allow = "TRUE"' &gt;&gt; /etc/vmware/config</code> </pre><ol><li>In VMWare ESXi, right-click on your server icon and select <strong>New Virtual Machine</strong>.</li><li>On the Configuration screen, select <strong>Typical</strong>.</li><li>On the Storage screen, select the destination storage for the VM files.</li><li>On the Guest Operating System screen, select <strong>Linux</strong> and <strong>Red Hat Enterprise Linux (64-bit)</strong>.</li><li>On the Network screen, configure one NIC.</li><li>On the Create a Disk screen, specify the virtual disk size and  select thick or thin provisioning. The virtual disk should have at least  20 GB, preferably more.</li><li>Click <strong>Finish</strong>.</li><li>Locate the newly created VM in the navigation bar and select <strong>Edit Settings</strong>.</li><li>In the settings, increase the memory to at least 4 GB and allocate 2 CPUs.</li><li>Select <strong>CD/DVD Drive</strong>, select <strong>Datastore ISO File</strong>, and mount the Rackspace Private Cloud Software ISO. Be sure that the <strong>Connect At Power On</strong> option is selected.</li><li>On the Options tab, change the Guest Operating System to <strong>Other - VMWare ESXi 5.x</strong>.</li><li>Navigate to the Configuration Parameters screen, under Advanced  -&gt; General. On the configuraiton parameters screen, add the following  rows and set the values as follows: <ul><li>vcpu.hotadd = FALSE</li><li>hypervisor.cpuid.v0 = FALSE</li></ul></li><li>Save your changes and power on the virtual machine to launch the ISO.</li><li>After the ISO has launched and loaded, accept the EULA statement.</li><li>Select <code>Controller</code>.</li><li>Enter the NIC address. If you have more than one, you must designate  one as public and one as private. In all-in-one installations, you will  need to enter a public and private NIC.</li><li>When prompted, enter the node IP address, subnet mask, gateway, name  server, and host name. If you do not enter a fully-qualified domain  name for the hostname, you will be prompted to enter a domain name as  well.</li><li>Enter the address for the nova fixed network.</li><li>If you want to configure a DMZ network, enter the DMZ address and the DMZ gateway address.</li><li>Enter a password for the <code>admin</code> user. You will use this admin username and password to access the API and the dashboard.</li><li>For the additional non-admin user, accept the default <code>demo</code>  or enter your own and provide a password at the prompt. This user will  not have admin privileges, but will be able to perform basic OpenStack  functions, such as creating instances from images. Creating the user  will also automatically create a project (also known as a tentant) for  this user.</li><li>Enter the real name, user name, and password for the operating  system user account. For example, the user Jane Doe would enter the  following information: <ul><li>Full name for the new user: <code>Jane Doe</code></li><li>Username for your account: <code>jdoe</code></li><li>Password: <code>mysecurepassword</code></li></ul><p>At this point, it will take approximately 5-10 minutes for the Ubuntu operating system installation to complete.</p> </li><li>If you have a proxy, enter the proxy URL at the prompt in the format <code>http://<em><code>proxy_ip_address</code></em>:<em><code>proxy_ip_port</code></em></code>. If you do not have a proxy, press enter to skip this step and leave the proxy information blank.</li></ol><p>At this point, the installation process will run for  approximately 30 minutes without the need for user intervention. The  device will reboot during the installation process. You will see a  screen with the Rackspace Private Cloud logo, followed by a screen that  displays a progress bar; you can use Ctrl+Alt+F2 to toggle between the  progress bar screen and a Linux TTY screen. You can follow the log  during installation by switching to the correct TTY screen and viewing  the log in <code>/var/log/post-install.log</code>.</p> <p>After the installation is complete, you can view the install log by  logging into the operating system with the username and password that  you configured in Step 22. The log is stored in <code>/var/log/post-install.log</code>.</p> <p><strong>CAUTION</strong>: There is no password recovery system. Please do not forget your admin password.</p> <h2><a name="vmwareesxi-install-compute" id="vmwareesxi-install-compute"></a>Installing the Compute Node</h2> <p>Before you begin, run the following command on each physical ESXi device to enable VM nesting:</p> <pre>$ <code>echo 'vhv.allow = "TRUE"' &gt;&gt; /etc/vmware/config</code> </pre><ol><li>In VMWare ESXi, right-click on your server icon and select <strong>New Virtual Machine</strong>.</li><li>On the Configuration screen, select <strong>Typical</strong>.</li><li>On the Storage screen, select the destination storage for the VM files.</li><li>On the Guest Operating System screen, select <strong>Linux</strong> and <strong>Red Hat Enterprise Linux (64-bit)</strong>.</li><li>On the Network screen, configure one NIC.</li><li>On the Create a Disk screen, specify the virtual disk size and  select thick or thin provisioning. The virtual disk should have at least  20 GB, preferably more.</li><li>Click <strong>Finish</strong>.</li><li>Locate the newly created VM in the navigation bar and select <strong>Edit Settings</strong>.</li><li>In the settings, increase the memory to at least 2 GB and allocate 2 CPUs.</li><li>Select <strong>CD/DVD Drive</strong>, select <strong>Datastore ISO File</strong>, and mount the Rackspace Private Cloud Software ISO. Be sure that the <strong>Connect At Power On</strong> option is selected.</li><li>On the Options tab, change the Guest Operating System to <strong>Other - VMWare ESXi 5.x</strong>.</li><li>Navigate to the Configuration Parameters screen, under Advanced  -&gt; General. On the configuraiton parameters screen, add the following  rows and set the values as follows: <ul><li>vcpu.hotadd = FALSE</li><li>hypervisor.cpuid.v0 = FALSE</li></ul></li><li>Save your changes and power on the virtual machine to launch the ISO.</li><li>After the ISO has launched and loaded, accept the EULA statement.</li><li>Select <code>Compute</code> to install a compute node.</li><li>Enter the NIC address. If you have more than one NIC, designate one  as public and one as private. Be sure that the ordering of the NICs  matches the order that you specified for the controller node.</li><li>When prompted, enter the node IP address, subnet mask, gateway, name  server, and host name. If you do not enter a fully-qualified domain  name for the hostname, you will be prompted to enter a domain name as  well.</li><li>Enter the real name, user name, and password for the operating  system user account. For example, the user Jane Doe would enter the  following information: <ul><li>Full name for the new user: <code>Jane Doe</code></li><li>Username for your account: <code>jdoe</code></li><li>Password: <code>mysecurepassword</code></li></ul><p>At this point, it will take approximately 5-10 minutes for the Ubuntu operating system installation to complete.</p> </li><li>If you have a proxy, enter the proxy URL at the prompt in the format <code>http://<em><code>proxy_ip_address</code></em>:<em><code>proxy_ip_port</code></em></code>. If you do not have a proxy, press enter to skip this step and leave the proxy information blank.</li><li>Enter the IP address for the controller node. This will add the new compute node to the cluster.</li></ol><p>At this point, the installation process will run for  approximately 20 minutes without the need for user intervention. As with  the controller node installation, the device will reboot during the  installation process. You will see a screen with the Rackspace Private  Cloud logo, followed by a screen that displays a progress bar; you can  use Ctrl+Alt+F2 to toggle between the progress bar screen and a Linux  TTY screen. You can follow the log during installation by switching to  the correct TTY screen and viewing the log in <code>/var/log/post-install.log</code>.</p> <p>After the installation is complete, you can view the install log by  logging into the operating system with the username and password that  you configured during the Controller installation. The log is stored in <code>/var/log/post-install.log</code>.</p>         <div>     <br /><br />     <p>&#169; 2011-2013 Rackspace US, Inc.</p>     <p style="font-size:10px;font-style:italic;">Except where otherwise  noted, content on this site is licensed under a Creative Commons  Attribution-NonCommercial-NoDerivs 3.0 Unported License</p>     <img src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png" alt="" /><br />     <a href="http://www.rackspace.com/knowledge_center/legal/">See license specifics and DISCLAIMER</a>   </div>            <div id="comments">     <h2>3 Comments</h2>      <div id="comment-wrapper"><div id="comment-wrapper-23837">  <div comment-by-anonymous=""  clearfix"="">    <div>              <h3><a href="http://www.rackspace.com/knowledge_center/comment/23837#comment-23837" rel="bookmark">Am getting error " Hardware Virtualization is not enabled"</a></h3>     <div field-name-comment-body="" field-type-text-long=""  field-label-hidden"=""><div><div even"="">While  installing "Rackspace Private Cloud Software ISO" in ESXi VM by  following the above steps. I am getting below mentioned issues.<br /> <br /> 1. " $ echo 'vhv.allow = "TRUE"' &gt;&gt; /etc/vmware/config " this command is not executing.<br /> 2. after accepting "EULA" statement on next screen i am getting error saying " Hardware Virtualization is not enabled"<br /> <br /> Please help me to resolve the above issue.</div></div></div>      </div>      <div>     <div>             <div anon-user"="">               </div>           </div>      <div>       By <strong>Nandakumar</strong> on Aug. 24, 2012    </div>          <div>       <ul inline"=""><li first=""  last"=""><a href="http://www.rackspace.com/knowledge_center/ajax_comments/reply/1939/23837"  ajax-processed"="">reply</a></li></ul>    </div>   </div>    </div><div id="comment-wrapper-23902">  <div comment-by-node-author=""  clearfix"="">    <div>                       <h3><a href="http://www.rackspace.com/knowledge_center/comment/23902#comment-23902" rel="bookmark">Hardware Virtualization Not Enabled Error</a></h3>     <div field-name-comment-body="" field-type-text-long=""  field-label-hidden"=""><div><div even"="">Hi. You might want to check on this thread in the Private Cloud Forums:<br /> http://privatecloudforums.rackspace.com/viewtopic.php?f=4&amp;t=13&amp;p=89&amp;hilit=esxi#p89<br /> <br /> Feel free to inquire further in the thread; hope it helps.</div></div></div>      </div>      <div>     <div>             <div auth-user"="">               </div>           </div>      <div>       By <strong>Karin Levenstein</strong> on Aug. 24, 2012    </div>          <div>       <ul inline"=""><li first=""  last"=""><a href="http://www.rackspace.com/knowledge_center/ajax_comments/reply/1939/23902"  ajax-processed"="">reply</a></li></ul>    </div>   </div>    </div></div><div id="comment-wrapper-171416">  <div comment-by-anonymous=""  clearfix"="">    <div>                       <h3><a href="http://www.rackspace.com/knowledge_center/comment/171416#comment-171416" rel="bookmark">Nested rackspace</a></h3>     <div field-name-comment-body="" field-type-text-long=""  field-label-hidden"=""><div><div even"="">Try to check your VM machine has the following lines in the *.vmx file (except following above instructions):<br /> hypervisor.cpuid.v0 = "FALSE"<br /> vcpu.hotadd = "FALSE"<br /> vhv.enable = "true"<br /> <br /> This is pretty much same as running a nested ESXi 5 environment. </div></div></div>      </div>      <div>     <div>             <div anon-user"="">               </div>           </div>      <div>       By <strong>Jerry Li</strong> on Jan. 23, 2013    </div>          <div>       <ul inline"=""><li first=""  last"=""><a href="http://www.rackspace.com/knowledge_center/ajax_comments/reply/1939/171416"  ajax-processed"="">reply</a></li></ul>    </div>   </div>    </div></div></div></div>  </div><img src ="http://www.cnitblog.com/201/aggbug/87006.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/201/" target="_blank">David</a> 2013-02-26 09:46 <a href="http://www.cnitblog.com/201/archive/2013/02/26/87006.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> OpenStack安装部署管理中常见问题解决方法（OpenStack-Lite-FAQ）</title><link>http://www.cnitblog.com/201/archive/2013/02/26/87005.html</link><dc:creator>David</dc:creator><author>David</author><pubDate>Tue, 26 Feb 2013 01:45:00 GMT</pubDate><guid>http://www.cnitblog.com/201/archive/2013/02/26/87005.html</guid><wfw:comment>http://www.cnitblog.com/201/comments/87005.html</wfw:comment><comments>http://www.cnitblog.com/201/archive/2013/02/26/87005.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cnitblog.com/201/comments/commentRss/87005.html</wfw:commentRss><trackback:ping>http://www.cnitblog.com/201/services/trackbacks/87005.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 原文地址：OpenStack安装部署管理中常见问题解决方法（OpenStack-Lite-FAQ） 作者：cywcdwxjf 			                                          			说明：由于本人的OneStack项目和博客上分享的几篇技术文章，收到很多邮件。有些问题是共通的，有些是可以限定范围进行调试的。下面将一些还记得的tips记录下来，供大家参考，希望...&nbsp;&nbsp;<a href='http://www.cnitblog.com/201/archive/2013/02/26/87005.html'>阅读全文</a><img src ="http://www.cnitblog.com/201/aggbug/87005.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnitblog.com/201/" target="_blank">David</a> 2013-02-26 09:45 <a href="http://www.cnitblog.com/201/archive/2013/02/26/87005.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>