{"id":82,"date":"2019-02-07T15:00:09","date_gmt":"2019-02-07T20:00:09","guid":{"rendered":"https:\/\/blog.markdepalma.com\/?p=82"},"modified":"2019-02-19T09:50:25","modified_gmt":"2019-02-19T14:50:25","slug":"deploying-home-assistant-hass-io-to-esxi-6-5","status":"publish","type":"post","link":"https:\/\/blog.markdepalma.com\/?p=82","title":{"rendered":"Deploying Home Assistant Hass.io to ESXi 6.5"},"content":{"rendered":"\n<p>I recently did a complete overhaul of my home ESXi home lab environment. With the new capacity\/reliability came the desire to move as much onto it as possible. One of these items was my Home Assistant Hass.io instance which was running on a Raspberry Pi 3 (and originally a Raspberry Pi 1 B). Running it on the Pi has always come with painfully slow reboot and update times. With VM real estate available I see no reason to rely on mini computers to run various workloads around my home. I can re-purpose these boards for other projects. ESXi will also bring the ability to do machine-level snapshots which will be more complete and easier to revert to than the snapshot mechanism within Hass.io.<\/p>\n\n\n\n<p>The main issue I ran into was with the VMDK. The way the VMDK was created it split into multiple files and I couldn&#8217;t consolidate or delete snapshots. The VMDK was also getting locked preventing vMotions. To get around this I cloned the VMDK in shell using vmkfstools. I also had to use the proper storage controller, network adapter, and firmware settings. I&#8217;ve listed all steps below:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Create a new VM with the following parameters:<ul><li>Guest OS &#8211; CentOS 7 (64-bit) (The VM will adjust this automatically later)<\/li><li>1 vCPU<\/li><li>2GB RAM<\/li><li><strong>1x E1000 NIC&nbsp;(NIC&nbsp;will&nbsp;not&nbsp;be&nbsp;usable&nbsp;as&nbsp;VMXNET 3)<\/strong><\/li><li>Remove any other devices like CD-ROM, hard disk, SCSI controller, etc.<\/li><\/ul><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image.png\" alt=\"\" class=\"wp-image-89\" width=\"693\" height=\"492\" srcset=\"https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image.png 693w, https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-300x213.png 300w, https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-624x443.png 624w\" sizes=\"auto, (max-width: 693px) 100vw, 693px\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Download the latest stable HassOS VMDK from <a href=\"https:\/\/github.com\/home-assistant\/hassos\/releases\">https:\/\/github.com\/home-assistant\/hassos\/releases<\/a><\/li><li>Copy this VMDK up to the VM directory in ESXi\/vSphere<\/li><li>Open an SSH session to the ESXi host and change directory to the location of the VMDK you just copied (<em>ex. <strong>cd \/vmfs\/volumes\/datastore1\/HASSOSVM<\/strong><\/em>)<br><\/li><li>Clone the VMDK using the following command: <strong><em>vmkfstools -i &#8220;hassos_ova-2.8.vmdk&#8221; &#8220;hassos_ova-2.8_new.vmdk&#8221;<\/em>&nbsp;(This&nbsp;creates&nbsp;a&nbsp;thick&nbsp;copy&nbsp;of&nbsp;the&nbsp;disk&nbsp;and&nbsp;avoids&nbsp;locking\/snapshot&nbsp;issues&nbsp;with&nbsp;the&nbsp;virtual&nbsp;disk)<\/strong><\/li><li>Delete the original VMDK from the datastore as it is no longer needed<\/li><li>Edit the VM and add an existing hard drive selecting the VMDK you just cloned<br><\/li><li>Change the controller for the disk from <strong>&#8220;New SCSI controller&#8221; to &#8220;IDE 0&#8221;<\/strong> <\/li><li>Remove the newly added SCSI controller as it is not needed for the IDE virtual disk<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"blob:https:\/\/blog.markdepalma.com\/91ca73fc-2dd9-4729-b5b6-e3043fba4176\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-1.png\" alt=\"\" class=\"wp-image-92\" width=\"616\" height=\"431\" srcset=\"https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-1.png 616w, https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-1-300x210.png 300w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/a><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Go to &#8220;VM Options&#8221; and change the Firmware from <strong>&#8220;BIOS&#8221; to &#8220;EFI&#8221;<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-2.png\" alt=\"\" class=\"wp-image-93\" width=\"622\" height=\"560\" srcset=\"https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-2.png 622w, https:\/\/blog.markdepalma.com\/wp-content\/uploads\/2019\/02\/image-2-300x270.png 300w\" sizes=\"auto, (max-width: 622px) 100vw, 622px\" \/><\/a><figcaption>image<\/figcaption><\/figure>\n\n\n\n<p>After all this has been completed you just need to power on the VM. Assuming DHCP is configured properly on the network Hass.io is using it will pick up an IP and start configuring. With Hass.io running on an older Xeon-powered host I have never seen the VM get over 50-60 percent CPU utilization and even then I&#8217;ve only seen those spikes when running an update. Updates of HassOS and Hass.io take a minute or two when they would sometimes take up to 10-15 minutes when running on a Pi.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently did a complete overhaul of my home ESXi home lab environment. With the new capacity\/reliability came the desire to move as much onto it as possible. One of these items was my Home Assistant Hass.io instance which was running on a Raspberry Pi 3 (and originally a Raspberry Pi 1 B). Running it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62,61],"tags":[10,11,40,39,41,38,44,42,43,9,21],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-homeautomation","category-vmware","tag-esx","tag-esxi","tag-hass-io","tag-hassio","tag-hassos","tag-home-assistant","tag-home-automation","tag-raspberry-pi","tag-vmdk","tag-vmware","tag-vsphere"],"_links":{"self":[{"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=82"}],"version-history":[{"count":9,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":161,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=\/wp\/v2\/posts\/82\/revisions\/161"}],"wp:attachment":[{"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.markdepalma.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}