this post was submitted on 03 Nov 2023
14 points (88.9% liked)

Selfhosted

40219 readers
924 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I have a local network where all the devices receive their ip from the router. IP range is 192.168.0.XXX.

On one of those machines i want to run "home assistant operating system" inside a VM using libvirt(using cockpit webgui).

I was able to install the VM, but when I run it, it never receives a IP address. Setting one manual works, but then the VM doesn't show up in my local network.

On the host machine I created a bridge (virbr0) and I made the nic(enp8s0) from the host member. I also made VM member of virbr0

Any ideas what i'm doing wrong?

Note that the VM also needs to become member of the local network (ip range 192.168.0.XXX) and needs to see all other members of the local network.

top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

Forget HA (for a while) and focus on the IP address problem. Start from scratch with a new VM, and/or inspect one of your VM's where the networking works. Find the difference.

[–] [email protected] 3 points 1 year ago (2 children)

Could it be that you need to run the VM network in NAT mode, instead of a "Bridge" mode?

Please note, I have little experience in troubleshooting these, I'm just spitballing ideas here...

[–] [email protected] 6 points 1 year ago (1 children)

No, then the VMs would get their own subnet. You want the NIC bridged so that the router actually sees the VMs.

[–] [email protected] 1 points 1 year ago

Gotcha. I learned something new. Thanks :)

[–] [email protected] 1 points 1 year ago

output from "nmcli device status" command:

DEVICE TYPE STATE CONNECTION
virbr0 bridge connected virbr0

so i assume its in bridge mode?

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Not an expert, just something I did and learned from; does the hardware you're running on have more than one ethernet port (enp#...)? Is it possible you've selected the wrong one?

Also I notice my VMs in proxmox have the bridge nomenclature of vmbr0 (not virb0). Perhaps something there?

Just throwing ideas out there, I'm pretty new at this.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
HA Home Assistant automation software
~ High Availability
IP Internet Protocol
NAT Network Address Translation

3 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.

[Thread #261 for this sub, first seen 3rd Nov 2023, 12:30] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] 1 points 1 year ago

When I ran all my vms in kvm I used macvtap for the nic type.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

OP, are all of the working-as-expected VMs also members of the virbr0 network?

I'm thinking that this is a firewall issue on your VM host. If you DO NOT have any other working VMs then could you try disabling the firewall on the VM host and see if the VM can receive DHCP traffic.

[–] [email protected] 2 points 1 year ago (1 children)

I currently have no other VM's running. I'll see if disabling the firewall helps.

[–] [email protected] 1 points 1 year ago (1 children)

Did you ever figure out what was causing your issues?

[–] [email protected] 1 points 1 year ago

No sadly I didn't. I got it working a few times after reconfiguring everything but it never survived a reboot.