Monthly Archives: January 2018

ESXi USB Device Passthrough

I spent a lot of time investigating the USB device passthrough on Vmware ESXi. I wrote specifically the word device in the title, meaning any USB device, storage, keyboard, mouse or else.

The passthrough of USB to Vmware ESXI is actually quite a pain, and not very straight forward.

https://kb.vmware.com/s/article/1022290

Vmware really support passing USB storage via USB 3 to the VMs, not devices.

In a nutshell, there are three main ways to do this.

  1. Passthrough of the USB controller on the motherboard to ESXI.
  2. Buy a USB hub network connected device and connect USB over LAN (Digi Anywhere)
  3. Passthrough of a PCI dedicated card with USB controllers on it and compatible with ESXI

Solution 1 comes with significant caviarts. It relies on the the ability of the detection of the components of the motherboard by the ESXI kernel and Vmware has not been very keen on fixing these issues for the prosumer user. I was semi successfull with my motherboard but after an update on ESXi, I couldn’t pass any USB device despite having passedthrough the USB controller to ESXI and having it being detected correctly.

Solution 2 is very expensive and is really meant for the enterprise market, to pass license dongles to VM (in my opinion).

Solution 3 was then the direction that I turned too and I started reading.

One of the amazing ressources for ESXI whitelabs is the great website of Tinkertry.

He wrote very good articles about USB passthrough and I highly encourage to read this one

ESXi Raw Device Mapping

I was looking how to manage a dedicated storage via Vmware ESXi and the biggest questions I had was how to store the files and how to recover them if the virtual machine crashes, or the motherboard for the ESXi server.

I didn’t want to use the VMFS file system to store the files, as I didn’t see really a tool to recover files from a damaged file system.

The VMFS file system is related not meant for data storage, and I only use it to store the virtual machines that I use.

ESXi has a very nice feature despite no official support where a hard drive can be passthrough to a virtual machine.

Here are the commands to be entered

cd /dev/disks
ls -l

Look for new hard drive name.

Create a vdmk file which is a passthrough, in my case:

vmkfstools -z /vmfs/devices/disks/t10.ATA_____WDC_WD60EFRX2D68L0BN1_________________________WD2DWXB1HB4J6U1F /vmfs/volumes/SSD850Pro/Openmediavault/BTRFS6TB.vmdk

Add the vdmk to your virtual machine, Openmediavault in my case, and here you go. This is absolutely awesome as I am able to have Btrfs on the hard drives in passthrough mode to Vmware ESXI.

Intel Processor Hardware Bug

If you read the news in the last couple of days, you probably read that Intel processors have massive hardware bugs dating back from 1995, Meltdown and Spectre !!!!

Those bugs are really severe as they enable the user to read all of the memory, and especially memory that the user should not have access too. Thos hardware bugs are absolutely devastating.

The Intel PR machine was in full effect in crisis damaging mode really stating bullshit.

The register wrote a very nice article rewording the Intel statement in normal language.

Linus Torvals ripped Intel apart for this hardware bug, and he is totally right in my opinion.

Looking at the patch proposed to the kernel, this gives you a really crazy idea about what the developers think about the bug…

/* Assume for now that ALL x86 CPUs are insecure */ setup_force_cpu_bug(X86_BUG_CPU_INSECURE); + if (c->x86_vendor != X86_VENDOR_AMD) + setup_force_cpu_bug(X86_BUG_CPU_INSECURE)

I am really pissed about the communication from Intel, the severity of the bugs, and the fact that the Intel CEO sold his stock options/shares when he was made aware of those bugs.Intel deserves the class-action lawsuits that are coming to the company.

Openmediavault

I discovered Openmediavault totally by chance as I was looking at Freenas.

I looked at Freenas and I was absolutely not a fan of it for several reasons:

  • Unix
  • ECC significant memory requirements due to ZFS
  • Jail systems to isolate processes

Openmediavault is a very nice distribution made by Volker Thiele (former Freenas) based on Debian.

The distribution has evolved significantly since the beta version and is now available in version 4.

I use it as a virtual machine through Vmware ESXI, and passthrough of the hard drives.