HA installed via qcow2 to QEMU/KVM - how to change IP settings?

Have HA up in a VM. At the HA server command line, net info shows IP information I need to fix. I can’t figure out the syntax to change the address, dns and gateway settings.

I can’t use the web interface since the server’s IP info is wrong for my network.

Tried searching for the correct syntax but came up empty.

By trial and error, I managed to get the NIC IP information set up so that I can hit port 8123 on the HA server.

I did :
net update enp1s0 --ipv4-address 192.168.1.104/24 --ipv4-gateway 192.168.1.104 --ipv4-method static --ipv4-nameserver 8.8.8.8

Now I can http into the HA system and I get an error report as follows:
[supervisor.store] Can’t add repository GitHub - esphome/home-assistant-addon: ESPHome Home Assistant Add-on due to ‘GitRepo.clone’ blocked from execution, no supervisor internet connection

That’s probably because net info reports:
docker:
address: 172.30.32.0/23
dns: 172.30.32.3
gateway: 172.30.32.1
interface: hassio

net update hassio yields :
Error: Interface hassio does not exist
net update docker yields :
Error: Interface docker does not exist

These are phony non routable addresses. Is there any way to get at the underlying Linux O/S so I can use normal Linux commands to see and fix things?

Eventually, the HA Welcome! screen shows up to “CREATE MY SMART HOME”.

Your gateway looks wrong, would normally be your routers IP, that would stop it talking to the internet.

I know it’s wrong, or at least I suspect it’s wrong. The question is how to fix it.

I got into HA via the 8123 port from another box and added a Zigbee dongle and one switch as a test. It works fine. That proves the IP info I fixed via the net command worked to provide local access. That also proves the HA server can talk across the only NIC in the box.

What I don’t know about is can the HA O/S update itself via the supervisor given that the box reports the bogus IP addresses for what I assume is a back door for the O/S itself. You can tie several IP addresses to any given NIC. If it wants to talk across the “docker” IP then that’s never going to work.

My install is on a VM so I’d be interested in knowing what a VM or Docker user sees via the net info command. It’s the docker: information that has me concerned. An average user not running in a VM or Docker environment wouldn’t see what I’m seeing.

If you can access the GUI you can change the network settings under system —> network. The 172. Addresses are not bogus, it’s docker networking.

I’m going to put my notes, for what I did, here in case someone else wants to install HA in a VM environment. It wasn’t until I got deep into this that I realized Docker isn’t a requirement as many of the YouTube videos and documentation would lead you to believe. What’s required is a QEMU environment, of which Docker supports one, but it’s not the only one. I never installed Docker and yet, it works just fine from the end user perspective coming in via the 8123 port.

I spun up a test box with Ubuntu 22.04LTS and installed all the software required to allow it to support a hypervisor under KVM. Spun up a Windows 10, Fedora 39, another Ubuntu 22.04LTS via the VM manager and had all these OS’s running fine simultaneously on the one box as a stress test. Then I installed HA in another VM while those others were still up and running.

Installed HA into a KVM virtual machine following these instructions from : Linux - Home Assistant . The file it wants to use is the exploded version of the qcows downloaded file, not the actual downloaded file. Explode it first.

Only wrinkle during install was when picking the firmware last item in the list. It corrupted the xml file by entering the same information twice. I got rid of the second version and the install worked. Once it was up, the networking information is wrong because it can’t possibly know about my network.

Used :
net update enp1s0 --ipv4-address 192.168.1.104/24 --ipv4-gateway 192.168.1.104 --ipv4-method static --ipv4-nameserver 8.8.8.8 (Use your values in place of mine)
to reset the NIC information except that the DNS entry didn’t update. I think that’s an HA bug. Tried --ipv4-nameservers (plural) but that produced an error because the plural isn’t a legitimate option.

Thereafter, I could hit the HA port 8123 and got an error log report that shows:

[supervisor.store] Can’t add repository GitHub - esphome/home-assistant-addon: ESPHome Home Assistant Add-on due to ‘GitRepo.clone’ blocked from execution, no supervisor internet connection

However, that was before I noticed that the single DNS address I provided never got updated. The net info command shows DNS to be empty for the actual NIC.

Doing a net info yields:
docker:
address: 172.30.32.0/23
dns: 172.30.32.3
gateway: 172.30.32.1
interface: hassio

net update hassio yields :
Error: Interface hassio does not exist
net update docker yields :
Error: Interface docker does not exist

A while later, the error report just disappeared (I didn’t do anything) and the HA Welcome! screen was up.

I registered myself and was able to get into the system. Used Settings/System/Network/IPv4 to enter DNS information and Save it.
All attempts to download logs produces a zero length file.

Added the Zigbee dongle and a ThirdReality Smart Plug to HA and successfully controlled that plug from inside HA.

That’s as far as I’ve managed to get so far.

I suspected that non routable IP information was for O/S internal use only, but still don’t know if it intends to use it for supervisor update purposes. I never installed Docker but HA works because it’s really a QEMU environment that’s the real requirement, as far as I can tell.