亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

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

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

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

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

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

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 設(shè)置為可執(zhí)行并禁止更改:

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

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

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

個(gè)人感覺 XenServer 6.2 中的 xeconsole 人性化做的還行,但功能的豐富程度尚可提高,因?yàn)槔锩娴木W(wǎng)絡(luò)管理居然沒提供網(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 支持的兩各綁定模式。這兩個(gè)模式是關(guān)于負(fù)載均衡和失效保護(hù)的。balance-slb 為負(fù)載均衡模式(Server Load Balance),即兩塊網(wǎng)卡都工作,active-backup 是失效保護(hù)模式的冗余功能,即綁定的兩塊網(wǎng)卡一主一備份。默認(rèn)是 balance-slb 模式。

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

設(shè)置虛擬機(jī)自啟動(dòng)

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

在XenServer 6.0中,自動(dòng)啟動(dòng)虛擬機(jī)仍然是可以辦到的。這需要在“Pool Level”上開啟自啟動(dòng)功能,并且,在需要自啟動(dòng)的虛擬機(jī)上使用命令行進(jìn)行設(shè)置。

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 設(shè)置 Pool 的自啟動(dòng)

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

3 獲取需要設(shè)置為自啟動(dòng)的虛擬機(jī)的 UUID(以名稱為“W2K08”的虛擬機(jī)為例)

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

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

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

4 設(shè)置虛擬機(jī)的自啟動(dòng)

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

2015-05-30 append:

本地補(bǔ)丁上傳執(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)卡的詳細(xì)內(nèi)容,更多關(guān)于XenServer模擬千兆網(wǎng)卡綁定的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評(píng)論