Newbie questions, HA unreachable and no credentials for local login

Hi!

Actually I have some experience with Linux and running VMs (mainly VirtualBox, but also searching for besser alternatives), but HA is ruining my nervs.
Old laptop (ca. 2013) with a pretty good working freshly installed Kubuntu 26.04. I would use it as test server, so I'm actually sitting in front of my Windows machine with a web-browser and a SSH client. It's because at the moment I also want a GUI there for tests. I know that GUIs are taking much resources from the server.

So I'm trying to install like in the HA docs described (Linux -> KVM (virt-install)). At first there were some permission problems when running the cmd line showed in the docs (sadly no help in the docs with that). Somehow I manged to make it run.
The next problem is that I can't reach the web-interface. Nothing worked:
http://dnsname_of_host:8123
http://ip_of_host:8123

SSH login into the host works fine.
"virsh console haos" works in my SSH client when logged into the host. But I don't know what credential I should enter there, so I actuall can't do anything there. Couldn't find anything while searching the internet. So I can't look into the VM what IP it has. I know from Virtualbox that I can choose at the network settings like internal NAT or that it looks to the network like a additional network card. But I didn't found something like that in the HA docs.

How can I find out what the actual problem is?

Thanks.

If you just recently installed HA, i believe you have not gone through the “On-boarding” process, and therefore have no users created ( No credentials )

So, your SSH login is not to HA, but to your KVM in Linux ?
Are you able to distinct the 2 Linux/KVM &HA, or understand that You can’t ssh to HA without it’s IP, or without credentals

In Your KVM-Console you should be able to see the HA-CLI, where you also will find it’s IP
Currently noone actually are able to see/understand what you are looking at or have logged into

If you just recently installed HA, i believe you have not gone through the “On-boarding” process, and therefore have no users created ( No credentials )

Not possible since I can't reach it via web-browser.

So, your SSH login is not to HA, but to your KVM in Linux ?
Are you able to distinct the 2 Linux/KVM &HA, or understand that You can’t ssh to HA without it’s IP, or without credentals

In Your KVM-Console you should be able to see the HA-CLI, where you also will find it’s IP
Currently noone actually are able to see/understand what you are looking at or have logged into

Sorry, I don't unterstand that, probably because things are different here from what you expect. Like I already said: Kubuntu 26.04 on host (physical hardware). Then I did the stuff from the HA docs (Linux -> KVM (virt-install)).
On the Win machine, I start a SSH client connecting to the host (not the VM). Inside the SSH client it looks like that when I'm trying to find out the IP of the VM:

ha@b-ha-p845t:~$ virsh console haos
Connected to domain 'haos'
Escape character is ^] (Ctrl + ])

homeassistant login:

-> No matter what I try, I can't login and I couldn't find anything how to login there. So what do you mean with "HA-CLI"? I can imagine that it's a special command-line interface to only interact with HA (not exactly the stuff I have e.g. in my SSH client). But I can't find something like that.

Thanks.

Right , as i mentioned ( You have no user-credentials )
KVM is not the most intuitive VM-Manager and instead of ssh into it, it would be easier if you use a browser to access your Linux and the KVM’s grafical manager ( or directly on your Linux desktop, where i assume you have the KVM-Manager installed )

How ever, skip the login
try to type
ha net inf

Actually im not familiar with “ virsh “ seems like you neither :wink:
Try this first

Access & Commands

Connect: Run virsh console haos (or replace haos with your specific VM name if different) on your KVM host terminal.

Wake the Console: Press Enter to see the login prompt.

Login: Type root and hit Enter (there is no password).

HA CLI: This grants access to the restricted Home Assistant command-line. Type ha followed by your desired command (e.g., ha host reboot or ha core update)``. 

Then
ha net inf

Right , as i mentioned ( You have no user-credentials )
KVM is not the most intuitive VM-Manager

Seems like.

and instead of ssh into it, it would be easier if you use a browser to access your Linux and the KVM’s grafical manager ( or directly on your Linux desktop, where i assume you have the KVM-Manager installed )

"if you use a browser to access your Linux" absolutely makes absolutely no sense to me. Like I said the URL to HA from the HA docs isn't working and I'm trying to find out how to solve this "network problem". Or why I should access the Linux on the host using a web-browser?!

Now I sat at the Linux host and started virt-manager (a GUI program) in the GUI. That shows exactly the same like "virsh console haos". Did you really expect something else?

How ever, skip the login
try to type
ha net inf

I don't unterstand that. What do you mean with "skip the login"? Entering "ha net inf" as username didn't help. Linux like always requires a login at this point. Being able to skip a Linux login in "normal mode" makes no sense, so that shouldn't be possible. I got no idea where I should find a HA-CLI.

Thanks.

Read above, if it not helps, install HAOS in a VM (virtualbox or VMWare) on windows , seems like a better option for you if you want to test and become familiar with ha

PS: net inf only gives you the net-conf ( i.e the IP you got from your LAN-Router, if bridged correctly, or your KVM-virtual-net(Wrong)
Also check in your LAN-Router, if you don’t find HAOS-IP , something was not right during the installation of HAOS-VM

Read above,

I did and wrote questions according to it you didn't answer. So that's absolutely not helpful :frowning:

if it not helps, install HAOS in a VM (virtualbox or VMWare) on windows , seems like a better option for you if you want to test and become familiar with ha

I'm sure that won't make a difference.

PS: net inf only gives you the net-conf ( i.e the IP you got from your LAN-Router, if bridged correctly, or your KVM-virtual-net(Wrong)

You still didn't explain where you expect the HA-CLI or how to skip the login. So that's absolutely not helpful :frowning:

Also check in your LAN-Router, if you don’t find HAOS-IP ,

What does such an entry look like? E.g. what DNS name?

something was not right during the installation of HAOS-VM

I didn't install the HAOS-VM, I just downloaded and imported the VM where everything was already installed and run it. And where are such messages shown?

Now I found out, that the local login is "root" without password. Sadly the HA install docs don't mention that for troubleshooting (e.g. in Kubuntu you don't do admin stuff as root). Without a troubleshooting part containing especially that (and typical problems with the cmd line to import the image I mentioned above, maybe also network stuff ignored in the cmd line), the HA install docs aren't really helpful.
And I just found out, that in the docs for Virtualbox they use a network bridge, but in libvirt NAT facepalm They should definitely declare that part as "Alpha version, not testet by us" and like I said the rest is also not that much helpful.

And the forum here has a very strange UX. It now stopped me multiple time to edit a posting. Reload was recommended, it did that, but the problem appeared again. Plus that if I don't won't to have a little writing hole, title and tags are disappearing :frowning:

Good that you figured out the “procedure” in your ssh session to KVM
The Doc’s is made by volunteers, and when you get more experience you can assist and edit those
( Or create a Topic with Pics and adequate information for i.e an unsupported Installation )

Same goes for your current “issues” i believe, certain edits and posting rules are placed to avoid Spam and Spammers(robots etc)
Within a reasonable time, you as a new user/poster will get more “rights/options”

If you want i can most likely change/add to your Topic header , i.e text and tags

I'm already working on my version. I think I'll post it in this thread and then click on that feedback button on Linux - Home Assistant

My problems with the forum probably don't have anything to do with spambots. In smaller editor window mode, I can enter title and tags. And the other thing are these popups that there's an other draft, but a few seconds(!) after I started writing -> message -> I do the recommended reload -> I start writing -> message -> I do the recommended reload -> :frowning:

Yep, i can relate to that, annoying and peculiar , i have no idea whether it’s a browser thing or forum related, could be “natural/bogus forum” causes one just have to “get used to” ( Just click it away, don’t reload )

Just my current notes, unfinished.

Tested with Kubuntu 26.04.

Only virt-install needs root priviliges, unless something else is said.

Before virt-install:
Uncompress:

xz -d haos_ova-XX.X.qcow2.xz

Should be before "Start up your virtual machine":

I did something wrong, I want to start from the beginning.

virsh destroy haos #Pulls the plug of the VM, no normal shutdown.
virsh undefine haos #Remove the VM but drive images won't be deleted.

If undefine doesn't work with something like "cannot undefine domain with nvram":

virsh edit haos #Maybe you have to choose an editor, this setting is for your whole Linux user profile.
#Search for the line starting with "<nvram". You need the path of the file you have to delete, something like /var/lib/libvirt/qemu/nvram/haos_VARS.fd and close the editor without changing anything.
rm /var/lib/libvirt/qemu/nvram/haos_VARS.fd #Delete the file in the path you found in the step before as, maybe as root.
#Try the virsh undefine line above again.
#Delete the QCOW2 file, there're all the files of the VM inside.
#Now you can start over again with a untouched QCOW2 file, e.g. freshly uncompressed from the archive.

Don't forget that if the VM should be started at boot:

virsh autostart haos

Troubleshooting for virt-install:

WARNING /home/user/Downloads/haos_ova-XX.X.qcow2 may not be accessible by the hypervisor. You will need to grant the 'libvirt-qemu' user search permissions for the following directories: ['/home/user']

virt-install doesn't like the folder. We recommend something like (as root):

mkdir /vm  #Then "ls -la /" should have a line like "drwxr-xr-x  2 root root 4096 [date/time] vm"
mv <PATH TO QCOW2 FILE> /vm
#Now use virt-install with this new QCOW2 path /vm/...

WARNING Using -- osinfo generic, VM performance may suffer. Specify an accurate OS for optimal results.

Only the people creating the image can tell you that.


In "No access to the frontend" directly after the symptom description:

Login locally into the VM at first. The command for virsh is:

virsh console haos 

This won't work if the console is already open somewhere else, e.g. in the console where you did virt-install. Close the other already open virsh console with Ctrl+5 or Ctrl+AltGr+9.

If you don't get something like "homeassistent login:" press enter. If you have that prompt, login as "root" (no password required). Now you can do all the things like a Linux admin, e.g. network troubleshooting from inside the VM. Before doing anything like port opening e.g. in ufw, check if the VM network settings are correct. E.g. virt-install has parameters to change how the VM is connected to the network. Maybe NAT is active so you need port forwarding of the ports you want to access (e.g. 8123 to have web-browser access) from that one IP where all VMs are hiding behind it to the internal IP:port. Or you want that the VM looks for the network like a normal additional machine (that mode is usually called something with bridge).

And how are things going with the “onboarding” ?

And how are things going with the “onboarding” ?

You mean if I continued trying to get started wie HA after my last posting? No, had better things to do. It's possible that some days will pass by until I again have time for HA. I will post something if new questions come up.

I searched very long for a solution for the bridge so the host and the KVM VMs can be reached via network from outside the computer. Nothing worked. In best case die VM got an IP from my router but couldn't access it by network and the VM couldn't ping outside.

I'm now using VirtualBox. Then I found many no really working tutorials for autostart and correctly(!) shutting down the VM. Best solution is VirtualBox: How to Set VMs to Start on Linux Automatically
But that doesn't work with spaces in the VMs name. I renamed the VM.