close

不能否認的,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的設定參數。

Network Adapter Setup

在此 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 3The 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

参见VMware Guest Operating System Installation Guide中的内容可知:
 
vmware workstation的默认网卡是AMD PCNet AM79C970A,可以改变网卡配置,虚拟出Intel(R) PRO/1000和VMware PCI Ethernet Adapter网卡。

在.vmx文件中添加或修改如下语句:
ethernet0.virtualDev = "e1000"

值为"e1000"指定网卡类型为Intel(R) PRO/1000
值为"vlance"指定网卡类型为AMD PCNet AM79C970A(默认为此项)
值为"vmxnet"指定网卡类型为VMware PCI Ethernet Adapter
 
 
下面是VMware Guest Operating System Installation Guide中的一段内容:
The AMD Ethernet card driver included with certain Windows Vista builds—including 4074 and possibly others—does not work correctly or is not included with Windows. To use networking in these Windows Vista guest operating systems, you must change the network adapter. A driver for the vmxnet adapter is included in VMware Tools.
VMware GSX Server: Choose VM > Settings > Network Adapter (Windows) or VM > Settings > NIC (Linux), and select vmxnet as the virtual device to use. Then install VMware Tools. A driver for the vmxnet adapter is included in VMware Tools.
VMware Workstation 4.x or lower, or VMware ACE, on a Windows host: Use a text editor such as Notepad to edit the configuration (.vmx) file for your Windows Vista virtual machine. Add the following line:
Ethernet[n].virtualDev = "vmxnet"
Replace [n] with the number of the Ethernet adapter. The first Ethernet adapter is number 0, so the line for that adapter is
Ethernet0.virtualDev = "vmxnet"
Include a line for each Ethernet adapter configured for the virtual machine. Then install VMware Tools. A driver for the vmxnet adapter is included in VMware Tools.
VMware Workstation 4.x or lower on a Linux host: Choose VM > Settings, select Network Adapter, and then select vmxnet as the virtual device to use. Then install VMware Tools. A driver for the vmxnet adapter is included in VMware Tools.
VMware Workstation 5.0.x: Install VMware Tools. A driver for the network adapter is included in VMware Tools.
VMware Workstation 5.5.x and VMware Server 1.x: Install VMware Tools. A vmxnet driver for the network adapter is included in VMware Tools. Installing VMware Tools automatically switches the network adapter to vmxnet, and installs the vmxnet driver.
Alternatively, you can change the network adapter to e1000 (the Intel® PRO/1000 MT Adapter) before installing Windows Vista. Use a text editor such as Notepad to edit the configuration (.vmx) file for your Windows Vista virtual machine. Add the following line:
Ethernet[n].virtualDev = "e1000"
Replace [n] with the number of the Ethernet adapter. The first Ethernet adapter is number 0, so the line for that adapter is
Ethernet0.virtualDev = "e1000"
Include a line for each Ethernet adapter configured for the virtual machine.
ESX Server 2.x: In the Hardware page, under Network Adapter, click Edit. In the Network Adapter page, in the Device Binding list, select the virtual network device that you want the virtual machine to use. In the Virtual Device list, choose vmxnet. Then install VMware Tools. A driver for the vmxnet adapter is included in VMware Tools.
ESX Server 3.x: Install VMware Tools. A vmxnet driver for the network adapter is included in VMware Tools. Installing VMware Tools automatically switches the network adapter to vmxnet, and installs the vmxnet driver.
Alternatively, you can change the network adapter to e1000 (the Intel® PRO/1000 MT Adapter) before installing Windows Vista. Use a text editor such as Notepad to edit the configuration (.vmx) file for your Windows Vista virtual machine. Add the following line:
Ethernet[n].virtualDev = "e1000"
Replace [n] with the number of the Ethernet adapter. The first Ethernet adapter is number 0, so the line for that adapter is
Ethernet0.virtualDev = "e1000"
Include a line for each Ethernet adapter configured for the virtual machine.


arrow
arrow
    創作者介紹
    創作者 Netzach 的頭像
    Netzach

    有「模」有樣

    Netzach 發表在 痞客邦 留言(0) 人氣()