Why are my VMs not getting IP addresses?


Recommended Posts

46 minutes ago, tknx said:

they just don't seem to want to get an IP

Not sure I understood correctly.

From your image you are using virbr0 network: virbr0 is a NAT connection, with dhcp managed by libvirt, virsh net-edit default:

<network>
  <name>default</name>
  <uuid></uuid>
  <forward mode='nat'/>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='xx:xx:xx:xx:xx:xx'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>

As you can see the guest will have an ip in the range 192.168.122.2-254.

 

So check within the vm if an ip is assigned.

 

Or, your issue is that you can't see an ip address of the vm in the unraid gui?

The message is pretty self explanatory (I think):

Quote

guest not running or guest agent not installed

 

Now..the guest IS running, but you probably don't have the qemu guest agent installed inside the vm or it is not working as expected: I think unraid is using a guest agent command to get the ip of the vm.

Simply install it inside the vm or fix it.

 

Edited by ghost82
Link to comment

OK - I have no idea where the virbr network comes from.  In all transparency, besides eth0, eth0.20, and wg, I have no idea what the rest of these are or what they do.

 

This image worked fine until I stopped bridging my SFP+ ethernet with the not plugged in onboard ethernet.

 

So do I have to modify each and every VM i installed and that was working? Why?

 

My table looks like this:

network.thumb.png.ad48d5bba1afe1133ab3b97909fbb578.png

Link to comment

What's your goal?Having internet access inside vms?

8 minutes ago, tknx said:

I have no idea what the rest of these are

As said virbr0 comes from libvirt itself, it's the default nat network; with virbr0 the vms will not be seen on the lan.

 

So...as a general advice, I would suggest to use a bridge connection, such as br0: to do this you need to configure in unraid a nic (eth0 for example) in bridge mode (br0 for example), and use br0 in the vm settings; eth0 and br0 will be in the same range of ip addresses with the ip usually assigned by the router itself.

 

It seems you messed with the netowrk settings in unraid and you don't have any brX bridge defined.

Edited by ghost82
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.