Home Assistant Ubuntu Network connection fails

Discussions related to using VirtualBox on Windows hosts.
Post Reply
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Home Assistant Ubuntu Network connection fails

Post by atechnical »

I've posted something similar in the Home Assistant forums but noting useful has been provided. I hope this is the right forum, in any case I have a Ubuntu Virtual machine running on a windows 10 PC but it consistently loses the network connection. The PC never loses the connection. I've disabled all of the windows updates, antivirus and power options on the PC but still no joy. I've used the NMCLI tool within the home assistant to change the connection parameters , used different static IPs. Any insight concerning correct network settings within a Virtual box ubuntu VM would be greatly appreciated. Thanks
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Home Assistant Ubuntu Network connection fails

Post by scottgus1 »

Start the guest from full power off, not save-state. Run until you see the problem happen, then shut down the guest from within the guest OS if possible. If not possible, close the Virtualbox window for the guest with the Power Off option set.

Please right-click the guest in the main Virtualbox window's guest list, choose Show Log. Save the far left tab's log, zip the log file, and post the zip file, using the forum's Upload Attachment tab.

Also, Please right-click the guest in the main Virtualbox window's guest list, choose "Show in Explorer/Finder/File Manager". In the window that opens, zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.

Further, when the guest is running, run 'ipconfig /all' on the host Windows 10 and 'ifconfig' or 'ip address' on the guest and post the text of the command outputs when:

1. The guest's network is working.

2. The guest's network has failed.
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Re: Home Assistant Ubuntu Network connection fails

Post by atechnical »

First Thank You!I think I've attached the results of ipconfig /all. The machine hasn't crashed yet but it won't be long.
Attachments
ipconfigWindowsPC.PNG
ipconfigWindowsPC.PNG (51.02 KiB) Viewed 3502 times
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Re: Home Assistant Ubuntu Network connection fails

Post by atechnical »

files attached. when the machine crashes the only way to exit is via the task manager. Selecting file shutdown or power off results in the endless spinning wheel. Thanks again.
Attachments
ipconfigWindowsPC.PNG
ipconfigWindowsPC.PNG (51.02 KiB) Viewed 3496 times
VBOX.zip
(1.53 KiB) Downloaded 6 times
LOG.zip
(20.94 KiB) Downloaded 6 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Home Assistant Ubuntu Network connection fails

Post by scottgus1 »

Thanks for the files! What is the output of 'ifconfig' or 'ip address' in the guest when the network is working and not working?
scottgus1 wrote:ifconfig' or 'ip address' on the guest
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Re: Home Assistant Ubuntu Network connection fails

Post by atechnical »

scottgus1 wrote:Thanks for the files! What is the output of 'ifconfig' or 'ip address' in the guest when the network is working and not working?
quote="scottgus1"]ifconfig' or 'ip address' on the guest
[/quote]

it should be 192.168.1.17 in both instances, but that doesn't appear when running ipconfig / all when the machine is running or when it isn't. I see an ip for the host computer 192.168.1.20 and for the "VirtualBox Host -Only Ethernet Adapter" of 192.168.1.56. Does that answer the question?
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Re: Home Assistant Ubuntu Network connection fails

Post by atechnical »

just to clarify the network remains up when the VM loses connection. thanks
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Re: Home Assistant Ubuntu Network connection fails

Post by atechnical »

I've attached the log from today after it crashed again if it helps.
Attachments
Baseline4.10VDI-2020-07-07-16-41-38.log.zip
(22.57 KiB) Downloaded 7 times
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Re: Home Assistant Ubuntu Network connection fails

Post by atechnical »

just checking in, did I upload the wrong files?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Home Assistant Ubuntu Network connection fails

Post by scottgus1 »

That was the right file, yes, though it was taken too early. The guest seems to run fine for 17 and 3/4 hours then has some kind of glitch over the mouse, then the log ends without a full shut-down of the guest. There are more diagnostic data available if a guest log is taken after the Virtualbox guest window has been closed.

There appear to be no Guest Additions in this OS, so it did not report its IP address that I could see.
atechnical wrote:it should be 192.168.1.17
We'd rather need to know what it is, not what it should be. Please post the 'ip address' or 'ifconfig' run in the guest while the guest is running.
atechnical wrote:that doesn't appear when running ipconfig / all when the machine is running or when it isn't
'ipconfig /all' is a Windows command and will not run on the Ubuntu guest OS. Use 'ip address' or 'ifconfig' inside the guest OS, both when the guest is working well and when it has failed, if possible.

Had the guest OS completely seized up when the log was taken?

I did notice that this guest appears to be from an imported OVA:
hassos_ova-4.10.vdi
On the chance that this imported pre-installed OS has a glitch in it, please try to make a new guest, just one CPU and 2GB ram, install Ubuntu fresh from an ISO downloaded from Ubuntu's website. Connect the new Ubuntu guest via Bridged to "Intel(R) Ethernet Connection (2) I219-LM" just as the Home Assistant guest is connected. Leave this guest running and doing nothing while the Home Assistant guest is running. When the Home Assistant guest loses its network, and you try to get the 'ip address' or 'ifconfig' from inside the Home Assistant guest, also get the same command from the other Ubuntu guest, and check if the new guest has network access still.
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Re: Home Assistant Ubuntu Network connection fails

Post by atechnical »

Home assistant is an Ubuntu based app. or possibly OS for home automation. Unfortunately when the lost connection message appears VirtualBox becomes totally unresponsive,the only way out is to kill the processes with windows task manager. I think the logs get wiped. Ifconfig doesn't work within the guest but there is an NMCLI funtion https://github.com/home-assistant/opera ... network.md.
I've attached screenshots. They appear in reverse order Thank You for your time.
The IP address of the guest is 192.168.1.234
Attachments
nmcli2.PNG
nmcli2.PNG (12.62 KiB) Viewed 3411 times
nmcli1.PNG
nmcli1.PNG (23.78 KiB) Viewed 3411 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Home Assistant Ubuntu Network connection fails

Post by scottgus1 »

thanks for the command output, I see the guest IP address is in the correct range.

This:
atechnical wrote:when the lost connection message appears VirtualBox becomes totally unresponsive,the only way out is to kill the processes with windows task manager
is substantially more than this:
atechnical wrote:Ubuntu Virtual machine running on a windows 10 PC but it consistently loses the network connection.
In fact the network being disconnected might come from the guest crashing, not the other way around.

Let's see how a freshly-installed Ubuntu, installed from an ISO downloaded directly from Ubuntu, performs. If the network crash/guest crash does not happen there, then the Home Assistant OVA appliance might have had a glitch in it.
atechnical
Posts: 9
Joined: 6. Jul 2020, 17:23

Re: Home Assistant Ubuntu Network connection fails

Post by atechnical »

Let's see how a freshly-installed Ubuntu, installed from an ISO downloaded directly from Ubuntu, performs. If the network crash/guest crash does not happen there, then the Home Assistant OVA appliance might have had a glitch in it.
I'm a little dense , can you send me a link to a version that is compatible with virtualbox? I've tried a few and none result in a file format (VDI,OVA etc. etc.) that virtualbox will accept. Apologies I know just enough to get myself in trouble. I really appreciate you're taking the time.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Home Assistant Ubuntu Network connection fails

Post by scottgus1 »

Download the Linux ISO. Start the guest, when the guest asks for install media, browse to the ISO you downloaded. Also read section 1 of the Virtualbox manual.
Post Reply