在这篇文章里介绍了如果运行主机管理在openvswitch之上,而不是单独配置一个物理网卡用于主机管理,并且所有的vm的流量还是通过openvswitch走的。

Running Host Management on Open vSwitch

Open vSwitch (OVS) brings lots of functionality to Linux virtualization hosts, including the ability to use Link Aggregation Control Protocol (LACP) for enhanced network interface card (NIC) failover and redundancy. In this post, I’m going to show you how to run a host management interface on a LACP bundle through OVS. This prevents you from having to give up a physical interface for host management, and allows you to run all traffic through OVS.

First, configure the LACP bundle as I describe in my post on link aggregation and LACP with OVS. You’ll want to ensure that the LACP configuration is working properly before you continue. Remember that you can use ovs-appctl bond/show <bond name> and ovs-appctl lacp/show <bond name> to help troubleshoot the LACP configuration and operation.

Next, create an “internal” interface that Linux will use as a Layer 3 interface. We’ll do this using ovs-vsctl, like this:

ovs-vsctl add-port ovsbr1 mgmt0 -- set interface mgmt0 type=internal

This command adds a port called mgmt0 to the specified bridge (ovsbr1 in this example), and then sets the interface associated with mgmt0 to the type “internal.” I don’t yet know why setting the type to internal is required, only that it’s necessary if you want the interface to be usable by Linux as a Layer 3 interface.

If you need the management traffic on a specific VLAN, then modify the command to specify a particular OVS fake bridge (more here on using fake bridges with VLANs):

ovs-vsctl add-port vlan100br mgmt0 -- set interface mgmt0 type=internal

You can also just assign the VLAN tag directly, although that configuration goes against the OVS port, not the OVS interface:

ovs-vsctl set port mgmt0 tag=100

Once the interface is created, then configure Linux to use that interface as a Layer 3 interface with an IP address assigned. On Ubuntu 12.04 LTS, that means adding a stanza to the /etc/network/interfaces configuration file, like this:

auto mgmt0
iface mgmt0 inet static
address 192.168.254.100
netmask 255.255.255.0
gateway 192.168.254.254
dns-nameservers 192.168.254.101

And that’s it! You can now use the IP address assigned to the mgmt0 interface (or whatever you named it) to manage the Linux virtualization host, all while knowing that you have a bonded LACP configuration protecting you against a network link failure. I’m using this configuration on all my Ubuntu-KVM hosts in my home lab; the physical interfaces are members of LACP bonds.

(Oh, one side note: on Ubuntu, this configuration causes a delay during the boot process. I don’t yet know why this delay occurs, or how to fix it. I’ll post something if I figure it out.)

If you have any questions or thoughts about this configuration, please feel free to speak up in the comments below—all courteous comments are welcome.

(转载)运行主机管理在openvswitch之上的更多相关文章

  1. LNMP服务器虚拟主机管理lnmp

    安装 系统需求: 需要2 GB硬盘剩余空间 安装步骤: 1.使用putty或类似的SSH工具登陆:登陆后运行:screen -S lnmp如果提示screen命令不存在可以执行:yum install ...

  2. Windows 2008 R2 X64 安装WebsitePanel(WSP虚拟主机管理面板)

                   Windows 2008 R2 X64  安装WebsitePanel(WSP2.0虚拟主机管理面板) 估计很多同学都还不知道WebsitePanel是什么东东吧,Web ...

  3. Docker多主机管理(八)--技术流ken

    docker多主机管理 前面我们的实验环境中只有一个 docker host,所有的容器都是运行在这一个 host 上的.但在真正的环境中会有多个 host,容器在这些 host 中启动.运行.停止和 ...

  4. saltstack主机管理项目:主机管理项目架构设计(二)

    1.salt架构图 https://docs.saltstack.com/en/getstarted/system/plugins.html plug-ins(左边):场景可插拔 subsystem- ...

  5. saltstack主机管理项目【day23】:主机管理项目需求分析-设计

    本节内容 一. 主机管理项目需求分析 二 .主机管理项目架构设计 三.主机管理项目初始构建 四. 主机管理项目编主机分发器 一. 主机管理项目需求分析 场景:我现在又一台裸机要实现一下人物 配置管理: ...

  6. Django + Ansible 主机管理(有源码)

    本文给大家介绍如何利用 Django + Ansible 进行 Web 项目管理.   Django介绍 一个可以使 Web 开发工作愉快并且高效的 Web 开发框架,能够以最小的代价构建和维护高质量 ...

  7. Docker多主机管理(八)

    docker多主机管理 前面我们的实验环境中只有一个 docker host,所有的容器都是运行在这一个 host 上的.但在真正的环境中会有多个 host,容器在这些 host 中启动.运行.停止和 ...

  8. python 之路,Day27 - 主机管理+堡垒机系统开发

    python 之路,Day27 - 主机管理+堡垒机系统开发   本节内容 需求讨论 构架设计 表结构设计 程序开发 1.需求讨论 实现对用户的权限管理,能访问哪些机器,在被访问的机器上有哪些权限 实 ...

  9. oracle数据库全然恢复和不全然恢复以及运行用户管理辈分恢复

    比較全然恢复和不全然恢复: 一.全然恢复:将数据库恢复到当前最新状态,包含直至请求恢复时进行的全部已提交的数据更改 二.不全然恢复:将数据库恢复到请求恢复操作之前指定的过去时间点 一.全然恢复过程 以 ...

随机推荐

  1. hdu2248

    纷菲幻剑录 之 十年一剑 Time Limit: 10000/4000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) To ...

  2. LCA + 二分(倍增)

    两个最近的点u和v的最近的公共的祖先称为最近公共祖先(LCA).普通的LCA算法,每算一次LCA的时间复杂度为线性o(n); 这里讲LCA + 二分的方法.首先对于任意的节点v,利用其父节点的信息,可 ...

  3. Oracle & Sun

    2010s January 27, 2010: Oracle acquires Sun Microsystems.

  4. Linux命令行访问网页

    找到个好资料,备份行: http://hi.baidu.com/oyvfhp/blog/item/3aa5ced5b40563d351da4bb0.html   CURL --- 命令行浏览器 这东西 ...

  5. CPU与内存(经典问答)

    原文:http://www.cnblogs.com/xkfz007/archive/2012/10/08/2715163.html 下面是网上看到的一些关于内存和CPU方面的一些很不错的文章. 整理如 ...

  6. copy and Xcopy 复制文件到另一地址

    1. copy不能复制文件夹下的文件,而Xcopy可以. 2. Xcopy不能连接文件,而copy可以连接文件 eg : 将A盘中的A.TXT和B.TXT文件连接起来,连接后的文件名为C.TXT    ...

  7. 【转】adns解析库——域名解析实例(C++、linux)

    转自:http://blog.csdn.net/fty8788/article/details/7480334 adns是一个开源的dns解析库 官方文档:http://www.chiark.gree ...

  8. cdoj 1250 喵哈哈的矩阵 数学题

    喵哈哈的矩阵 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/1250 Desc ...

  9. Hbase深入学习(六) Java操作HBase

    Hbase深入学习(六) ―― Java操作HBase 本文讲述如何用hbase shell命令和hbase java api对hbase服务器进行操作. 先看以下读取一行记录hbase是如何进行工作 ...

  10. 图解JS原型链

    一:任何一个对象都有一个prototype的属性,在js中可以把它记为:__proto__ 当初ECMAscript的发明者为了简化这门语言,同时又保持继承的属性,于是就设计了这个链表.. 在数据结构 ...