Running DPDK on VMware Fusion
VirtualBox supports emulated e1000 NIC for VM while VMware fusion does not. VMware Fusion’s VM setting does not support configuring of NIC HW type. The NIC HW is PCnet32 which is not supported by DPDK.
However, we can change NIC HW type by editing VM configuration file directly.
Refer : How to emulate 10 Gbps NIC in a VMware Fusion VM
Edit vmx file to
VMX file is in where vmware image located
For my case, this is where I can find
~/Documents/Virtual Machines.localized/Ubuntu.vmwarevm/Ubuntu.vmx
Note. VMX file is updated when VM is closed. Therefore, changes on this file while VM is running is overwritten by the VM’s current configuration. Be sure to quit VMware Fusion before changing this file.
ethernet3.present = "TRUE"
ethernet3.connectionType = "custom"
ethernet3.wakeOnPcktRcv = "FALSE"
ethernet3.addressType = "static"
ethernet3.vnet = "vmnet2"
ethernet3.address = "00:50:56:2B:EC:A4"
The reference guides to change the virtualDev
string from e1000 to something else(10G for vmxnet3). However, I can not find ethernet3.virtualDev
. So I just add it.
ethernet3.present = "TRUE"
ethernet3.connectionType = "custom"
ethernet3.wakeOnPcktRcv = "FALSE"
ethernet3.addressType = "static"
ethernet3.vnet = "vmnet2"
ethernet3.address = "00:50:56:2B:EC:A4"
ethernet3.virtualDev = "e1000"
After starting VM, I can find VM has e1000 NIC for ethernet3.
Now, eth3 is e1000 NIC.
$ ethtool -i eth3
driver: e1000
version: 7.3.21-k8-NAPI
firmware-version:
bus-info: 0000:02:07.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
vmxnet3 for eth2
Once more, convert eth2 to vmxnet3
ethernet2.present = "TRUE"
ethernet2.connectionType = "bridged"
ethernet2.wakeOnPcktRcv = "FALSE"
ethernet2.addressType = "generated"
ethernet2.linkStatePropagation.enable = "TRUE"
ethernet2.pciSlotNumber = "160"
ethernet2.generatedAddress = "00:0c:29:52:14:e3"
ethernet2.generatedAddressOffset = "20"
ethernet2.virtualDev = "vmxnet3"
And, it works too.
$ ethtool -i eth2
driver: vmxnet3
version: 1.2.0.0-k-NAPI
firmware-version:
bus-info: 0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
Note. ’e1000e’ is also supported.
ethernet3.virtualDev = "e1000e"
e1000 and e1000e are emulated device each for 1 Gbit Intel 82545EM card and 1 Gbit Intel 82574. e1000e is a newer one. Reference
$ ethtool -i eth3
driver: e1000e
Build DPDK
The most easy way to build DPDK is using setup.sh
$ source tools/setup.sh
Option: 10
================== Installing x86_64-native-linuxapp-gcc
Configuration done
== Build lib
...
Build complete [x86_64-native-linuxapp-gcc]
------------------------------------------------------------------------------
RTE_TARGET exported as x86_64-native-linuxapp-gcc
Three important environments.
RTE_ARCH=x86_64
RTE_SDK=/home/cychong/dpdk-2.1.0
RTE_TARGET=x86_64-native-linuxapp-gcc