Skip to content

Instantly share code, notes, and snippets.

@pldmgg
Last active May 19, 2020 23:43
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pldmgg/4735b5502b11c6fb867ac87b17bf3ed9 to your computer and use it in GitHub Desktop.
Save pldmgg/4735b5502b11c6fb867ac87b17bf3ed9 to your computer and use it in GitHub Desktop.
Home_Assistant_Migration_to_HassOS_VM
##### Make a Snapshot of your existing HA implementation #####
- In the Home Assistant dashboard, navigate Supervisor -> Snapshots. Give the resulting .tar file a name, make sure "Full Snapshot" is checked, and then click "Create".
- Download the resulting snapshot .tar by clicking on it and selecting "Download"
##### Download your preferred virtual appliance containing HassOS #####
- From here (under the "As a virtual appliance" section): https://www.home-assistant.io/hassio/installation/
##### Deploy the VM #####
- How you deploy the VM depends on what hypervisor you're using, so I'm not going to cover that here.
- Whatever hypervisor you use, make sure the VM automatically starts when your host OS starts
##### Wait for HassOS to come online #####
- Once HassOS is online, we're going to do the bare minimum to get it to the point where we can restore the snapshot we took earlier, so...
- Go through onboarding and create a new admin user
- Go to your Profile and toggle on Advanced Mode (we're doing this so that we can actually see all Add-Ons in the Add-On store)
- Navigate Supervisor -> Add-Ons and install and turn on the Terminal & SSH Add-On
- SCP your snapshot to /backup/my_full_snapshot.tar in the VM (technically the container within the VM, but anyways...)
- Navigate Supervisor -> Snapshots and click the refresh circle on the upper-right (refreshing the page in your browser does NOT work, so make sure you use the refresh/reload circle on the upper-right within lovelace)
- Do *not* restore the snapshot yet!!!
##### Tear down your existing Home Assistant implementation #####
- This depends on how you installed it in the first place. Since I did the docker installation (with supervisor) on Ubuntu (https://github.com/home-assistant/supervised-installer) I did the following to wipe it all out:
sudo systemctl disable hassio-supervisor.service
sudo systemctl disable hassio-apparmor.service
sudo rm -rf /etc/systemd/system/hassio-supervisor.service
sudo rm -rf /etc/systemd/system/hassio-apparmor.service
sudo rm -rf /usr/sbin/hassio-supervisor
sudo rm -rf /usr/sbin/hassio-apparmor
# View all of your docker containers
docker ps -a
# Delete the ones associated with Home Assistant - including the Add-On containers
docker rm -f <container_name>
sudo rm -rf /usr/share/hassio/
##### Do the Snapshot Restore #####
- Back in your fresh HassOS Lovelace Dashboard, navigate Supervisor -> Snapshots (if you're not there already).
- Click the snapshot you uploaded via SCP earlier and select "Wipe and Restore"
- In a few minutes, everything should be good to go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment