Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VM's should show their assigned IP address

Featured Replies

It would be so convenient for users who run multiple VM's if their local IP would just show up right next to the VM image, so when a user boots it up, it would just show it. 

Also would like to see ipv6 support, and automatic assignment for such vm's within unraid.

I'm not sure the host os can determine the IP address of the virtual Nic that is passing through the bridge to an external router acquired via dhcp in the manner you are asking, especially since the ip can change if you aren't using static assignments in the vm. Even if it could, it wouldn't be able to show it at boot and would have to update after the vm has checked in with the router.

 

but I could also be way wrong.

  • Author

Maybe it should just get the last known IP of the VM then. IPs for the VMs change not that frequently

 

This would be nice to have, especially if the IP is dynamic. I was curious about this and we already know the mac address for each VM as it is in each vm's xml file, so we can probably get the ip using arp command or something similar.

+1

That would be nice to have.

At the moment I just put the IP under description, which works as well.

+1

  • 1 month later...

I setup DHCP reservations for all VMs and name them accordingly.

 vmName12 - 192.168.0.12

I do the same, but I would still love to know what the IP is. Right now I have the last group in the description. 

Ie - Gaming VM with IP 192.168.1.112 gets a description of " 112 | A VM for games".

 

So +1, would definitely be nice to have a more automatic solution for this.

Edited by -Daedalus

  • 7 months later...

+1

 

Trying to find an ip address right now...

+1 to this suggestion, would be very handy, whether you use DHCP reservations or not.

 

There are supposed to be a couple of methods via virsh or qemu-guest, but they're not working for me or seem to be disabled.

I found a bash script that works well for me though and should be generic enough.

HOSTNAME=YOURVMNAMEHERE
MAC=$(virsh domiflist $HOSTNAME | awk '{ print $5 }' | tail -2 | head -1)
arp -a | grep $MAC | awk '{ print $2 }' | sed 's/[()]//g'

Or seeing as we already now the mac address from the vm template the script can be simplified further:

MAC=YOUR:MAC:ADDRESS:HERE
arp -a | grep $MAC | awk '{ print $2 }' | sed 's/[()]//g'

 

Edited by tjb_altf4

  • 8 months later...

arp -a is no longer working :(

This would be great.

  • 2 years later...

arp don't work for me too, any solution?

@dlandon, I go to the terminal and execute arp, it can start but never finish, so I do ctrl + c

I'm not sure what you are trying to do, but you can get it to be more responsive by using:

arp -a SERVER

 

+1!

 

I have DHCP-res on my router, but I still forget. I have last octet in the VM description, but a dedicated column for the address would be lovely.

Also as a side-request: The ability to resize, move, and order-by columns would be cool. 

arp -n should provide a list of Mac addresses know to Unraid. Issue is if the server is not talking directly to the guest then there will not be an Arp entry.

 

brctl showmacs br0 will show all of the MAC-ADDR the bridge knows about, but there is no easy way to map MAC to IP, i.e. RARP or INAPR i have been able to find a way to do in linux.

 

Also I can get the MAC addresses for the VM via Virsh but its the MAC to IP address which is the challenge without pinging every IP on the local sbnet to create arp entries.

 

 

44 minutes ago, SimonF said:

Also I can get the MAC addresses for the VM via Virsh but its the MAC to IP address which is the challenge without pinging every IP on the local sbnet to create arp entries.

If you've got a recent version of qemu-agent installed on the VM, try this one

virsh qemu-agent-command MYDOMAIN '{"execute":"guest-network-get-interfaces"}' --pretty

 

14 minutes ago, tjb_altf4 said:
virsh qemu-agent-command MYDOMAIN '{"execute":"guest-network-get-interfaces"}' --pretty

Thanks for the info, Didn't think to look at the agent options.

arp -an | grep <MACADDRESS>
arp -an <VMSERVERDOMAIN>

Both give same result.

  • 2 months later...
On 1/23/2022 at 1:20 PM, tjb_altf4 said:

If you've got a recent version of qemu-agent installed on the VM, try this one

virsh qemu-agent-command MYDOMAIN '{"execute":"guest-network-get-interfaces"}' --pretty

 

Added a PR using the guest agent to get IP addresses for guest

 

image.thumb.png.afe69fc87fb421845dc7b8fa511b6214.png

Edited by SimonF

1 hour ago, SimonF said:

Added a PR using the guest agent to get IP addresses for guest

Amazing work @SimonF

  • 3 weeks later...

This has now been added and should be in RC5. Below is on an internal test release and loopbacks are not shown now.

 

image.thumb.png.5177b9cd8b6813ac093f3d63c76c9a21.png

Edited by SimonF

Nice!

 

Since there's lots of room, is it possible for us to get this shown by default in a column?

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.