不能否認的,VMware的各項基礎建設都有一定程度的細節存在,也因為太多細節,所以被搞的頭暈腦脹的。
無論是ESX Server、VMware vSphere 或者 VMware View都必須依附於Network上。
所以Network的設定,變得非常的重要,只要有一個環節出了錯,很多資料或者是錯誤訊息,都會不停的冒出來。
最近就因為Route、L3 Switch、L2 Switch的串連及封包丟送方式,搞到連DNS都查不到....Orz
-------------------------------------
一開始在建立Virtual Machine的時候,並不會注意Network的設定,畢竟Heartbeat能夠順利啟動,運作正常就可以了,並不會注意到那麼多小細節。
直到最近在建立公司另外一個新廠的時候,架設Virtual Machine為了找出一些故障原因,才了解到Network Adapter的設定參數。
我將Network Adapter的設定分成兩個設定方式
(1)尚未建立Virtual Machine的時候
(2)已經建立Virtual Machine後
-------------尚未建立Virtual Machine-----------
如果還沒建立Virtual Machine時,可以在設定畫面看到Network Adapter的設定參數。
在此 Adapter裡有三個選項。分別是:
E1000 - An emulated version of the Intel 82545EM Gigabit Ethernet NIC. A driver for this NIC is not included with all guest operating systems. Typically Linux versions 2.4.19 and later, Windows XP Professional x64 Edition and later, and Windows Server 2003 (32-bit) and later include the E1000 driver.
VMXNET 2 (Enhanced) - The VMXNET 2 adapter is based on the VMXNET adapter but provides some high-performance features commonly used on modern networks, such as jumbo frames and hardware offloads. This virtual network adapter is available only for some guest operating systems on ESX/ESXi 3.5 and later.
VMXNET 2 is supported only for a limited set of guest operating systems:
- 32- and 64-bit versions of Microsoft Windows 2003 (Enterprise, Datacenter, and Standard Editions).
Note: You can use enhanced VMXNET adapters with other versions of the Microsoft Windows 2003 operating system, but a workaround is required to enable the option in VMware Infrastructure (VI) Client or vSphere Client. See Enabling enhanced vmxnet adapters for Microsoft Windows Server 2003 (1007195) if Enhanced VMXNET is not offered as an option. - 32-bit version of Microsoft Windows XP Professional
- 32- and 64-bit versions of Red Hat Enterprise Linux 5.0
- 32- and 64-bit versions of SUSE Linux Enterprise Server 10
- 64-bit versions of Red Hat Enterprise Linux 4.0
- 64-bit versions of Ubuntu Linux
VMXNET 3 - The VMXNET 3 adapter is the next generation of a paravirtualized NIC designed for performance, and is not related to VMXNET or VMXNET 2. It offers all the features available in VMXNET 2, and adds several new features like multiqueue support (also known as Receive Side Scaling in Windows), IPv6 offloads, and MSI/MSI-X interrupt delivery.
VMXNET 3 is supported only for virtual machines version 7 and later, with a limited set of guest operating systems:
- 32- and 64-bit versions of Microsoft Windows XP,7, 2003, 2003 R2, 2008, and 2008 R2
- 32- and 64-bit versions of Red Hat Enterprise Linux 5.0 and later
- 32- and 64-bit versions of SUSE Linux Enterprise Server 10 and later
- 32- and 64-bit versions of Asianux 3 and later
- 32- and 64-bit versions of Debian 4
- 32- and 64-bit versions of Ubuntu 7.04 and later
- 32- and 64-bit versions of Sun Solaris 10 U4 and later
附註: 以下資訊轉載自「不自量力 の Weithenn: VMware 虛擬化技術實務問答 (上)」
E1000 網卡為模擬 Intel e1000 的網卡驅動程式,通常虛擬主機在未安裝 VMware Tools 情況下時才會採用此網卡,建議應該為虛擬主機安裝 VMware Tools 並採用 VMware 第三代 vmxnet3 網卡才比較好,下列表格舉例 E1000 網卡及 vmxnet3 在進階網路功能上的支援程度。
功能 / 網卡 | E1000 | vmxnet3 |
IPv4 TSO (TCP Segmentation Offloading) | 支援 | 支援 |
IPv6 TSO (TCP Segmentation Offloading) | - | 支援 |
Jumbo Frames | - | 支援 |
Large TX/RX Ring Sizes | 支援 | 支援 |
RSS (Receive Side Scaling) | - | 支援 |
MSI/MSI-X | - | 支援 |
事實上,安裝好虛擬主機後首要應該就是安裝 VMware Tools 才是,除了可以使用 vmxnet3 及進階網路功能之外,許多人對於 VMware Tools 有些功能上的誤解,常常認為安裝 VMware Tools 不過就是使虛擬主機的滑鼠不會被咬住或者是虛擬主機與虛擬化平台進行時間校對而以,這樣只能說小看了 VMware Tools 的功用了。
當虛擬主機安裝 VMware Tools 之後,會提供許多進階功能使得虛擬化平台在調校硬體資源給虛擬主機時能夠更緊密的結合,以下列舉部份 VMware Tools 所提供的進階功能:
- 虛擬裝置驅動 (Device Drivers): 提供給虛擬主機週邊裝置最佳化後的驅動程式,如 SVGA Display Driver。
- 虛擬主機心跳偵測 (Virtual Machine Heartbeat): 若有導入 VMware HA 進階功能時,vCenter Server 就是藉由 VMware Tools 來偵測虛擬主機的心跳 (Heartbeat) 是否正確運作,以便判斷是否該將虛擬主機移轉至其它台 ESX/ESXi Host。
- 提升滑鼠效能 (Improved Mouse): 在 VM Console 操作虛擬主機時,滑鼠移動時很順暢 (不會卡卡的) 並且不須從 VM Console 中使用組合鍵手動釋放滑鼠指標。
- 記憶體管理 (Memory Management): ESX/ESXi Host 對於運作於其上的虛擬主機其記憶體管理機制,例如 Memory Ballooning 機制的觸發也是要靠 VMware Tools 來進行,以便實體機 Host 記憶體不足時,虛擬主機能依靠 Memory Ballooning 機制自行建立 Page File 或 SWAP 以便撐過硬體資源不足的過渡期。
- 檔案系統暫停 (Quiescing a Guest File System): ESX/ESXi Host 藉由此機制來為虛擬主機建立快照 (Snapshot)。
- 時間同步校對 (Time Synchronization): 可以直接讓虛擬主機與 ESX/ESXi Host 進行系統時間同步校對,若虛擬主機為 Windows 網域成員會與 Windows AD 伺服器進行同步校對的話,則建議擇其一即可。
- 正常關機 (Gracefully Shutdown): 當按下 VM Console 的關機按鈕 (紅色四方形圖示),則虛擬主機會執行正常程序進行關機。
-------------已經建立Virtual Machine後-----------
「修改前請務必關閉Virtual Machine」
如果已經建立了Virtual Machine,並且已經安裝VMware Tools。
若要修改網卡的設定,除了Edit新增Network Adapter外,若要修改原始的網卡,則必須進入vm config file修改參數。
步驟如下:(轉載自「Malaysia VMware Communities」)
1. Login to VMware ESX server
2. Type vmware-cmd -l and look for virtual machine (vmx = vm config file) which require change virtual network adapter
3. You may check VMware KB Article: 1001805 for available network adapters details.
4. Edit Virtual Machine vmx file and choose virtual network adapter as show below:
Flexible
Nothing have to add into vmx file.
Intel E1000
ethernetX.virtualDev = “e1000″
VMXNET 2 (Enhanced)
ethernetX.virtualDev = “vmxnet”
VMXNET 3
ethernetX.virtualDev = “vmxnet3″
Note: ethernetX = number of ethernet card.
5. Save the VMX file and power on your virtual machine.
6. Power on your virtual machine using virtual center or type # vmware-cmd your_virtualmachine.vmx start
-----------------WorkStation修改方式---------------
「修改前請務必關閉Virtual Machine」
轉載自「 “GONE WITH THE WIND” 博客,出处http://h2appy.blog.51cto.com/609721/121274」
在.vmx文件中添加或修改如下语句:
ethernet0.virtualDev = "e1000"
值为"e1000"指定网卡类型为Intel(R) PRO/1000
值为"vlance"指定网卡类型为AMD PCNet AM79C970A(默认为此项)
留言列表