Archive for December, 2012
Using SSDs for the “Swap to Host Cache” feature of ESX for VMware View running on Cisco UCS blades
Posted by Brad Christian in VDI, VMware View on December 16, 2012
Quite a mouthful, eh? If you have a chance to add some SSDs to your blades, though, I think you will be happy with the results. See the VMware vSphere 5.1 Documentation Center for details on how ESX uses write back cache for virtual machine swap files.
First, get some SSDs and put them in your B2XX series blades and configure a local disk policy. I was lucky enough to get two drives per blades, so I set the local disk policy to RAID1.
You could go with RAID0, but I plan on using the local disks for A/V offload with vShield End-Point protection, so i wanted a bit more surety.
When the blade boots, you will be dismayed to see your new disks listed as “remote” during the ESX install. This is expected, see Scott Lowe’s post on it for an explanation. It isn’t a problem unless you are trying to use your disks for the ESX scratch disk- we are going to be using the disk for VM swapping, not the ESX Host, so we have one less step to do- see here for a vreference.
Finish your install and either drag the ESX box into vCenter or connect with the tools directly to the host. Create a new datastore from the local disks as you usually would. I recommend using a meaningful name, like _Local_SSD. If you use Host Profiles, you will want to uncheck the relevant checkboxes under Storage before pushing the Profile down to other hosts.
With your host selected, go to the “Configuration” tab and look under “Software”. You see a new link called “Host Cache Configuration”. Click it, and you will not see the disks you added.
Oh joy, we get to play with Putty. Connect to your host with Putty (don’t forget to turn on SSH in your security settings) and get ready to paste some commands. Leave your VMware tools showing “Storage”, you will want to refer back here for the super long naa numbers.
At this point, I could point out the numerous ways you could use PowerCLI, scripts or the vMA to do the same thing, but I think it better to learn how to do it from the command line first. Let’s get an understanding of the big list of values we are trying to manipulate first. We need to add a new value to the list of possible “Storage Array Type Plugins (SATPs)”. Refer to this great post by Stephen Foskett for more on SATPs and the PSA.
Type in “esxcli storage nmp satp rule list” into your putty session and hit enter to see all the SATPs your host knows about:
~ # esxcli storage nmp satp rule list
Name | Vendor | Model | Description |
——————- | ——- | —————- | ——————————————————————– |
VMW_SATP_ALUA_CX | DGC | CLARiiON array in ALUA mode | |
VMW_SATP_ALUA | NETAPP | NetApp arrays with ALUA support | |
VMW_SATP_ALUA | IBM | 2810XIV | IBM 2810XIV arrays with ALUA support |
VMW_SATP_ALUA | Any array with ALUA support | ||
VMW_SATP_ALUA | IBM | 2107900 | |
VMW_SATP_MSA | MSA1000 VOLUME | MSA 1000/1500 [Legacy product, Not supported in this release] | |
VMW_SATP_DEFAULT_AP | DEC | HSG80 | |
VMW_SATP_DEFAULT_AP | HSVX700 | active/passive HP StorageWorks SVSP | |
VMW_SATP_DEFAULT_AP | HSV100 | active/passive EVA 3000 GL [Legacy product, Not supported in this release] | |
VMW_SATP_DEFAULT_AP | HSV110 | active/passive EVA 5000 GL [Legacy product, Not supported in this release] | |
VMW_SATP_SVC | IBM | 2145 | |
VMW_SATP_EQL | EQLOGIC | All EqualLogic Arrays | |
VMW_SATP_INV | EMC | Invista | |
VMW_SATP_INV | EMC | LUNZ | Invista LUNZ |
VMW_SATP_EVA | HSV200 | active/active EVA 4000/6000 XL | |
VMW_SATP_EVA | HSV210 | active/active EVA 8000/8100 XL | |
VMW_SATP_EVA | HSVX740 | active/active HP StorageWorks SVSP | |
VMW_SATP_EVA | HSV101 | active/active EVA 3000 GL [Legacy product, Not supported in this release] | |
VMW_SATP_EVA | HSV111 | active/active EVA 5000 GL [Legacy product, Not supported in this release] | |
VMW_SATP_EVA | HSV300 | active/active EVA 4400 | |
VMW_SATP_EVA | HSV400 | active/active EVA 6400 | |
VMW_SATP_EVA | HSV450 | active/active EVA 8400 | |
VMW_SATP_SYMM | EMC | SYMMETRIX | EMC Symmetrix |
VMW_SATP_CX | DGC | All non-ALUA Clariion Arrays | |
VMW_SATP_LSI | IBM | ^1742* | FAStT 700/900 |
VMW_SATP_LSI | IBM | ^3542* | FAStT 200 |
VMW_SATP_LSI | IBM | ^3552* | FAStT 500 |
VMW_SATP_LSI | IBM | ^1722* | FAStT 600/DS4300 |
VMW_SATP_LSI | IBM | ^1815* | FAStT DS4800 |
VMW_SATP_LSI | IBM | ^1724* | FAStT 100 |
VMW_SATP_LSI | IBM | ^1726-* | DS3X00 |
VMW_SATP_LSI | IBM | ^1814* | DS4000 |
VMW_SATP_LSI | IBM | ^1818* | DS5100/DS5300 |
VMW_SATP_LSI | Universal Xport | FAStT | |
VMW_SATP_LSI | DELL | MD3000 | Dell MD3000 |
VMW_SATP_LSI | DELL | MD3000i | Dell MD3000i |
VMW_SATP_LSI | STK | OPENstorage 9176 | |
VMW_SATP_LSI | STK | OPENstorage D173 | |
VMW_SATP_LSI | STK | OPENstorage D178 | |
VMW_SATP_LSI | STK | OPENstorage D210 | |
VMW_SATP_LSI | STK | OPENstorage D220 | |
VMW_SATP_LSI | STK | OPENstorage D240 | |
VMW_SATP_LSI | STK | OPENstorage D280 | |
VMW_SATP_LSI | STK | BladeCtlr BC82 | |
VMW_SATP_LSI | STK | BladeCtlr BC84 | |
VMW_SATP_LSI | STK | BladeCtlr BC88 | |
VMW_SATP_LSI | STK | BladeCtlr B210 | |
VMW_SATP_LSI | STK | BladeCtlr B220 | |
VMW_SATP_LSI | STK | BladeCtlr B240 | |
VMW_SATP_LSI | STK | BladeCtlr B280 | |
VMW_SATP_LSI | STK | INF-01-00 | |
VMW_SATP_LSI | STK | FLEXLINE 380 | |
VMW_SATP_LSI | LSI | OPENstorage 9176 | |
VMW_SATP_LSI | LSI | OPENstorage D173 | |
VMW_SATP_LSI | LSI | OPENstorage D178 | |
VMW_SATP_LSI | LSI | OPENstorage D210 | |
VMW_SATP_LSI | LSI | OPENstorage D220 | |
VMW_SATP_LSI | LSI | OPENstorage D240 | |
VMW_SATP_LSI | LSI | OPENstorage D280 | |
VMW_SATP_LSI | LSI | BladeCtlr BC82 | |
VMW_SATP_LSI | LSI | BladeCtlr BC84 | |
VMW_SATP_LSI | LSI | BladeCtlr BC88 | |
VMW_SATP_LSI | LSI | BladeCtlr B210 | |
VMW_SATP_LSI | LSI | BladeCtlr B220 | |
VMW_SATP_LSI | LSI | BladeCtlr B240 | |
VMW_SATP_LSI | LSI | BladeCtlr B280 | |
VMW_SATP_LSI | LSI | INF-01-00 | |
VMW_SATP_LSI | LSI | FLEXLINE 380 | |
VMW_SATP_LSI | SUN | CSM100_R_FC | |
VMW_SATP_LSI | SUN | FLEXLINE 380 | |
VMW_SATP_LSI | SUN | CSM200_R | |
VMW_SATP_LSI | SUN | LCSM100_F | |
VMW_SATP_LSI | SUN | LCSM100_I | |
VMW_SATP_LSI | SUN | LCSM100_S | |
VMW_SATP_LSI | SUN | STK6580_6780 | Sun StorageTek 6580/6780 |
VMW_SATP_LSI | ENGENIO | INF-01-00 | |
VMW_SATP_LSI | IBM | ^1746* | IBM DS3512/DS3524 |
VMW_SATP_LSI | DELL | MD32xx | Dell MD3200 |
VMW_SATP_LSI | DELL | MD32xxi | Dell MD3200i |
VMW_SATP_LSI | SGI | IS500 | SGI InfiniteStorage 4000/4100 |
VMW_SATP_LSI | SGI | IS600 | SGI InfiniteStorage 4600 |
VMW_SATP_LSI | SUN | SUN_6180 | Sun Storage 6180 |
VMW_SATP_LSI | DELL | MD36xxi | Dell MD3600i |
VMW_SATP_LSI | DELL | MD36xxf | Dell MD3600f |
VMW_SATP_DEFAULT_AA | HITACHI | ||
VMW_SATP_DEFAULT_AA | IBM | 2810XIV | IBM 2810XIV arrays without ALUA support |
VMW_SATP_DEFAULT_AA | Fibre Channel Devices | ||
VMW_SATP_DEFAULT_AA | iSCSI Devices | ||
VMW_SATP_DEFAULT_AA | IBM | SAS SES-2 DEVICE | IBM SAS SES-2 |
VMW_SATP_DEFAULT_AA | IBM | 1820N00 | IBM BCS RSSM |
VMW_SATP_DEFAULT_AA | HITACHI | ||
VMW_SATP_LOCAL | USB Devices | ||
VMW_SATP_LOCAL | IDE Devices | ||
VMW_SATP_LOCAL | RAID Block Devices | ||
VMW_SATP_LOCAL | Parallel SCSI Devices | ||
VMW_SATP_LOCAL | Serial Attached SCSI Devices | ||
VMW_SATP_LOCAL | Serial ATA Devices | ||
VMW_SATP_LOCAL | Unknown Devices |
We need to add a line to end of this list, so that your SSD disk (which ESX is seeing as a SAS disk on the SAN) can use the “VMW_SATP_LOCAL” SATP. First, we need to get the naa of your drive. Look in the VMware tools at your disk, click on “Manage Paths” and you will see the naa number. In this case, mine is “naa.600508e0000000006c793530aa10e80e”. You can get this in Putty, but I like to check in the GUI, because Putty can be hard to read. Don’t bother typing it out, enter:
~ # esxcli storage nmp device list
~ # esxcli storage core device list -d naa.600508e0000000006c793530aa10e80e
The “Is SSD: false” is what we need to change. We want to add a new rule for the VMW_SATP_LOCAL SATP, one that has option=enable_ssd
~ # esxcli storage nmp satp rule add -s VMW_SATP_LOCAL --device naa.600508e0000000006c793530aa10e80e --option=enable_ssd
If you up arrow a few times and enter “esxcli storage nmp satp rule list”, you’ll see a new line at the bottom.
VMW_SATP_LOCAL naa.600508e000000000bd5fc37cdb32b60d enable_ssd user
Now unclaim the device
~ # esxcli storage core claiming unclaim --type device --device naa.600508e0000000006c793530aa10e80e
and finally reload and run the claim rules
~ # esxcli storage core claimrule load
~ # esxcli storage core claimrule run
Now lets see if it worked
~ # esxcli storage core device list -d naa.600508e0000000006c793530aa10e80e
You should now have a new disk listed under “Host Cache Configuration”.
Pick an amount to use, saving a little room for A/V VMs if need be.
Now add some VMs and browse the datastore to see your new swap files, and make sure to show the SAN guys on your team how you’re saving precious SAN resources.