VMware
VMware ESX Server 1.5
Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Using VMkernel Devices

Using VMkernel Devices

The VMkernel devices - whether shared or not - must be referenced and activated in the VMware virtual machine's configuration (.cfg) file, as described in this section. You must also load a special VMware network driver into the guest operating system, as described in the section Installing VMware Tools and the Network Driver in the Guest Operating System.

Ethernet

Ethernet

The Ethernet section of the configuration file is in this format:

ethernet0.present = TRUE
ethernet0.connectionType = monitor_dev
ethernet0.virtualDev = vmxnet
ethernet0.devName = vmnic0
ethernet0.exclusive = TRUE

In this configuration, ethernet0.connectionType = monitor_dev and ethernet0.virtualDev = vmxnet specify that the virtual machine's Ethernet uses the VMkernel high-performance network device. ethernet0.devName = vnmic0 specifies that the virtual network device corresponds to the first network device activated by the command
vmkload_mod .../vmkernel .../XXX.o vmnic. See VMkernel Module Loader for details on vmkload_mod. The line ethernet0.exclusive = TRUE makes the networking more efficient if only one virtual machine is using the network card. You should remove this line if more than one virtual machine needs to use the card.

VMFS Virtual SCSI Disks

VMFS Virtual SCSI Disks

VMware ESX Server supports a simple file system known as VMFS (VMware ESX Server File System) on physical SCSI disks and partitions to make it easy to allocate space for a disk image. VMFS allows many disk images to be stored on one large physical SCSI disk or partition. The VMware Management Interface automatically creates VMFS file systems and VMFS files as you configure your system and create virtual machines. However, VMFS files can also be created and managed via the vmkfstools(1) command. An example configuration that uses a disk image allocated in a VMFS is:

scsi0.present = TRUE
scsi0.virtualDev = vmxbuslogic

scsi0:2.present = TRUE
scsi0:2.name = vmhba1:3:0:2:data.dsk

In this configuration, scsi0.present = TRUE specifies that the virtual machine has a SCSI adapter called scsi0 and scsi0.virtualDev = vmxbuslogic specifies that the virtual machine's first SCSI adapter accesses data from the VMkernel SCSI device. Finally, scsi0:2.name = vmhba1:3:0:2:data.dsk specifies the location of the disk image used for SCSI target 2 on the first virtual SCSI adapter.

The location of the disk image is specified in a notation with the form <adaptername>:<target>:<lun>:<partition>:<filename>. An adapter name such as vmhba1 specifies the second physical SCSI adapter activated by the vmkload_mod .../XXX.o vmhba command. The second component of the location specifies the ID of the target on the named adapter. The third component specifies the LUN (logical unit number) and is typically zero. The fourth component specifies the partition. The last component specifies the name of the disk image in the VMFS file system on the specified partition.

So scsi0:2.name=vmhba1:3:0:2:data.dsk indicates that the disk image is in the file data.dsk on partition 2 of the disk at target 3 and LUN 0 on the second SCSI adapter activated by the vmkload_mod .../XXX.o vmhba command. See VMkernel Module Loader for details on vmkload_mod.

A specification may have a partition specified as 0, in which case it refers to a VMFS that covers a complete, unpartitioned disk (target). However, if your SCSI adapter is shared with the console operating system, rather than assigned exclusively to the VMkernel, you cannot access a VMFS that covers the entire disk. Thus, we recommend that you always create at least one partition on each disk and create the VMFS within that partition.

For information on copying an existing virtual disk from the console operating system to a VMFS file, see Migrating VMware Workstation and VMware GSX Server Virtual Machines.

Note: If you have not determined which SCSI target ID corresponds to the disk you wish to use in the virtual machine, see Determining SCSI Target IDs.

Access Modes

Access Modes

By default, disk images are accessed in persistent mode. That is, all changes are written directly to the disk image and cannot be undone. This mode provides the most efficient access to the data. ESX Server also supports nonpersistent, undoable and append modes. You can change the disk mode setting on the Edit VM Configuration page of the VMware Management Interface. The virtual machine must be powered down before you change the disk mode. You can also make the changes directly in the configuration file by including lines in the following format:

scsi0:2.mode = nonpersistent

or

scsi0:2.mode = undoable

If the mode of a disk image is nonpersistent, any changes to the disk are lost when the associated virtual machine shuts down. If the mode of the disk image is undoable, the changes are maintained in a separate file, known as the redo log, on the SCSI disk. Each time the virtual machine is powered down, a dialog asks whether changes made to the disk during the current session should be discarded, committed to the base disk image or appended (kept in the redo log).

VMware ESX Server supports an additional append mode for disk images stored as VMFS files. Like undoable mode, append mode maintains a redo log. However, in this mode, no dialog appears when the virtual machine is powered off to ask whether you want to commit changes. All changes are continually appended to the redo log. At any point, you can undo all the changes by removing the redo log. Its name is derived from the original name of the file that contains the disk by adding .REDO. Changes can be committed permanently to the base disk image via the commit option of the vmkfstools command. For details on this command, see Using vmkfstools.

Virtual SCSI Disks on the Console Operating System

Virtual SCSI Disks on the Console Operating System

VMware ESX Server also supports virtual SCSI disks that are stored on the file system of the console operating system. Virtual SCSI disks created under VMware Workstation 2.0 and higher are supported, although a new network driver needs to be loaded into the guest operating system. Disks created under VMware GSX Server are also supported. For details, see Migrating VMware Workstation and VMware GSX Server Virtual Machines.

To create a new, blank virtual SCSI disk for your virtual machine, copy the file
/usr/lib/vmware/virt-scsi.dsk from the ESX Server installation CD-ROM to the working directory for your virtual machine.

cp virt-scsi.dsk /virtual machines/vm1/virt-scsi.dsk

Then add lines to your virtual machine's configuration file to describe the new disk. Those lines have the following format:

scsi0.present = TRUE
scsi0.virtualDev = buslogic

scsi0:1.present = TRUE
scsi0:1.fileName = virt-scsi.dsk
scsi0:1.mode = nonpersistent

Note: Using virtual disks stored on the console operating system's file system does not take advantage of ESX Server's new high-performance SCSI disk architecture and therefore the performance of the virtual machine may suffer.

Naming VMFS File Systems

Naming VMFS File Systems

If you create a VMFS file system on a SCSI disk or partition, you can give a name to that file system and use that name when specifying VMFS files on that file system. For instance, suppose you have a VMFS file system on the SCSI partition vmhba0:3:1 and have created a VMFS file nt4.dsk. You can name that file system either using the Web-based configuration wizard or via a vmkfstools command such as

vmkfstools -S mydisk vmhba0:3:1:0

You can then refer to the nt4.dsk file as mydisk:nt4.dsk (instead of vmhba0:3:1:0:nt4.dsk) in a virtual machine configuration file and in other vmkfstools commands.

Naming VMFS file systems is especially useful if you may be adding SCSI adapters or disks to your system. In that case, the actual disk and target numbers specifying a particular VMFS may change, but the name stays the same.

previous Prev   Contents   Last   Next next