Installation woes of HAOS with VirtualBox

I tried creating a Virtualbox VM with HAOS using the provided vdi & instructions

Instructions I followed:

The machine was created successfully but I CANNOT get a successful first boot. There’s no VRDE session established or IP assigned but Virtualbox reports the machine is running. I currently have other VMs running on this system so it’s not a virtualbox configuration.

Please note that this is a headless installation on Ubuntu Server 22.04. I’m happy to migrate to 24.04 if there’s any known bugs but Ubuntu 22.04 is still supported.

$VBoxManage --version
7.0.20r163906

Please let me know if there are any logs or other info that would be of use troubleshooting this issue.

Edit #1: Here’s my installation script. I deleted everything and remade it to make sure this was completely accurate (note: I removed working directory & VRDE password for sake of privacy, they are set in the script I ran):

# Download VM image
HAOS_DOWNLOAD="https://github.com/home-assistant/operating-system/releases/download/13.2/haos_ova-13.2.vmdk.zip"
wget $HAOS_DOWNLOAD

#unzip image
unzip "haos_ova-13.2.vmdk.zip"

#Setup values
thisVM="HomeAssistant"
vmGroup="Infrastructure"
thisHddPath="${baseVMfolder}/${vmGroup}/${thisVM}/${thisVM}.vmdk"

# Create VM
VBoxManage createvm --name="${thisVM}" --basefolder="${baseVMfolder}"  --groups="/${vmGroup}" --ostype="Linux26_64" --register

#Move disk to VM folder
mv haos_ova-13.2.vmdk  $thisHddPath


VBoxManage storagectl "${thisVM}" --name "SATA Controller" --add sata --controller IntelAHCI
VBoxManage storageattach "${thisVM}" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "${thisHddPath}"

# Known changes
## Bridged networking
VBoxManage modifyvm "${thisVM}" --bridgeadapter1 enp5s0

## VRDE (remote desktop)
VBoxManage modifyvm "${thisVM}" --vrde on
VBoxManage modifyvm "${thisVM}" --vrdeport 3396
VBoxManage modifyvm ${thisVM} --vrdeproperty VNCPassword=**REDACTED**

## UEFI vs BIOS (stated in instructions on https://www.home-assistant.io/installation/alternative)
VBoxManage modifyvm  "${thisVM}" --firmware=efi

## HD Audio (stated in instructions on https://www.home-assistant.io/installation/alternative)
VBoxManage modifyvm "${thisVM}" --audio-controller=hda

If there is no VRDE session, then it is a VirtualBox issue.
This should be created before the VM starts up, so check everything again.

That’s why I included the information about other VMs running just fine, I don’t think it’s VirtualBox in general but likely a configuration with the specific VM. I probably won’t get a chance to clean up my commands to be a script until the weekend, but I’ll post the script when I do.

As promised, script is added to main comment. Please let me know if anything jumps out to you.

You are probably right that it is the configuration of the VM environment rather than HA, but what is wrong I do not know.
I avoid Windows hypervisors, because there are always fights with directly attached hardware configurations.

I was hoping there was some setting I was missing (like UEFI, except I got that one), that would be obvious.

Also, let’s not go throwing the “W” word around, this is hosted on Ubuntu Server. No Windows involved!

There is the requirement to disable secureboot.

Any chance you know how to do that in VirtualBox?

A quick search reveals a dated reddit post saying the way to switch off UEFI is to go to legacy/bios mode:
https://www.reddit.com/r/virtualbox/comments/o47un0/disable_uefi_secure_boot_in_virtualbox/

Looking at the manual the only mention I see (again from a quick search) is section 8.54 about modifying the signatures in the nvram file, which I think is the wrong path.
https://www.virtualbox.org/manual/ch08.html

Thanks for the link. TPM was the key phrase I was missing.

So translating the GUI walkthrough into CLI, I’ve added the following option:

--tpm-type= none

Unfortunately I still see no change. While they may have helped, there’s still some other issue going on.

TPM should be independent of SecureBoot.

Oh? It sounded like they were related, but if it’s not TPM then we may be in trouble.

This section looks promising but I don’t see anything that jumps out:

8.54. VBoxManage modifynvram

Further a post on virtualbox forums from about 18 months ago seems to imply that turning it on requires a few non-obvious cli commands since there’s no cli argument to just “check the box” (or in our case uncheck).
https://forums.virtualbox.org/viewtopic.php?t=108173

Regardless, it seems that Secure Boot SHOULD be off by default.
That said, the difficulty in telling is quite frustrating.

I’ll have to post on Virtualbox forums about this to see if they have any more insight. Also, given how difficult this is getting, I could potentially try to get it booting on a system with a GUI (eg: so I can uncheck the checkbox) and export the VM to the server where it’ll live. But this seems EXTREMELY dissatisfying, and isn’t exactly friendly to replication.

Let me know what your thoughts on what approach you recommend, as I appreciate your continued help.

I do not work enough with VirtualBox to make suggestions about it.
I prefer an EMU-based hypervisor on Linux, like Proxmox or QEMU, which HAOS also have guestOS services installed for.

Understood, I’ve changed my network a lot since I last decided I needed Virtualbox & have been considering trying something KVM based on the next server to see if I can break free.

However I won’t migrate until I get another server to start fresh on, and I was hoping to get Home Assistant up and running before that.

I appreciate the help. Thanks.

Have you looked into the options for the storagectl command?
https://www.virtualbox.org/manual/ch08.html#vboxmanage-storagectl

I admit I was thinking about Motherboards & CPU as we were discussing UEFI, so I wasn’t specifically looking at storagectl. I did set it manually to Sata Controller, specifically --controller IntelAHCI

If you’re thinking that’s wrong it may be worth investigating, but I’m not sure which subset is worth looking at:
BusLogic, I82078, ICH6, IntelAHCI, LSILogic, LSILogicSAS, NVMe, PIIX3, PIIX4, and USB.

I was also thinking about the bootable option. It does not say what the default is however, so it might be off as standard.

Also the bus type could be interesting.

Just created the VM on windows and it worked fine. Exported it to Linux and it’s acting the same way (despite other VMs working just fine on the Linux system).

The host machines are vastly different, so it’s not exactly a fair comparison. I can certainly go through the bootable option as well as bus types. See if anything interesting happens.

A good hypervisor should abstract the underlying hardware completely from the GuestOS, so the fact that you can not move the VM without issue sounds weird.

Strongly agreed, I’m hoping there’s some config that wasn’t transferred correctly, or windows/linux require different settings for something like CPU virtualization. But it does feel like it defeats the point of a hypervisor a bit.