How can I get the ip from my OS (Guest) Windows XP mounted on VMware from Linux by console?

1

I need a script or it can be a vmware workstation 12 command for an instruction which gives me the IP address of the OS mounted on this virtual machine, which in this case, is Windows XP.

My host or host machine is Linux.

This I want because I need Conky to inform me that ip has to proceed to run the virtual machine, without having to enter and place ipconfig, etc.

I really need a bash command to give me the ip in short.

Greetings and thanks.

    
asked by Gonzalo Oviedo 30.11.2016 в 19:41
source

1 answer

1

You can find out the mac that your virtual machine has (I suppose that you know how to do it, if not, you tell me and we tell you) and then once it is in the network, from your host linux executes arp that removes the list of machines detected in the network with your macs and you spend a grep to stay alone the line that interests and awk to stay the ip that is ...

Example, suppose that your mac (that of your virtual XP) is 00: 11: 22: 33: 44: 55. You would execute a command arp | grep 00:11:22:33:44:55 | awk '{print $1}'

    
answered by 08.12.2016 / 19:19
source