How To Install Home Assistant using VMware Workstation

by Danny
4 comments

READING TIME: 8 MINUTES

In this guide, I will show you how to migrate Home Assistant from a raspberry pi to VMWare Workstation 16 Player.

Or, if you don’t have Home Assistant installed yet, you can still follow this guide exactly as is. You just won’t have a snapshot to import; you’ll be starting with a fresh HA instance.

By the end of the guide, you will be able to create a VM in VMware, download and attach the Home Assistant .vmdk image, move your zwave/zigbee dongle to your Windows computer, and then restore Home Assistant from your last snapshot.

After I migrated, I didn’t have to fix a single wifi, Zigbee or zwave js device. Everything just worked – and actually worked better than before. Home Assistant restarts now takes less than a minute (instead of 5), and all of my z-wave issues have finally gone away.

Let’s get started!



Prerequisites:

This guide assumes you already have Home Assistant installed and running.

For reference, I migrated from a raspberry pi 3B+ on an SSD and am using a Nortek GoControl zwave/zigbee dongle.

It’s important to note that VMware Workstation Player 16 will only run on Windows 10 PC, version 20H1 or higher. I had planned on installing on my Windows Server 2019 server, but since Hyper-V was already running and in use, I wasn’t able to and had to install this on my primary Windows 10 desktop pc.


Pre-Setup

Take a Home Assistant snapshot and download it your PC. If you are using the Home Assistant Google Drive Backup integration, you can download your backup from Google Drive later on.


Step 1: Download VM Workstation Player

Download VMplayer from here: https://my.vmware.com/en/web/vmware/downloads/details?downloadGroup=WKST-PLAYER-1611&productId=1039&rPId=63655

If using Windows 10 PC as a host, select the 64-bit Windows Operating System.

Then, install VMware Workstation 16 Player with all defaults. On the custom setup screen, check the box for Enhanced Keyboard Driver.

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

Continue with the install until complete. Then, it’ll prompt you to reboot your PC.


Step 2: Download Home Assistant .VMDK image

Download the Vmware Workstation (.vmdk) image from here: https://www.home-assistant.io/installation/windows

The file will be download as a file with a .xz extension which needs to be extracted. To extract it:

  1. Download 7zip.
  2. Right-click the hass_ova-5.12.vmdk.xz file you just downloaded > 7zip > Open Archive.
  3. Then, click Extract. It should extract to a .vmdk file.
  4. Rename the file to something like homeassistant.vmdk, and place it into a directory where your VM will live (C:\HomeAssistant)

Step 3: Launch VMware Workstation 16 Player

Search your computer for VMware Workstation 16 Player and open. Select the free for non-commercial use option.

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.

Give your VM a name (like homeassistant) and select the folder you created in Step 2.

A message will pop up like below. Select Continue.


Store it as a single file, and set your storage size. I chose 20gb.

On the next screen, click Customize Hardware. Memory and CPU can be specified to whatever you want (1gb of RAM and 1CPU is recommended), but the network adapter needs to be set to “bridged” mode.

  • Memory: 2048
  • CPU: 2
  • Network Adapter: Choose “Bridged”

Your VM should now be created.


Step 4: Edit VM Settings

Navigate back to the C:\HomeAssistant folder. You will now see two .vmdk files:

Delete the homeassistant-0 one (the newly created .VMDK), and rename the homeassistant one to homeassistant-0 (this is the extracted image you downloaded).

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"


Step 5: Start the Virtual Machine

Then, click Play Virtual machine or click the green triangle at the top of the window.

If you see this message, click Yes.

Download and install VMTools. I’m not entirely sure if this was necessary, but I did it anyway:

If everything is successful up until this point, you should see the Home Assistant login screen in a command window like below.

The default username is root. Logging in will show you your IP address of your new HA virtual machine. In my case, it is 192.168.68.128. It’s not necessary to login if you can get your IP from your router.

At this step, you should be able to navigate to http://192.168.68.128:8123 in a web browser. The HA gui will state that it may take up to 20 minutes to complete, but in my experience it took less than 5.

While you are waiting, remove your Nortek GoControl zwave/zigbee USB stick from your raspberry pi and plug it into your Windows 10 PC that has VM Workstation Player installed. Windows should detect it automatically and install all necessary drivers.

The VMware VM should automatically detect it as well:

Once the “it may take 20 minutes to complete” screen goes away, you will see the New User Account screen like the screenshot below. I am restoring from a previous snapshot, so I’m going to choose Alternatively, you can restore from a previous snapshot.

After restoring from snapshot, you may notice all of your wifi devices work – but zwave and zigbee devices don’t. This is because we need to “attach” the Nortek USB dongle to the vm (referred to as USB passthrough).

To do this, on the VMware Player window, select Player > Removeable Devices. There should be two Silicon devices.

Click each of them > Connect.


Testing It Out

If all has gone well so far, you can now test things out. Toggle a few lights, switches, and motion sensors. If you have any secure nodes, like a smart door lock, you should test those as well.

The last thing you’ll need to do is either the change the internal IP address in your Home Assistant Mobile app (under App Configuration in the sidebar) or change the IP address of your VM to the old IP address.


Wrapping Up

All in all, I spent entirely too much time trying to figure out all the nuances of getting this working, particularly extracting the .vmdk file, deleting the old .vmdk, and then discovering that I needed to edit the .vmx file to allow it to secure boot.

So, I decided to document each step of the process as I went, with the hopes that it’ll help someone else out who is looking to migrate or fix their zwave issues. Like I said, everything just worked, and I didn’t have to reconfigure or repair a single device after migrating to Vmware.

If you get it working after following my guide, let me know in the comments!


Additional Steps (optional)

Click this link to run VMware Workstation 16 in the background and automatically after restarting.

Or, if you want to automatically connect your USB dongle to a VMware Workstation VM.


My Favorite Home Assistant Devices

Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.

The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.

4 comments

You may also like

4 comments

David April 23, 2021 - 2:58 pm

Many thanks for taking the time to write all this down. I would never have worked it out for myself. After following your guide ti started first time and works great on the VMWare Player.

Reply
Danny April 23, 2021 - 2:59 pm

That’s great! I’m glad I could help you out.

Reply
Fredick May 5, 2021 - 6:55 pm

Finally one for Workstation Player, and it was so in-dept and did not leave anything out, big thanks for this 😀

Reply
Danny May 5, 2021 - 7:39 pm

You’re welcome! I’m glad it helped you out. That’s the main reason I wrote it – because I couldn’t find any guides anywhere else 🙂

Reply

Leave a Comment