Category: Virtualization

  • VMware virtual or not?

    Depending on naming, in a VMware environment you may not actually be sure if a Linux system is VMware or not. Here’s a quick command to find out:

    which will generally output “VMware, Inc.” if VMware.

    On older systems you may find “-s” doesn’t work, in which case just pipe “dmidecode” through grep looking for “VMware”.

    UPDATE:

    If “dmidecode” oddly isn’t available, you can also run:

    If you see “VMware” in the output, it’s a safe bet that it’s a VMware virtual.


  • Installing Plixer’s “Scrutinizer” NPMD

    Plixer makes a good “Network Performance Monitoring and Diagnostics” (NPMD) application called “Scrutinizer“. NPMD, as Gartner calls it, mostly omeans, collecting, aggregating, and reporting on Netflow data.

    Plixer provides a VMware OVF for installation of a virtual appliance. I, however, ran into a few issues with the installation:

    • I couldn’t get the install to work OVF through vCenter successfully, or at least vCenter 6.5. It would install, but when I booted it would come up to a PXE boot, rather than CentOS which the appliance runs on. The answer was to install it through the Windows vSphere ESXi client or through the web vSphere ESXi client.
    • Setting up SSL (HTTPS) during the initial install prompts wouldn’t work. Everything seemed fine, but on final boot of the Scrutinizer appliance, the HTTP/HTTPS wouldn’t come up at all. It turned out it hadn’t actually generated the certificates and files were missing. The answer is to select “no” to SSL in the initial dialog, then when fully up, log in using the “plixer” login and use the “set ssl on” option after the fact. SSL then works correctly afterwards.
    • By default it will bind to IPv6 ports and not to IPv4 ports (!) to listen for Netflow data. The solution is to log into the Scrutinizer server/guest as root and disable IPv6 per this document. Specifically, I recommend the “/etc/sysctl.conf” change as it is relatively simple to execute.
    • When logged in as “root”, doing a “yum update” is useful, though I would do the following bullet after.
    • When logged in as “plixer”, it’s useful to run the “set tuning” as well as “update packages”, though oddly it seems to run back one of the kernel updates from the last bullet.

    Now I just need to figure why I’m still not seeing the packets from the ASA…


  • Dell PERC 5i/R or H200 VMware Performance Fix

    I had an old Dell PERC 5i/R RAID card laying around and wanted to use it for a home lab ESXi box (note: also works on Dell PERC H200). The card isn’t amazingly high performance, but it it’s good enough for simple RAID. Well, that is, it’s good enough performance if you change the settings. By default “write caching” is disabled – that unfortunately includes even “write caching” on the drives themselves (5i/R doesn’t have cache so it’s always “Write Through”, the H200 has cache, but is disabled by default). Therefore by default write performance is downright painful.

    Fortunately it’s not too difficult to fix if you can pull together the right tools. I was lucky enough to find a post by “tonyd88” on this Dell support forum which explains the process. Below, I attempt to summarize the steps for posterity.

    WARNING: If you enable write caching on the 5i/R or H200, because of the lack of battery backup (BBU) there is a risk that if you lose power mid-write, you will corrupt your disk, OS, etc. Not only use at your own risk, but ideally at least have a UPS on your system.

    Steps:

    • Locate a copy of “LSIUtil.exe”. The Dell RAID 5i/R was made by LSI. LSI was sold to Avago Technologies and a copy of it appears to be here, but you may need to look around in Avago’s legacy driver downloads. The latest version I have found is 1.62.
    • You’ll need to create a DOS boot disk or thumb drive with the LSIUtil.exe on it. Unfortunately explaining how to do that is a bit beyond the scope of this article. Google is your friend.
    • It is likely you will need “DOS4GW.EXE” also on the boot disk. You’ll have to find a reputable download or buy it here. This may be a potential alternative.
    • Install the Dell 5i/R RAID card in the system and boot to your newly created DOS boot disk/drive.
    • Run the LSIUtil.exe binary.
    • Select your controller. Hopefully there will only be one, but otherwise you’ll have to figure it out. Choose the number that matches and hit <enter>.
    • Select option “21”, “RAID actions” (type 21 and <enter>).
    • Select option “32”, “Change Volume Setting” (type 32 and <enter>). This submenu’s first item is the critical change:
      • On the first prompt for “write caching” type “yes” and <enter>.
      • For “Offline on SMART Data” just hit <enter> for default or change to whatever you want.
      • For “Auto configuration” just hit <enter> for default or change to whatever you want.
      • For “Priority resynch” just hit <enter> for default or change to whatever you want.
      • For “Hot Spare Pools” just hit <enter> for default or change to whatever you want.
    • At the next prompt type 0 <enter> to quit. Just continue to hit <enter> until it drops all the way out to DOS.

    You’re done. Pull the boot drive and reboot to whatever OS you’re going to use on it. VMware happily uses the cards.


  • Fix VMware Web Client Integration Plugin for Chrome on Mac OS X El Capitan (10.11)

    The latest vCenter Server 6.0 VMware Web Client Integration Plugin does not work on OS X El Capitan. The installer finishes, but silently fails due to missing libraries, libraries that probably existed in earlier OS X versions.

    Because the libraries don’t exist, necessary certificates don’t get generated, and even re-running the installer from the application directory won’t solve it (including with the below hack). What you need to do is ensure the libraries will be there when the installer gets to the “Running package scripts…” section on initial install.

    There are a number of possible solutions, but the below seems the cleanest and doesn’t require multiple installs.

    Before installing the application, do the following:

    Then run the full installer.

    This will create a hack to allow the packaged libraries to be used when the package scripts get run. If it’s working correctly the “Running package scripts…” will take many minutes to run as it executes “openssl” to generate the following:

    /Applications/VMware Client Integration Plug-in.app/Contents/Library/data/ssl/dh512.pem

    If it instead installs very quickly, you can be fairly certain it didn’t install correctly and probably VMware has changed something yet again. If it works, you can both upload files and deploy OVF files.

    Hopefully VMware will create a permanent fix. More on why this plugin is required can be found here. How to install/upgrade the plugin itself can be found here.

    UPDATE:

    Jonathon McTaggart (thank you Jonathon!) gave the following update for the latest plugin:

    UPDATE 2:

    It appears VMware has essentially documented the same fix here, rather than fixing the installer:

    https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2144550

    The problem is, they are also suggesting you disable a fundamental OS protection temporarily as well. That is a major PIA and sadly doesn’t seem to work on macOS Sierra. I can use OVFs, but I can’t do file uploads. Apparently there is a integrated ESXi HTTP client that some are working on here (via here) that seems to offer some options. This has been a problem for over a year now…


  • Converting VMware virtual disk to “eagerzeroedthick”

    Pretty simple from the console really:

    vmkfstools -d eagerzeroedthick -i <virtual-disk-source>.vmdk <virtual-disk-target>.vmdk

    Note that this will completely expand the size of the filesystem (ie: it will no longer be “thin”).

    I needed this not to convert a “thin” filesystem to “thick” filesystem, but a “thick” filesystem to a clusterable “thick” filesystem. The default of “zereodthick” for thick filesystem does zeroing as needed on the fly, whereas “eagerzeroedthick” zeros out beforehand (which takes longer). The former, “zeroedthick” isn’t compatible with clustered filesystems, or more particularly, the required setting of “SCSI Bus Sharing” to “Virtual” while “eagerzeroedthick” is.

    “eagerzeroedthick” corresponds to the vSphere Client setting when creating a hard disk of “Support clustering features such as Fault Tolerance”. It is incompatible with “Allocate and commit space on demand (Thin Provisioning)”.

    More about clustering on the same VMware machine (though aimed at Microsoft unfortunately) can be found here:

    http://www.vmware.com/pdf/vi3_35/esx_3/r35u2/vi3_35_25_u2_mscs.pdf

    To note, renaming virtual disks is equally as simple via the CLI (which the vSphere Client will not allow):

    vmkfstools -E <original-virtual-disk>.vmdk <renamed-virtual-disk>.vmdk

    Note that in the case of any of the “thick” versions actually have two files which can be confusing, a file that doesn’t have “-flat” and one that does. In that case choose the one that lacks “-flat” for the operations and “vmkfstools” will automatically handle the “-flat” version as well.