How do I migrate my configuration from Docker to a VM?

Are you asking this for HA Blue or your old installation?

Of course the blue. As I said, I stopped the old docker core-container, took my old config to the stopped blue with active samba.

Can you SSH into the Blue after stopping the core?
You can use the ha command to start the core by typing ha core start.

Or just restart core from the supervisor menu
Nevermind, no UI

Does this answer mean, that I cannot do this without SSH? O.k. fine. That was my question.

My assumption before, was if there is a stop, there is somehow a start as well. E.g. that HAOS provides the framework (with still alive UI part, even if I stop the core part) to start and stop in core part, the supervisor, the …

If I can only stop restart in UI and only start in SSH, fine for me.

So, without the bad idea to pull the plug, SSH is the only way to start again, after stopping in UI in the Configuration - Server controls.

Grrr. Restart is only possible, when it is running, isn’t it?

But I had to stop, so that the files are not in usage (e.g. db, …) to copy the old files to the new place. At least, I thought, that this is the cleanest idea.

Exactly. And my topic. :wink:

Yes. You can set SSH & Web Terminal addon first. Then, try to use the command line if possible. If you are sure you can SSH, then proceed with the migration process.

For HA Blue (which also my setup), if you stop ha host, then you’ll have no option but to plug the power cable and insert it again.

Goodluck and enjoy HA Blue :slight_smile:

Found this when trying to do my own migration. Spent some time before I realized that ~/config is a symlink to /config. Deleting the folder and recreating does not give the desired result. First stop ha core with “ha core stop” in the console of the VM. Then delete the content including hidden files from /config over SSH. Finally place your copy of the config files in the folder /config including the hidden files (still using SSH). Reboot the entire VM. After reboot I had to go through some preference settings again (seems they might be stored client side in the browser?) but my setup is there including integrations.

Figured I would save the next guy the trouble of finding this out the hard way :wink:

Hi All

I am trying to do exactly the same thing. I currently have a docker “Home Assistant Container” isntallation that uses a network share to load it’s configuration. Can I use the same network share (that is backed up and versioned and so on) with the VM?
What I am hoping to do it setup a VM and then just point it at my existing configuration folder and have it use the config there.

Thanks

No, the VM doesn’t support that.

1 Like

this did the trick for me once I learned how to stop the core, I used the console and stop core, copied the files after enabling hidden files, then start core and everything came back the way I liked it.

I know these seem simple but coming from a docker container it isn’t something you do/ can do

Throwing in some quick notes here with a +1 that the config copying seems to work fine. What made this quite easy for me was quickly setting up a Samba share for both the VM (via add-ons) and the original server’s docker compose config directory I had. This let me copy over the config files lazily (after running ha core stop on the vm) using windows network shares.

I did notice that the .storage directory had some permissions issues (probably due to how my docker compose was set up) so I did need to temporarily chmod 777 things before trying again and succeeding.

Once everything was copied over i did an ha core start to make sure things were okay, but also erred on the side of caution and went with a VBoxManage controlvm homeassistant reset just in case before actually logging in. Everything seemed to work immediately, including me needing to use the original HA user’s password i’d set up (so don’t forget that!).