busa1 Posted June 17, 2018 Share Posted June 17, 2018 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. 4 Quote Link to comment
1812 Posted June 17, 2018 Share Posted June 17, 2018 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. 1 Quote Link to comment
busa1 Posted June 17, 2018 Author Share Posted June 17, 2018 Maybe it should just get the last known IP of the VM then. IPs for the VMs change not that frequently Quote Link to comment
GHunter Posted June 18, 2018 Share Posted June 18, 2018 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. Quote Link to comment
nextgenpotato Posted June 18, 2018 Share Posted June 18, 2018 +1 That would be nice to have. At the moment I just put the IP under description, which works as well. Quote Link to comment
WashingtonMatt Posted July 31, 2018 Share Posted July 31, 2018 I setup DHCP reservations for all VMs and name them accordingly. vmName12 - 192.168.0.12 Quote Link to comment
-Daedalus Posted July 31, 2018 Share Posted July 31, 2018 (edited) 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 July 31, 2018 by -Daedalus Quote Link to comment
GreenEyedMonster Posted March 11, 2019 Share Posted March 11, 2019 +1 Trying to find an ip address right now... Quote Link to comment
tjb_altf4 Posted March 11, 2019 Share Posted March 11, 2019 (edited) +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 March 11, 2019 by tjb_altf4 Quote Link to comment
NewDisplayName Posted December 9, 2019 Share Posted December 9, 2019 arp -a is no longer working Quote Link to comment
Koshy Posted December 10, 2019 Share Posted December 10, 2019 This would be great. Quote Link to comment
shawnngtq Posted January 15, 2022 Share Posted January 15, 2022 arp don't work for me too, any solution? Quote Link to comment
dlandon Posted January 15, 2022 Share Posted January 15, 2022 How are you trying to use arp? Quote Link to comment
shawnngtq Posted January 17, 2022 Share Posted January 17, 2022 @dlandon, I go to the terminal and execute arp, it can start but never finish, so I do ctrl + c Quote Link to comment
dlandon Posted January 17, 2022 Share Posted January 17, 2022 I'm not sure what you are trying to do, but you can get it to be more responsive by using: arp -a SERVER Quote Link to comment
-Daedalus Posted January 17, 2022 Share Posted January 17, 2022 +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. Quote Link to comment
SimonF Posted January 23, 2022 Share Posted January 23, 2022 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. Quote Link to comment
tjb_altf4 Posted January 23, 2022 Share Posted January 23, 2022 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 1 Quote Link to comment
SimonF Posted January 23, 2022 Share Posted January 23, 2022 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. Quote Link to comment
CIA Posted January 27, 2022 Share Posted January 27, 2022 arp -an | grep <MACADDRESS> arp -an <VMSERVERDOMAIN> Both give same result. Quote Link to comment
SimonF Posted April 3, 2022 Share Posted April 3, 2022 (edited) 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 Edited April 3, 2022 by SimonF 1 Quote Link to comment
tjb_altf4 Posted April 3, 2022 Share Posted April 3, 2022 1 hour ago, SimonF said: Added a PR using the guest agent to get IP addresses for guest Amazing work @SimonF Quote Link to comment
SimonF Posted April 23, 2022 Share Posted April 23, 2022 (edited) This has now been added and should be in RC5. Below is on an internal test release and loopbacks are not shown now. Edited April 23, 2022 by SimonF 3 Quote Link to comment
-Daedalus Posted April 25, 2022 Share Posted April 25, 2022 Nice! Since there's lots of room, is it possible for us to get this shown by default in a column? Quote Link to comment
Recommended Posts
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.