Last active
February 5, 2021 04:17
-
-
Save dkushnikov/8490346 to your computer and use it in GitHub Desktop.
VirtualBox - list running guests ip addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
VBoxManage list runningvms | cut -d "{" -f1 | sed "s/\"//g" | while read VBOXNAME; do | |
IP=$(VBoxManage guestproperty get "$VBOXNAME" /VirtualBox/GuestInfo/Net/1/V4/IP | cut -d":" -f2) | |
echo "$VBOXNAME: $IP" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment