最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

XenServer模擬千兆網(wǎng)卡并綁定多張網(wǎng)卡

 更新時間:2022年03月31日 14:50:11   作者:exclm  
這篇文章主要為大家介紹了XenServer模擬千兆網(wǎng)卡并綁定多張網(wǎng)卡的命令使用詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步

XenServer 模擬千兆網(wǎng)卡

這兩天用 XenServer 安裝 VM,其中一臺 VM 是用作無盤測試的 Linux Server,不在主流發(fā)行版之列,無奈 XenServer 日前對非主流的 Linux 支持不是很給力,默認模擬的兩張網(wǎng)上為 Realtek Semiconductor. Co. RTL 8139/8139C,但 VM Linux Server 對這個支持又不好,折騰了半天,VM 中沒有 NIC(Network Interface Cards)。

晚上在這里找到了解決方案:http://www.netservers.co.uk/articles/open-source-howtos/citrix_e1000_gigabit

XenServer 不允許用戶選擇 VM 使用的網(wǎng)上類型,而默認模擬給 VM 用的網(wǎng)上是 RTL 8139 百兆級網(wǎng)上,XenServer 使用 QEMU 模擬客戶機的設備,其中有個隱藏的功能是模擬千兆網(wǎng)卡,可以解決非主流 Linux 發(fā)行版不能半虛擬化(paravirtualization)的性能瓶頸(bottleneck),當然,也能解決我遇到的問題,原文對此問題的解決方式如下:

1. 在 XenServer 中執(zhí)行如下命令:

# mv /usr/lib/xen/bin/qemu-dm /usr/lib/xen/bin/qemu-dm.orig

2. 在 XenServer 中編輯新的 /usr/lib/xen/bin/qemu-dm 如下:

1 #!/bin/bash
2 oldstring=$@
3 newstring=${oldstring//rtl8139/e1000}
4 exec /usr/lib/xen/bin/qemu-dm.orig $newstring

3. 將新的 qemu-dm 設置為可執(zhí)行并禁止更改:

# chmod 755 /usr/lib/xen/bin/qemu-dm
# chattr +i /usr/lib/xen/bin/qemu-dm

注意,chattr 命令使 qemu-dm 不能被更改,這樣在升級時可以會失敗,解決辦法是在升級前執(zhí)行 chattr -i /usr/lib/xen/bin/qemu-dm

XenServer 中綁定多張網(wǎng)卡

個人感覺 XenServer 6.2 中的 xeconsole 人性化做的還行,但功能的豐富程度尚可提高,因為里面的網(wǎng)絡管理居然沒提供網(wǎng)上綁定功能。

找了些資料發(fā)現(xiàn),XenServer 在 bash 中綁定網(wǎng)卡的做法如下:

1 root@xxx # <strong>xe pif-</strong><strong>list</strong>        <strong># 列出物理網(wǎng)卡
</strong> 2 uuid(RO)               : <strong>UUID0
</strong> 3 device(RO)             : eth0
 4 currently-attached(RO) : true
 5 VLAN(RO)               : -1
 6 network-uuid(RO)       : N_UUID0
 7 
 8 uuid(RO)               : <strong>UUID1
</strong> 9 device(RO)             : eth1
10 currently-attached(RO) : true
11 VLAN(RO)               : -1
12 network-uuid(RO)       : N_UUID1
13 root@xxx # <strong>xe network-create name-lable="bond0+1"</strong>   <strong># 創(chuàng)建名為 bond0+1 的網(wǎng)卡
</strong>14 uuuuuuuu-uuuu-uuuu-uuuu-uuuuuuuuuuuu                <strong># 新建網(wǎng)卡的 </strong>UUID_bond
15 root@xxx # <strong>xe bond-create network-uuid=UUID_bond pif-uuids=UUID0,UUID1 [mode=<balance-slb|active-backup>]
</strong>16 root@xxx # <strong>xe network-list</strong>                          <strong># 列出網(wǎng)卡,查看綁定是否生效</strong>

上述的 mode=balance-slb|active-backup 是 XenServer 支持的兩各綁定模式。這兩個模式是關于負載均衡和失效保護的。balance-slb 為負載均衡模式(Server Load Balance),即兩塊網(wǎng)卡都工作,active-backup 是失效保護模式的冗余功能,即綁定的兩塊網(wǎng)卡一主一備份。默認是 balance-slb 模式。

實際上網(wǎng)上綁定可以有 7 種模式,以后有機會可以去了解。

設置虛擬機自啟動

在XenServer的較早前版本(6.0以前)中,啟動XenServer時,可以選擇自動啟動在其中安裝的虛擬機。這個功能在XenServer 6.0中被Citrix取消了,原因是會干擾到XenServer的HA(高可用性)和Failover(故障轉(zhuǎn)移)功能的兼容性。但是,如果只運行一個XenServer,這個功能還是非常好的。

在XenServer 6.0中,自動啟動虛擬機仍然是可以辦到的。這需要在“Pool Level”上開啟自啟動功能,并且,在需要自啟動的虛擬機上使用命令行進行設置。

1 獲取 Pool 的 UUID

root@server# xe pool-list
uuid ( RO)        : <strong>POOL</strong><strong>-</strong><strong>UUID</strong>
name-label ( RW)  : TestPool
name-description ( RW):
master ( RO)      : 74fc086b-8c89-4918-b69e-369fcb19847d
default-SR ( RW)  : bebb142a-d986-acac-d4f4-636de937d28b

2 設置 Pool 的自啟動

root@server# xe pool-param-set uuid=<strong>POOL-UUID</strong> other-config:auto_poweron=true

3 獲取需要設置為自啟動的虛擬機的 UUID(以名稱為“W2K08”的虛擬機為例)

root@server# xe vm-list name-label="W2K08" 
uuid ( RO)        : <strong>VM</strong><strong>-</strong><strong>UUID</strong>
name-label ( RW)  : W2K08
power-state ( RO) : running

如果要得到簡介的結果(即只希望輸出UUD),可以使用如下命令:

root@server# xe vm-list name-label="W2K08" params=uuid --minimal

4 設置虛擬機的自啟動

root@server# xe vm-param-set uuid=<strong>VM-UUID</strong> other-config:auto_poweron=true

2015-05-30 append:

本地補丁上傳執(zhí)行

# xe patch-upload ...
# xe patch-list
# xe patch-apply uuid=... host-uuid=...

使用本地 ISO 作為 Storage Repository (SR)

# xe sr-create type=iso name-label="local isos" device-config:location=/folder-to-isos device-config:legacy_mode=true content-type=iso  # mount iso locally first

以上就是XenServer模擬千兆網(wǎng)卡并綁定多張網(wǎng)卡的詳細內(nèi)容,更多關于XenServer模擬千兆網(wǎng)卡綁定的資料請關注腳本之家其它相關文章!

相關文章

最新評論

庄河市| 邵阳市| 会昌县| 乌鲁木齐县| 舒城县| 黔东| 行唐县| 辽宁省| 新竹市| 海兴县| 西和县| 高台县| 锡林郭勒盟| 阿拉善右旗| 文成县| 荣成市| 万宁市| 黄梅县| 礼泉县| 黄陵县| 福海县| 巴彦县| 镇平县| 当阳市| 姜堰市| 襄垣县| 景东| 荆门市| 松滋市| 张北县| 新和县| 沙田区| 城步| 大庆市| 安塞县| 湘阴县| 屏山县| 木里| 德兴市| 赣州市| 梁河县|