Skip to content

Instantly share code, notes, and snippets.

@dkushnikov
Last active February 5, 2021 04:17
Show Gist options
  • Save dkushnikov/8490346 to your computer and use it in GitHub Desktop.
Save dkushnikov/8490346 to your computer and use it in GitHub Desktop.
VirtualBox - list running guests ip addresses
#!/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