[Solved] VirtualBox becomes unresponsive on Mac

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
DivanD
Posts: 3
Joined: 15. Jun 2023, 18:39

[Solved] VirtualBox becomes unresponsive on Mac

Post by DivanD »

hi there

I am running home assistant on VirtualBox on a Mac, it runs great for a few hours, some 6 some 24 some 27. but at some point it just stops. On the browser it shows connection lost and I have to shut down the virtual machine and close VB and reopen it and start up the machine again. I set up notifications to notify me hourly that my system is operational, but somewhere it just stops.

please check the logs and let me know
Attachments
Vbox.log.zip
(21.49 KiB) Downloaded 16 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox becomes unresponsive on Mac

Post by mpack »

00:00:02.796545 Host RAM: 8192MB (8.0GB) total, 4001MB (3.9GB) available
...
00:00:03.071503 RamSize <integer> = 0x0000000166200000 (6 008 340 480, 5 730 MB, 5.5 GB)
00:00:03.071869 VRamSize <integer> = 0x0000000001000000 (16 777 216, 16 MB)
Oops! I'm surprised it worked at all.

I would reduce the VM RAM to 2048MB, and increase the graphics RAM to 128MB.

I also don't like that you're using a generic Linux template. I would suggest using the Debian template.

Final suggestion is to create the VM yourself. Judging from the log you seem to have downloaded someone else's VDI and then built a VM description to use it. That often leads to problems: the disk content is often intimately associated with the VM and VM platform it was originally part of.
DivanD
Posts: 3
Joined: 15. Jun 2023, 18:39

Re: VirtualBox becomes unresponsive on Mac

Post by DivanD »

All right

I changed the VM RAM, Graphics RAM and to Debian (assumed 64bit)

Will monitor it over the weekend and give feedback

But, I am quite new to VirtualBox and Home Assistant so have no clue what you meant by creating my own VM.
To my knowledge, to get HomeAssistant on Mac or Win I had to download that file and specific setup.

So what I did was add an image to virtual box and run, assuming that isn't the correct way...

Can you provide advice or "link" or anything to Run Home assistant on my own VM without losing all my data and setup I already set up in my current home assistant?
Last edited by DivanD on 16. Jun 2023, 19:59, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox becomes unresponsive on Mac

Post by mpack »

DivanD wrote: 16. Jun 2023, 19:58 To my knowledge, to get HomeAssistant on Mac or Win I had to download that file and specific setup.
I've never used HomeAssistant, tho I have an inkling of what it is. Assuming that ISO installers are provided to allow it to be installed on physical PCs, it surely can't be the case that downloading a VM is the only way to get it.

<Edit>Just checked. You're right, they don't seem to provide an ISO installer (why??), it is only available as images that you need to transfer to the boot drive of a PC or other device. Or download as a VM.

The intro docs seem to be rather vague on the underlying Linux too. I get the feeling that it's not based on a particular Linux distro, it's a custom Linux build based on Yocto or Buildroot or similar. That would explain the wide hardware support and the image based distribution method.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox becomes unresponsive on Mac

Post by mpack »

Ok, I just downloaded HomeAssistant to see how difficult it was to create my own VM around it. In fact it was easy.
  1. First, I downloaded the github HAOS x86-64 archive image: https://github.com/home-assistant/opera ... 0.2.img.xz.
  2. I unpacked this archive to obtain the raw disk image: https://github.com/home-assistant/opera ... 4-10.2.img.
  3. I used CloneVDI to convert this raw image to a VDI: "HomeAssistant OS.vdi". I also told CloneVDI to increase the disk capacity to 32GB.
  4. I created a "HomeAssistant OS" VM, based on Debian (64bit) template, 4096MB RAM (you can't afford that - stick to 2048MB), 128MB graphics RAM, EFI enabled, TPM disabled. I told VirtualBox not to create a disk for this VM.
  5. Outside of VirtualBox I moved the "HomeAssistant OS.vdi" file into the "HomeAssistant OS" VM folder.
  6. Back in the VM settings, I added the VDI as a new disk attachment on the SATA controller (required by HAOS - it can't boot from IDE).
  7. Started the VM, it booted to a login prompt. Note however that I have no actual use for HAOS, so exercising it beyond this was not practical. But it seemed happy.
DivanD
Posts: 3
Joined: 15. Jun 2023, 18:39

Re: VirtualBox becomes unresponsive on Mac

Post by DivanD »

Alright

1st, thanks for the assistance and guidance you provided to the extent of actually doing a home assistant install yourself.

Initially i tried all the changes as you suggested but it didn't solve the problem. At the end I created a backup of my HA and created a new VM just as you described.

Only challenge was that I had to use a Windows PC to use Clone VDI as suggested

Started up HA, and installed the backup. The system didn't froze or stop from there as before. Problem solved

Thanks again for the assistance

Feel free to mark the topic as solved and change the topic to something other users might find useful in the future
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: [Solved] VirtualBox becomes unresponsive on Mac

Post by mpack »

Thanks for reporting back.
Post Reply