Hass.io not restarting. Vitrualbox+Ubuntu server on Win10

Hi,

Ive been using the past few days to try and set up home assistant on an always on PC (used for Blue Iris).
The problem i have is that every time i restart the pc, i cant get home assistant to work again. So i must redo the whole install process in order to access ha again, which is then a fresh install without any of my integrations or entities…

I run the PC on WIFI (if that makes any difference) with Ubuntu server installed in Vitrualbox.

Yes, im a total beginner, so im probably doing something obviously wrong.

Thankful for any input!

Are you manually restarting Windows, or is it rebooting on its own?
If you are doing it manually, I would highly recommend doing a clean stop of HA and shutdown of the Ubuntu VM prior to rebooting Windows.

Hi, have I understood correctly that you’re running hass.io on Ubuntu via virtual box on win 10?

If that’s the case is there any reason you didn’t just use the VDI build of Hass directly on virtual box?

I do that and it works flawlessly. I have a script that runs on start up of Windows that starts the Hass VM headlessly. No issue with exposing USB devices to Hass either.

1 Like

I had some problems where the pc changed its network device for some reason. And due to this, everything shut down.
After that, i could not access HA no matter what i did.
Ill have to look up how to make a clean shut down, not very familiar with anything of this right now.

Yes that’s correct.
Ive been following the advice that i found online as well as some youtube videos that were pretty easy to follow.
It seemed that using Virtualbox with ubuntu server and docker was the standard way of getting it on a windows pc. So this was the reason for using that solution.

I have not seen anything on installing a VDI build of Hass directly on Virtualbox. Is there a guide to setting it up with VDI?

Also, if i get it running, do you have a link to the script?

Update: I downloaded the VDI and started it in Virtualbox (after selecting “Enable EFI (special OSes only)”). I set up VM with linux and ubuntu 64.

The problem now is that i cant find any integrations or entities at all.

Thank you for the responses!

No-problem.

Download the VDI image. I’d recommend resizing the image prior to importing as resizing is HassOS will be a pain (Note: the recommended way to resize an existing hass.io installation is to perform a snapshot and then resize disk, reinstall hass.io and restore your snapshot) in my case i chose 32GB and that should be fine for getting started.

You perform the resize in Virtual Box prior to starting the machine:

Now you want to create the machine. These are the settings that work for me:

Network is bridged to one of the NICs in the host and my hass instance gets a static mapping from my DHCP server.

Now you’ve got the machine setup it should start and you can go through the installation. If you’ve got anything you want to take from your existing install make sure you have a backup (ideally a snapshot) so you can restore it in the new installation.

Regarding the script, it’s just a simple batch-file that runs when windows logs on. You could probably get it to run as a service but the machine I’m using is dedicated for hass and my unifi controller so it logs on automatically on power on.

The command to start the machine will be similar to:

“C:\Program Files\Oracle\VirtualBox\VBoxManage.exe” startvm HASS --type headless

To get to the startup folder on Win10 open the run dialog and type the following: shell:startup

Good luck and if you get stuck get in touch.

Ed

p.s one last tip, if you ever get a USB controller for z-wave / zigbee etc you can use the USB filter in virtual box to present it to hass:

1 Like

Wow! Thank you!!

Also, it seems i need to buy a new router to reserve an ip address from the DHCP. My current one switches every 24 hours when the lease time runs out… This might be the cause of many of my problems.

Ill get back to you when ive tried all your recommendations.

Thanks again!

Update: I have now got a running hassio for the past weeks.
Hue, smartthings Lifx and other devices have been connnected successfully.

However, im now trying to have zigbee though Conbee II stick.
There seems to be a problem with hass.io recognizing the port. Do you have experience with this?

Sorry about the late reply I didn’t get a notification until now.

Did you work it out in the end?

I don’t have the conbee myself but I do have the aeotech z-wave stick…

If you’re still having issues could you post a screenshot of your USB device filters from the VM config?

If you’ve done that you can verify the device is presented to Hass via the console, check the docs for the exact syntax.

Sooooo my win desktop power supply died on me and system shut down. I replaced the power supply and booted back Win10 immediately starting doing updates after the dust setteled I waited for my HA to start by headless but after 15 mins nothing so I opened the VB manager to see the following HASOS Vbox boot-loops - YouTube so i gave it time and yes I ate boot-loops for 24hrs+ any suggestions on how to recover other than a restored backup which i have but is 31 days old I’d rather be able to recover the current data if possible. thank you