27
8
I run my Ubuntu instance out of Virtual Box in the background using the following command:
VBoxManage startvm ${VM_NAME} --type headless
The main difference between that and running it through the GUI is that, when I am in the GUI after it starts, I can check ifconfig
to see what the IP address is so that I can ssh
into it from my terminal on the host and obviously can't do that in the background.
Assuming a dynamic assignment of IP addresses on the network, is there a way to extract the assigned IP to the newly created instance for ssh purposes OR is there a way to ssh into it without knowing the IP (e.g. via a backdoor port on the host)?
Ok then, how do you do this when guest additions is not installed? – code_dredd – 2018-08-28T23:55:14.123
1Or:
VBoxManage guestproperty get <vmname> "/VirtualBox/GuestInfo/Net/0/V4/IP"
. – Todd Walton – 2018-10-08T17:12:33.0379that command did not return the IP address – amphibient – 2013-08-20T14:01:09.870
3You need to have the guest additions installed for this to work. – heavyd – 2013-08-20T14:42:06.793