How to use the vmdk in VirtualBox on Mac?

Why are you bothered about using hassio.local, that’s only really for noobs who don’t know the IP address of their device. You’re past that now, start doing the interesting stuff :slight_smile:

I tried for ages to get this to work using VM Fusion but got no where, tried VirtualBox and it worked straight away. Only issue I have is I originally used Bridged network which worked fine but uses a different IP to the host device, I’ve changed to NAT but not sure what to put in the Port Forward options as they’re both on the same device?

I would like to get this to work not necessarily because I want to access it as hassio.local, but samba uses the same service to advertise itself on the network, which does make my life a lot easier. But I have not installed that add-on yet, because I figured getting the stock vmdk to work fully would be a good first step.

My current “production” setup is a manual install on an odroid c2, but would like to switch to virtual box on a spare mac mini that is already acting as a server for some other stuff in the house.

In the end I will access the frontend through a dedicated domain I have setup on my static ip the ISP gives my modem :slight_smile:

If you’ve already got an instance of HA on your network you won’t get hassio.local to work as you now have two things advertising themselves as the same thing.

Any help on the port forwarding appreciated?

If you are using NAT, rather than a bridged network, you probably need to forward the ports for mDNS to get it work.

No, that’s not the case as the two instances are on separate networks

I haven’t got port forwarding working for mDNS yet, although I tried forwarding both TCP and UDP ports 5353 from host to guest, but no luck yet. Maybe the other way around is (also) needed, but I won’t have time to work on it for a while, so probably later this month. Please share if you make any progress

I have the Virtual Box Hassio image working , but cannot figure out how to get a working ip address. Should I use NAT or Bridged?

If nat do I need to use port forwarding?

I used bridged. I think you need that to get an independent address on your network.

1 Like

if using NAT, you specify port forwarding in the VM settings in the VirtualBox frontend. You guest machine (the VM) gets an ip address of 10.0.2.15 and you basically forward any incoming ports from the host (127.0.0.1) to the guest (10.0.2.15). See this link for more details: http://ask.xmodulo.com/access-nat-guest-from-host-virtualbox.html.

For example: you host (the one running virtualbox) has IP 192.168.0.12. Your VM with home assistant gets IP 10.0.2.15. You setup port forwarding in virtualbox settings for the VM so that localhost 127.0.0.1:8123 forwards to 10.0.2.15:8123. Then, restart/startup the VM. Once completed, you can access home assistant on the host machine from 127.0.0.1:8123. And you can also reach it by using the hosts lan ip: 192.168.0.12:8123.

When using bridged mode, your guest machine (the VM) requests an ip address on the lan, similar to your host machine, so you can reach it that way, no ports are blocked then, so no forwarding needed.

HTH

3 Likes

Thanks for the help guys, great explanation, I got it working in bridge mode!

If anyone is doing this as a fresh install, to save yourself the headaches I’ve had getting USB passthrough to work, the current VDMK doesn’t support it out of the box BUT if you force update the Host System to 1.11 it works fine straight away.

After checking it works on my Mac I moved it across to my Windows 10 HTPC, restored the backup from my Pi3 and everything works perfectly with no changes in config after changing the reserved IP of the VM to that of the Pi it was on, including zigbee2mqtt sniffer which is what it couldn’t see initially.

It’s just like I didn’t change anything except for the massive increase in page loading speed on mobiles and really quick restarts etc :ok_hand:

1 Like

I’m experiencieng something similar to above comments.

Hassio VM on virtual box in bridged mode (MAC Address assigns IP from router on LAN 192.168.5.235)
All good and i can access it no problem. Everything works or at least it seemed to.

Now i have just manually removed my axis camera from my config as they were not appearing. Discovery as found them again but there getting the local loopback addresses of 169.254.x.x, which i thought was strange.

SSH into hassio - done ifconfig and eth0 is a 172 address, although reachable by my LAN address.
Seems strange

any thoughts?
thanks