Full guide here: https://smarthomepursuits.com/how-to-migrate-home-assistant-from-raspberry-pi-to-vmware-workstation/
I don’t often see HA users using VMware, but it has been nothing short of fantastic for me, so I thought I’d share my step-by-step guide of migrating from a raspberry pi to a VMware Player VM.
By the end of this guide, you’ll have created a VMWare VM, restored from snapshot, and then I have two additional guides at the end that will 1. automatically connect the USB dongle of your choice to the VM so it gets detected when the VM starts, and 2. automatically start the VM when your PC starts. This guide is for Windows 10 users, on Windows version 20H1 and above.
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: Windows - Home Assistant
The file will be download as a file with a .xz extension which needs to be extracted. To extract it:
- Download 7zip.
- Right-click the hass_ova-5.12.vmdk.xz file you just downloaded > 7zip > Open Archive.
- Then, click Extract. It should extract to a .vmdk file.
- 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 USB dongle 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 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.
Additional (but recommended) steps: