Restoring configuration from bricked VM

Hi!
I was updating things on my Ubuntu server. I have Home Assistant Core on a Home Assistant OS VirtualBox VM running on the Ubuntu host. I updated the Home Assistant OS by clicking the update button in the app on my phone, and when I thought it finished, I updated and rebooted the host.
Since this, my Home Assistant server is unavailable and I can’t figure out why. I’m beginner with Linux and with VirtualBox so I have no idea what I’m doing, I just try to follow blog posts. This is what I used to set up my Hass: Install Home Assistant OS with VirtualBox on Ubuntu headless (CLI only)
It has been working perfectly for the past ~6 months. I have so many devices, dashboards etc configured etc that I don’t want to start over.

This is the description of the issue:
There are no error messages on host boot. The VM is configured to auto start on boot.
VirtualBox shows no running VMs with vboxmanage list runningvms
I can not start the VM with vboxmanage startvm homeassistant
The error is:

VBoxManage: error: The machine ‘homeassistant’ is already locked by a session (or being locked or unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee nsISupports
VBoxManage: error: Context: “LaunchVMProcess(a->session, sessionType.raw(), ComSafeArrayAsInParam(aBstrEnv), progress.asOutParam())” at line 728 of file VBoxManageMisc.cpp

I can stop it with either

x@home:~$ vboxmanage controlvm homeassistant poweroff
0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

or vboxmanage startvm homeassistant --type emergencystop
Then I can start it again witho no errors.

x@home:~$ vboxmanage startvm homeassistant
Waiting for VM “homeassistant” to power on…
VM “homeassistant” has been successfully started.
x@home:~$ vboxmanage list runningvms
x@home:~$

However, it won’t show up as running vm, pinging the IP will not get a response, and I can’t connect to the Home Assistant server in the app or browser.

I’d be really grateful for any advice on how to get my setup back. It created a backup before the update, but I think it’s on the VM drive. I guess I could set up Core on a new VM and try restore backup from the old drive, but I don’t know how to do that.
Thanks in advance!

Hi Doug, welcome to the forum!

It’s either HA Core or HA OS and throwing Hass in it doesn’t make it easier to figure out what you are running.
You write that you are a beginner with Linux: strange that you have chosen to run Ubuntu with VirtualBox on top of it to install HA. Is there a particular reason for doing that?
How come you didn’t just install HAOS on your system?

If you have no virtual machine(s) running, it’s impossible to reach/ping your HA.
Do you have backups which you can use?

It’s either HA Core or HA OS and throwing Hass in it doesn’t make it easier to figure out what you are running.
-Sorry if I misuse the nomenclature. In the app, there are two things shown that need to be updated: the OS and the server. I was assuming that the Home Assistant OS is running the Home Assistant Core, is that not the case? I didn’t know Hass stands for anything, I was just lazy to type Home Assistant every time.

You write that you are a beginner with Linux: strange that you have chosen to run Ubuntu with VirtualBox on top of it to install HA. Is there a particular reason for doing that?
-Yes, This is what the Home assistant “getting started” page suggested for linux (Linux - Home Assistant). I also wish there was a more straightforward version, e.g. to run it as a service on the linux machine, skipping the VM step.
How come you didn’t just install HAOS on your system?
-I can’t have a dedicated physical machine running 24/7 for every service. If I installed HAOS on the physical machine, I can’t use it for anything else.

If you have no virtual machine(s) running, it’s impossible to reach/ping your HA.
-Yes. What I’m trying to understand, is why is it not running and how to get it running. pinging it is a way to detect/confirm it’s not running.
Do you have backups which you can use?
-Yes, presumably, on the virtual disk image, and I don’t know how to access that. I tried mounting it or converting it to .img and neither worked.

Thanks for getting back to me!

There is. Use docker container. Maybe it will be hard to start with it but when you get some essentials it is very easy to run home assistant in docker. I use docker compose and most of the time is fire and forget.