XenServer网卡Bonding
在给XenServer配置网卡bonding时,需要在所有节点都添加到集群之后再进行,这也是来自Citrix的建议:“Citrix
recommends never joining
a host that already has a bond configured
on it to a pool”。用XenCenter连接XenServer
集群,通过界面操作对网卡进行bonding是很easy的,而要自动化完成这个功能,可通过调用xe命令去完成,但需要
对一些概念有了解。
对于一个XenServer集群,各个节点看到的逻辑网络应该是一样,否则VM迁移后网络就会出问题。比如原来这个VM
连接的是A网桥,迁移到另外的节点后没有同样的这么一个A网桥,VM就会不知所措。
假设我需要分别对eth0和eth2做bonding,eth1和eth3做bonding,那么首先我要创建两个网络,分别为bond02和
bond13,脚本(这些脚本都只在master节点运行)如下:
bond02_uuid=`xe network-create name-label=bond02`
bond13_uuid=`xe network-create name-label=bond13`
然后获取到集群中所有节点的host uuid:
host_uuids=`xe host-list|grep uuid|awk '{print $5}'`
循环对每个节点做bonding:
for host_uuid in $(echo $host_uuids | awk '{print;}')
do
# 获取到eth0和eth2 的pif uuid
host_eth0_pif=`xe pif-list host-uuid=$host_uuid device=eth0|grep -E '^uuid'|awk '{print $5}'`
host_eth2_pif=`xe pif-list host-uuid=$host_uuid device=eth2|grep -E '^uuid'|awk '{print $5}'`
# 对eth0和eth2做bonding,这里的network-uuid就是上面创建网络bond02后返回的uuid,每个节点都用它
xe bond-create network-uuid=$bond02_uuid pif-uuids=$host_eth0_pif,$host_eth2_pif mode=lacp
# 获取到eth1和eth3 的pif uuid
host_eth1_pif=`xe pif-list host-uuid=$host_uuid device=eth1|grep -E '^uuid'|awk '{print $5}'`
host_eth3_pif=`xe pif-list host-uuid=$host_uuid device=eth3|grep -E '^uuid'|awk '{print $5}'`
# 对eth1和eth3做bonding,这里的network-uuid就是上面创建网络bond13后返回的uuid,每个节点都用它
xe bond-create network-uuid=$bond13_uuid pif-uuids=$host_eth1_pif,$host_eth3_pif mode=lacp
done
“xe bond-create”命令中我指定的mode是lacp,关于这个需要了解的可移步这里。
XenServer网卡Bonding的更多相关文章
- linux下网卡bonding配置(转)
linux下网卡bonding配置 章节 bonding技术 centos7配置bonding centos6配置bonding 一.bonding技术 bonding(绑定)是一种linux系统 ...
- 网卡bonding模式 - bond0、1、4配置
网卡bonding模式 - bond0.1.4配置 网卡bonding简介 网卡绑定就是把多张物理网卡通过软件虚拟成一个虚拟的网卡,配置完毕后,所有的物理网卡的ip和mac将会变成相同的.多网卡同时工 ...
- Linux下的网卡Bonding
1. 网卡Bonding一共有0-6七种mode,具体区别请自行搜索: 2. 建议通过nmtui命令在交互模式下配置,这样不会落下重要的字段,也不用去记忆到底有哪些字段: 3. 我的实验环境是VMWa ...
- linux下网卡bonding配置
linux下网卡bonding配置 章节 bonding技术 centos7配置bonding centos6配置bonding 一.bonding技术 bonding(绑定)是一种linux系统 ...
- 为RAC私有网络配置网卡Bonding
在RAC的安装部署过程中.并不不过简单的安装完毕了事.整个安装过程要考虑可能出现的单点问题,当中比較重要的是私有网络. 私有网络是RAC节点间通信的通道.包含节点间的网络心跳信息.Cache fusi ...
- Linux配置网卡、网卡会话、网卡bonding
配置网卡 1.路径: /etc/sysconfig/network-scripts/ifcfg-eno16777728 2.含义:HWADDR=00:0C:29:9C:D6:4D Mac地址 ...
- 双网卡bonding
网卡:计算机与外界局域网的连接是通过主机箱内插入一块网络接口板(或者是在笔记本电脑中插入一块PCMCIA卡).网络接口板又称为通信适配器或网络适配器(adapter)或网络接口卡NIC(Network ...
- Linux 网卡 bonding配置
网卡 bonding配置 目录 网卡 bonding配置 一.bonding技术 bonding的七种工作模式 总结: 二.Centos7配置bonding 1.关闭和停止NetworkManager ...
- suse 12 双网卡bonding模式
文章目录 工欲善其事,必先配静态ip 网卡bonding eth0 eth1 192.168.70.52 192.168.70.55 工欲善其事,必先配静态ip 重要的事情说三遍 修改配置之前,先备份 ...
随机推荐
- CMDB资源配置管理项目
浅谈ITIL TIL即IT基础架构库(Information Technology Infrastructure Library, ITIL,信息技术基础架构库)由英国政府部门CCTA(Central ...
- 去掉WordPress顶部工具条
WordPress为了方便管理员,或者登陆用户快速的从前台进入后台来管理网站,在WordPress网站顶部强制加入了一个工具条(admin bar),而且默认是对所有登陆用户都显示的,有时候看着挺烦心 ...
- NYOJ 219 An problem about date
An problem about date 时间限制:2000 ms | 内存限制:65535 KB 难度:2 描述 acm的iphxer经常忘记某天是星期几,但是他记那天的具体日期,他希望你 ...
- Flutter 发布APK时进行代码/资源混淆的坑
Flutter 发布APK时进行代码/资源混淆的坑 @author ixenos 1. 关键点 proguard是Java的代码混淆工具,但是当用第三方库的时候,必须要告诉proguard不要检查,因 ...
- Python GUI 之 Treeview 学习
例子1 from tkinter import *import tkinter.ttk as ttk win = Tk()win.title("Treeview 学习") col ...
- BZOJ 3831: [Poi2014]Little Bird【动态规划】
Description In the Byteotian Line Forest there are trees in a row. On top of the first one, there ...
- BZOJ 3747: [POI2015]Kinoman 【线段树】
Description 共有m部电影,编号为1~m,第i部电影的好看值为w[i]. 在n天之中(从1~n编号)每天会放映一部电影,第i天放映的是第f[i]部. 你可以选择l,r(1<=l< ...
- MyBatipse插件
MyBatipse:Eclipse 下的 Mybatis插件 MyBatipse是Eclipse的一个插件,提供了内容提示和Mybatis的配置文件验证功能: 特点 XMLEditor 的增强 代码自 ...
- LA 3263 平面划分
Little Joey invented a scrabble machine that he called Euler, after the great mathematician. In his ...
- Biorhythms(poj 1006)
Description 人生来就有三个生理周期,分别为体力.感情和智力周期,它们的周期长度为23天.28天和33天.每一个周期中有一天是高峰.在高峰这天,人会在相应的方面表现出色.例如,智力周期的高峰 ...