VBoxManage获取虚拟机IP地址

在宿主机Linux上安装VirtualBox,然后VirtualBox上安装linux虚拟机,在Virtualbox非界面启动虚拟机时,ip地址无法查看。怎么办?

使用命令:


 VBoxManage guestproperty enumerate 虚拟机名 | grep "Net.*V4.*IP"


举例:

[root@dap ~]# VBoxManage list runningvms
"slaver1-51" {c6bb8b4c-32a9-44bb-8a1b-e287000ec6e4}
You have new mail in /var/spool/mail/root


[root@dap ~]# VBoxManage guestproperty enumerate slaver1-51| grep "Net.*V4.*IP"


Name: /VirtualBox/GuestInfo/Net/0/V4/IP, value: 10.0.2.15, timestamp: 1500411593005331000, flags: 

Name: /VirtualBox/GuestInfo/Net/1/V4/IP, value: 192.168.56.51, timestamp: 1500411593005707000, flags: 




你可能感兴趣的:(开发工具)