How to install as VMware Guest
Table of Contents
The following guide will aid you in installing a DilOS VMware guest. Performance will be guaranteed by using DirectPath I/O. The following prerequisites apply:
Have a separate JBOD-controller available to present to the guest OS (LSI is preferred using mpt_sas driver)
Have a processor and motherboard that supports the VT-d instruction set
Have plenty of RAM available: a VM with a PCI device locks all memory assigned to it
This guide uses an LSI 9211-8i/LSI 9311-8i controller; presented via DirectPath I/O on ESXi 5.5/6.5. The controller was flashed to IT-firmware before using it on this system.
Preconfiguration
To start, log on to your VSphere Server; or connect via the VMware VI-Client to your ESXi server. Navigate to the Configuration Page; and select PCI Devices. Add your controller.
Note: a reboot is required after this step
After the reboot; it's time to configure your VM. We'll create a custom VM using the following settings:
Other 64-bits
Add plenty of RAM. In my case - I used 8GB
Root disk on a local datastore
LSI Logic Parallel controller (pvscsi is working fine, need ignore VMware message about issue with boot drives)
40GB disk
vmxnet3 network adapter
The reason for using the vmxnet3 adaptor is twofold:
less overhead = less latency
10gbps connectivity = more IOPS
Installation
Next, power on the VM, connect the DilOS iso-image and install using the default options. Make sure to install DilOS on the disk presented on the local ESXi datastore. Once done; upgrade DilOS to the latest version using How to upgrade DilOS from APT repo.
After upgrading to the latest and greatest version, please install the VMware Tools. This greatly enhances functionality and support for ESXi. Do this by running the following command as root:
$ sudo apt-get install open-vm-tools $ sudo svcadm enable open-vm-tools
Optimization: NTPD
To synchronize the time, you can enable this feature in the vm settings on vmware.
Or configure the ntp service on vm.
$ sudo apt install ntp $ sudo svcadm enable ntp $ sudo ntpdate 0.debian.pool.ntp.org $ sudo svcadm clear ntp $ #check ntp $ ntpq -p
Optimization: Controller Load Balancing
Next step is optimising the kernel drivers for the LSI 9211-8i card I'm using. This next step greatly optimises performance for SAS drives. As root; open the following file:
vi /kernel/drv/scsi_vhci.conf
Search for a line containing "load-balance". Edit the line to reflect the following setting:
Note: a reboot is required after this step
load-balance="logical-block";
Optimization: vmxnet3 driver - jumbo frames
In this particular setup - I'm using jumbo frames to improve large I/O performance.
A couple of modifications are needed to successfully cope with this. Namely disabling Large Segment Offload (LSO) and tuning the send and receive buffers; which are too small for 10gbit/Jumbo Frames. Open an editor to your likes (in the example - we're using vi):
vi netconf.sh
#!/usr/bin/bash # set MTU dladm set-linkprop -p mtu=9000 vmxnet3s0 # default was 49152 - to show: ipadm show-prop -p send_buf tcp ipadm set-prop -p send_buf=1048576 tcp # default was 128000 - to show: ipadm show-prop -p recv_buf tcp ipadm set-prop -p recv_buf=1048576 tcp # max buffer - to show: ipadm show-prop -p max_buf tcp ipadm set-prop -p max_buf=4194304 tcp # disable LSO outbound ndd -set /dev/ip ip_lso_outbound 0
Change the execute bits:
chmod +x ./netconf.sh
Now remember to run after every reboot - or when you want to make your own changes. These settings can be modified on-the-fly. To run, just type:
./netconf.sh
Remarks
You can use tools as sas2flash and lsiutil to manage your controller, as it's passed through like a bare-metal install. You can even upgrade the firmware and BIOS on-the-fly, straight from the VM. This makes it easy to find troubled disks, rescan ports, or even reset the controller. You can find these utilities from LSI.com.
Also - make sure to check LSI.com regularly for updates to the firmware. I highly recommend updating to the latest firmware. As this often contains fixes that might even affect you without knowing.