{"id":930,"date":"2012-03-12T09:00:07","date_gmt":"2012-03-12T13:00:07","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=930"},"modified":"2012-03-10T22:33:21","modified_gmt":"2012-03-11T03:33:21","slug":"use-powercli-to-mark-disk-as-as-ssd","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/use-powercli-to-mark-disk-as-as-ssd\/","title":{"rendered":"Use PowerCLI to mark disk as as SSD"},"content":{"rendered":"<p>I&#8217;ve recently been working with a few new ESXi hosts.  These systems have a pair of solid state disks that I planned to use for host cache.  However, ESXi 5.0 did not detect these disks as an SSD type.  I found a couple articles describing how to trick ESXi into thinking a data store was SSD:<\/p>\n<p><a href=\"http:\/\/www.yellow-bricks.com\/2011\/08\/18\/swap-to-host-cache-aka-swap-to-ssd\/\">Yellow-Bricks: Swap to host cache aka swap to SSD<\/a><br \/>\n<a href=\"http:\/\/www.virtuallyghetto.com\/2011\/07\/how-to-trick-esxi-5-in-seeing-ssd.html\">VirtuallyGhetto: How to Trick ESXi 5 in seeing an SSD Datastore<\/a><\/p>\n<p>After confirming with my third party vendors that this was a supported configuration, I tested and confirmed that using the enable_ssd option would resolve my issues.  Since my host build script is written in PowerCLI, I wanted to re-write the vMA commands using Get-EsxCli.  <\/p>\n<pre><code class=\"language-powershell\">\r\n$localDisk = Get-ScsiLun | where {$_.ExtensionData.DisplayName -match \"Local LSI Disk\"}\r\n$canName = $localDisk.CanonicalName\r\n$esxcli = Get-EsxCli\r\n$satp = ($esxcli.storage.nmp.device.list() | where {$_.Device -eq $canName }).StorageArrayType\r\n$esxcli.storage.nmp.satp.rule.add($null,$null,$null,$canname,$null,$null,$null,\"enable_ssd\",$null,$null,$satp,$null,$null,$null)\r\n$esxcli.storage.core.claiming.reclaim($canName)\r\n<\/code><\/pre>\n<p>The local VMFS data store needs to be created first.  I encountered some errors when running the commands against an unformatted\/RAW device.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve recently been working with a few new ESXi hosts. These systems have a pair of solid state disks that I planned to use for host cache. However, ESXi 5.0 did not detect these disks as an SSD type. I &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/use-powercli-to-mark-disk-as-as-ssd\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-930","post","type-post","status-publish","format-standard","hentry","category-scripting","category-virtualization"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=930"}],"version-history":[{"count":4,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/930\/revisions"}],"predecessor-version":[{"id":934,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/930\/revisions\/934"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}