-- Leo's gemini proxy

-- Connecting to g.codelearn.me:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

VirtualBox get IP of VM (cli)


Here is command to run from CLI to get `ifconfig` output on guest machine (with ubuntu server):


vboxmanage guestcontrol <vm name> run --exe '/sbin/ifconfig' --username <username> --password <pass>

You can write shell function to simplify the call:


function vbox-get-ip() {
    if [ -z $1 ]; then
       echo "pass VM name"
       return
    fi
    vboxmanage guestcontrol $1 run --exe '/sbin/ifconfig' --username <username> --password <pass>
}

Sure you can execute other commands on the host. Just make sure you pass full path to the binary.

-- Response ended

-- Page fetched on Sun May 12 07:58:08 2024