Installing Home Assistant on VMWare Player 17

VMWare Player is a free virtualization software that allows you to run multiple operating systems on a single host machine. This means you can create a virtual machine (VM) for Home Assistant, which is an efficient and safe way to run the software.

Full Guide Here

In addition to the detailed written post, I also created a video tutorial for those who prefer visual content:

Download VM Player

Download VMplayer for Windows from here

Then, install VMware 17 Player with all defaults.

On the User Experience screen, you can uncheck both options:

Continue with the install until complete.

Download Home Assistant Image

Download the Vmware (.vmdk) image from here

vmdk

Extract the file, and place it into a directory where your VM will live (C:\Home Assistant)

Launch VMware 17 Player

Launch VMware 17 Player. Select the free for non-commercial use option.

free

Click Create a New Virtual Machine

Click I will install the operating system later.

Select Linux. For the version, you would use Other Linux 5.x and later kernel 64-bit.

64

Give your VM a name (for example: ha) and select the folder you created in the previous step.

folder

Confirm the popup. Select Continue.

confirm

Store it as a single file, and set your storage size to 32GB as recommended by Home Assistant documentation.

gb

On the next screen, click Customize Hardware.

Set memory to at least 2GB

Make sure that Processors are set to at least 2

Set the network adapter needs to “bridged” mode.
Then go to Configure Adapters

Make sure to select only your Ethernet and WIFI adapters (if you’re going to use WIFI)

Remove both New CD/DVD (IDE) and Printer as they will not be used.

This is how your hardware should look go to Finish to create your Virtual Machine.

Edit VM Settings

Navigate back to the C:\Home Assistant folder. Delete the ha.vmdk file.

Then rename the haos _ova- 10.0.vmdk to ha.vmdk (or the Virtual Machine name you created in the previous step).

Then, locate the homeassistant VMware virtual machine configuration file (.vmx). Right-click > Open With > notepad.

Under the .encoding line, add the following code and save the file.

firmware="efi"

efi 1

Start the Virtual Machine

Select your VMThen, click Play Virtual machine or click the green triangle at the top of the window.

If you see this message, click OK.

yes

If everything is successful up until this point, you should see the Home Assistant login screen with some IP addresses.

Onboarding Home Assistant

Once completed, you will be able to reach Home Assistant on homeassistant.local:8123. If you are running an older Windows version or have a stricter network configuration, you might need to access Home Assistant at homeassistant:8123 or http://X.X.X.X:8123 (replace X.X.X.X with your’s IP address as shown for IPv4 Addresses in the image above).


How To Add Zigbee Support

You can just connect your zigbee stick to your PC, and it should be detected like so:

How To Add Bluetooth Support

You can just connect your Bluetooth dongle to your PC, and it should be detected like so:

That’s it! You have successfully installed Home Assistant on Windows using VMWare.

Hope that helps.

4 Likes

I’ve toyed off and on with using VMWare for HA over the past year or so and recently decided I was ready to migrate away from the rPi because my system is getting slower and slower. The VM works quite well but there’s one thing that is stopping me from finally migrating that I discovered this weekend: bluetooth doesn’t seem to work with HA under VMWare. All my BT stuff stopped working, even though I have the dongle attached and associated with the VM and HA doesn’t detect the adapter at all, even though it’s a standard TP-Link BT dongle that works great under rPi and is supposed to work on PC and Mac as well.

Have you encountered this?

Thanks for the input. I haven’t encountered that Bluetooth issue, but I know many folks are experiencing problems with Bluetooth dongles in Home Assistant. Have you considered using an ESP32 Bluetooth Proxy?

The Bluetooth Proxy is designed to connect to your Home Assistant instance via Wi-Fi and provide Bluetooth support. It might be a potential solution for your Bluetooth dongle issue. I have personally had great results using it.

Funny enough I made a video about that:

Or the blog post,

This is the official documentation of ESPHome.

I hadn’t really considered that, I had read about the BT proxies but had not yet dove deep on the topic, but they actually make sense given that my further-away BT devices do struggle to stay “available” in HA and I do have quite a few spare ESP32’s sitting around, I’ll give that a shot.

It would be nice for the built-in to work since a couple of my BT devices are within 5-10 feet of my HA server.

Thanks for the recommendation!

I totally agree, it’s annoying bluetooth dongles are kinda flaky.

Creating a Bluetooth “mesh” network using Bluetooth Proxies is one of its great features,
Sure thing, i hope it will solve your dongle issue.

I’ve added one of my ESP’s as a bluetooth proxy and the install was dead simple. Should it also appear as another BT device on HA or does it do its thing silently? Should I remove the two existing BT adapters and run exclusively on the proxy?

Yeah right? it sounds much more complex than it really is.

It should be added as an ESPHome device and start doing it’s thing,
I guess you should try and check what works best for you, but I would give it a try running with all 3,
I ran the proxy exclusively.

Here’s some extra credit setup info.

Setting Up USB Autoconnect

  1. Shut down your HA VM.
  2. Navigate to your the folder where your VM lives.
  3. Open the vmware.log file in the text editor of your choosing.
  4. Search for the USB device you wish to automatically connect to the VM. You should see a line similar to this.
  5. Go back to the folder and edit the VMX file for your VM.
  6. At the bottom add this line for the device(s) to auto connect. The name should be the name from the log file. If you need more than one device, just increment the number after ‘device’.

usb.autoConnect.device0 = "name:###name from log file####"

image

  1. Start your VM back up. The devices should auto connect and show up under Settings → System → Hardware → All Hardware

Setting the VM to Start With Windows

  • Create a batch file
  1. Navigate to your VM folder (really any folder will work).
  2. Create a new text file. Name it whatever you’d like, just change the file extension to ‘.bat’
  3. Paste the following line.
"C:\Program Files (x86)\VMware\VMware Player\vmrun.exe" -T player start "###full path to VMX file###" nogui

It should look something like this

(NOTE: I have the VMware folder in my path variable, so I don’t have to list the full directory location; if you haven’t done this or don’t know what it is, just use the text from above)

  • Schedule the Batch File to Run at System Start
  1. Open Task Scheduler:
  2. From the Action menu, select “Create Basic Task”
    image
  3. Name it whatever you’d like and click Next.
  4. Select “When the computer starts” as the trigger.
  5. Leave the action set to “Start a program”
  6. In the “Program/script” field, navigate and select the batch file created in the previous section:
  7. Tick the box to open properties and then click finish.
  8. Under security options on the “General” tab, change to “Run whether user is logged on or not”
  9. Go to the Triggers tab. Right click the trigger and select edit. Tick the delay task option and set to 1 minute.
  10. Go to the “Conditions” tab. Untick “Start the task only if the computer in on AC power”
  11. Go to the “Settings” tab. Tick “Run as soon as possible” and untick “Stop the task if it runs longer than:”
  12. Hit OK, then provide your Windows password when prompted.

Reboot and verify that HA starts with Windows.

6 Likes

Well done! :+1:

2 Likes

Hi I got stuck at the step where I need to add what type of firmware it is due to VMXF file is different in my case here is a screenshot


I am running vmware version 17.0.2 build-21581411 on windows 10 64bit machine
Any suggestions what I might be missing?

You should be editing the vmx not the vmxf file.

@FriedCheese thank you so much for this guide. So, what happens when the Host OS, Windows, shutdown or reboots? Home Assistant VM will not shutdown safely; and, may break the VM.

There should be a respective automated shutdown request via command-line; which can’t be done by the Windows Scheduled task. I’m guessing its possible to do this via NSSM - the Non-Sucking Service Manager to launch the batch file you created, although I don’t use that. I use AlwaysUp instead, which I know for sure allows to add the respective shutdown command:

Home_Assistant_shutdown.bat

vmrun.exe" -T player stop "E:\VMWare\Home_Assistant\Home_Assistant.vmx nogui

If I’m not mistaken, stopping a VM is the equivalent of pulling power.

I never really solved this problem. With Windows Pro, you can set a shutdown policy to run a batch file during shutdown. I had one setup to ssh into HA and run a clean host shutdown, but it never worked really worked well. I think there’s a timeout after the script is called and that was shorter than the time it would take HA to fully shutdown. I tried adding a delay to the script but didn’t really test it. I ended up moving everything to a Proxmox setup where it’s not a concern.

I know exactly what you mean. I’ve setup mine with AlwaysUp (to handle startup and shutdown), when Windows wants to shutdown, it triggers the AlwaysUp-Home-Assistant service to shutdown… which triggers the shutdown script I just posted. However…

I now have very good reason to believe that the shutdown script doesn’t shutdown Home Assistant in time before the OS shuts down. In my case, this happened so many times that it eventually broke Home Assistant VM’s containers.

I wish I had seen the below URL sooner. I just noticed it. It shows 2 different solutions to make the OS wait long enough for the Home Assistant Windows service (created by AlwaysUp) to shutdown. I don’t think there is any other way. If you come up with a different solution that works, please post here. I will also do the same after I test this solution:

How Do I Give my Windows Service More Time to Stop During Shutdown? | The Core Technologies Blog

Great article, easy to follow, thank you !
I wanted to share an experience on VMWare upgrade for reference. I upgraded VMWare Player from 16 to 17 yesterday. VMWare popped a message saying a new version was available. I clicked and installed version 17 from that notification. After restart, my HA instance got stuck. It took me a while to find out HA didn’t get an ipv4 address anymore after the VMWare restart. I tried different commands, without any luck.
The only thing that helped was to fully uninstall VMWare Player, reboot, and install VMWare Player 17 again. After that, HA received an IPv4 address again.
Hope this helps for anyone with this issue in future.

1 Like

I’m glad the article was helpful, and thank you for sharing your experience, which will surely help others!

I followed this guide, the only thing is that my sonoff 3.0 zigbee plus dongle isn’t recognized automatically
in Windows i see the device as a Silicon Laps CP210x device, and when i manually connect is to the VM i get an error in the message log: Driver error, is ther a solution for that error?
kind regards.
Alfred

Good guide for setting up HA on VMware. Thanks @SimplySmartHouse and @FriedCheese :slight_smile: I was running HAOS as vm on VirtualBox (Windows host) for almost 2.5 years before switching to VMware Player 17 (free version) around middle of 2023.

One additional note about VMware is that size of virtual disk (vmdk file in Windows host) keeps growing… see this discussion for remedy: VMWare Tools to shrink disk / reclaim unused space - #9 by faster777

For those running HA on VirtualBox I will add that once in while VMware may need additional manual maintenance (like shrink/compact disk), its still much more stable and long-running on Windows host. This makes VMware much much easier to manage than the constant monitoring and baby-sitting of the VirtualBox vm that is prone to memory issues, crashes and regular restarts/cycle every few days!

2 Likes

Thanks a lot for this guide - changing the firmware to “efi” is the key information here that did the trick for me.

I agree. For me VMware is much more stable and an added benifit is that I run completly wireless without any issues on vmware including sunning a scrypted server and 4 cameras inside hass with no issues. Trying that in virtualbox will make you want to throw your pc against the wall because hass keeps disconecting.
Also @SimplySmartHouse great write up on setting up VMware!! For thaose that want to convert from virtualbos to vmware or just create a clean VM, create a complete hass backup and save it on your pc. Install hass on your vmware vm as decribed above(10 min) and then durring onbording select import backup and dang it is all done. Super fast and easy