VMware

VMware ESX Server 2.0

Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Configuring Your Server to Use VMkernel Device Modules

Configuring Your Server to Use VMkernel Device Modules

Loading VMkernel Device Modules

Loading VMkernel Device Modules

The installation process should detect the devices that are assigned to the VMkernel and automatically load appropriate modules into the VMkernel to make use of these devices.

However, there may be situations in which you wish to load VMkernel device modules explicitly. Modules supported in this release are located in
/usr/lib/vmware/vmkmod
. The command vmkload_mod(1) loads VMkernel modules.

VMkernel Module Loader

VMkernel Module Loader

The program vmkload_mod is used to load device driver and network shaper modules into the VMkernel. vmkload_mod can also be used to unload a module, list the loaded modules and list the available parameters for each module.

The format for the command is

vmkload_mod <options> <module-binary> <module-tag> <parameters>

where <module-binary> is the name of the module binary that is being loaded. <module-tag> is the name that the VMkernel associates with the loaded module. The tag can be any string of letters and numbers. If the module is a device driver, the VMkernel names the module with the <module-tag> plus a number starting from zero. If there are multiple device instances created by loading the module or multiple device driver modules loaded with the same tag, each device gets a unique number based on the order in which device instances are created.

The <module-binary> and <module-tag> parts of the command line are required when a module is loaded and are ignored when the --unload, --list and --showparam options are used. The <parameters> part of the command line is optional and is used only when a module is being loaded.

Options

Options

-l
--list
List out the current modules loaded. If the -l option is given, other arguments on the command line are ignored.

-u <module-binary>
--unload <module-binary>
Unload the module named <module-binary>.

-v
--verbose
Be verbose during the module loading.

-d <scsi-device-name>
--device <scsi-device-name>
The module being loaded is for a SCSI adapter that is currently being used by the service console. After the module is loaded the SCSI adapter is controlled by the VMkernel but the service console continues to be able to access all SCSI devices. The format of <scsi-device-name> is
<PCI-Bus>:<PCI-slot>.

-e
--exportsym
Export all global exported symbols from this module. This allows other modules to use exported functions and variables from the loaded module. This option should not be used for normal device driver and shaper modules since there may be symbol conflicts.

-s
--showparam
List all available module parameters that can be specified in the <parameter> section of the command line.

Parameters

Parameters

Modules can specify parameters that can be set on the command line. A list of these parameters is shown via the --showparam option. In order to set one of these parameters, you must specify a name-value pair at the end of the command line. The syntax is of the form <name>=<value>. Any number of parameters can be specified.

Examples

Examples

vmkload_mod ~/modules/e100.o vmnic debug=5
loads the module ~/modules/e100.o into the VMkernel. The tag for this module is vmnic. Each EEPro card that was assigned to the VMkernel is given the name vmnic<#>, where <#> starts at 0. For example, if there are two EEPro cards assigned to the VMkernel, they have VMkernel names of vmnic0 and vmnic1. The module parameter debug is set to the value 5.

vmkload_mod --device 0:12 ~/modules/aic7xxx.o vmhba
loads the module ~/modules/aic7xxx.o into the VMkernel. The tag for this module is vmhba. The Adaptec SCSI adapter is currently being used by the service console. The SCSI adapter is located on PCI bus 0, slot 12.

vmkload_mod --exportsym ~/modules/vmklinux linuxdrivers
loads the module ~/modules/vmklinux into the VMkernel. All exported symbols from this module are available to other modules that are subsequently loaded. The vmklinux module is the module that allows Linux device drivers to run in the VMkernel so it is one of the few modules for which the --exportsym option makes sense.

Here are several examples of command lines that load various modules:

Preparing to Load Modules

Preparing to Load Modules

vmkload_mod -e /usr/lib/vmware/vmkmod/vmklinux linux

This command must be given before you load other device modules. It loads common code that allows the VMkernel to make use of modules derived from Linux device drivers to manage its high-performance devices. The -e option is required so that the vmklinux module exports its symbols, making them available for use by other modules.

Loading Modules

Loading Modules

vmkload_mod /usr/lib/vmware/vmkmod/e100.o vmnic
vmkload_mod /usr/lib/vmware/vmkmod/aic7xxx.o vmhba

The first of these commands loads a module to control the EEPro Ethernet device(s) reserved for the VMkernel. The second loads a module to control the Adaptec SCSI device(s). The last argument supplied (vmnic and vmhba in the above examples) determines the base name that VMware uses to refer to the device(s) in the VMware virtual machine configuration file.

For example, suppose your machine has two EEPro Ethernet cards and three Adaptec SCSI cards, and you assigned one Ethernet card and two SCSI cards to the VMkernel during the installation process. After you issue the two commands above, the EEPro Ethernet card assigned to the VMkernel is given the name vmnic0 and the two SCSI cards assigned to the VMkernel are given the names vmhba0 and vmhba1.

Note: You only need to load the Adaptec VMkernel module once, even though two Adaptec SCSI cards are assigned to the VMkernel.

The VMkernel can also share SCSI adapters with the service console, rather than exclusively controlling them. The installation process allows you to specify SCSI adapters that are shared and load the device module appropriately. However, if you wish to control the sharing explicitly, assign the SCSI device to the service console during the installation process. Then load the VMkernel SCSI module using the following syntax:

vmkload_mod -d bus:slot \
/usr/lib/vmware/vmkmod/aic7xxx.o vmhba

Note: This command should be entered on a single line. Do not type the backslash.

To obtain the bus and slot (also known as device or cardnum) information, examine
/proc/pci, output from the scanpci command, or both.

Note: The device must be correctly assigned to the service console. Devices assigned exclusively to the VMkernel during the installation process no longer appear in /proc/pci.

After you load a VMkernel device module, an entry appears in /proc/vmware/net or /proc/vmware/scsi. For example, when e100.o is loaded as described above, the entry /proc/vmware/net/vmnic0 appears, indicating there is one EEPro card controlled by the VMkernel and available as vmnic0 to the virtual machines. See Creating and Configuring Virtual Machines for information on how to configure virtual machines to use VMkernel devices.

Other Information about VMkernel Modules

Other Information about VMkernel Modules

The only non-device VMkernel module available in this release of VMware ESX Server is the nfshaper module, which provides support for network filtering, as described in Managing Network Bandwidth. Load nfshaper using the following syntax.

vmkload_mod /usr/lib/vmware/vmkmod/nfshaper.o nfshaper

VMkernel modules must be reloaded each time the VMkernel is loaded (as described in Loading VMkernel Device Modules).

previous Prev   Contents   Last   Next next