Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2930  / 2 Years ago, sat, june 25, 2022, 6:04:54

I have installed Ubuntu Desktop 14.04 (Trusty) on a VirtualBox client (bridged network connection, Guest Additions installed). I sometimes run the client in headless mode (rather than through the VirtualBox GUI) and access it via SSH. To start such a client and get its network address, I normally:



nohup VBoxHeadless --startvm <VM_NAME> & #start as background process
#wait a bit for it to start up
VBoxManage guestproperty get <VM_NAME> "/VirtualBox/GuestInfo/Net/0/V4/IP"


This works for most clients (Debian, Windows, I don't remember if it worked for my Ubuntu 13.10 client). If this fails, I can request all details, but even here the network address doesn't come up.



VBoxManage guestproperty enumerate <VM_NAME>


My guestproperties for the 14.04 client are as follows:



Name: /VirtualBox/GuestInfo/OS/Product, value: Linux, timestamp: 1402485749624026000, flags: 
Name: /VirtualBox/HostInfo/GUI/LanguageID, value: en_US, timestamp: 1402652779530499000, flags:
Name: /VirtualBox/HostInfo/VBoxVerExt, value: 4.3.12, timestamp: 1402652779119725000, flags: TRANSIENT, RDONLYGUEST
Name: /VirtualBox/GuestAdd/Vbgl/Video/SavedMode, value: 1366x722x32, timestamp: 1402485750186131000, flags:
Name: /VirtualBox/GuestInfo/OS/Version, value: #53-Ubuntu SMP Wed Jun 4 21:02:19 UTC 2014, timestamp: 1402485749625558000, flags:
Name: /VirtualBox/GuestAdd/VersionExt, value: 4.3.12, timestamp: 1402485749627827000, flags:
Name: /VirtualBox/GuestAdd/Revision, value: 93733, timestamp: 1402485749628338000, flags:
Name: /VirtualBox/HostGuest/SysprepExec, value: , timestamp: 1402652779118360000, flags: TRANSIENT, RDONLYGUEST
Name: /VirtualBox/HostGuest/SysprepArgs, value: , timestamp: 1402652779118595000, flags: TRANSIENT, RDONLYGUEST
Name: /VirtualBox/GuestAdd/Version, value: 4.3.12, timestamp: 1402485749627214000, flags:
Name: /VirtualBox/HostInfo/VBoxRev, value: 93733, timestamp: 1402652779119840000, flags: TRANSIENT, RDONLYGUEST
Name: /VirtualBox/HostInfo/VBoxVer, value: 4.3.12, timestamp: 1402652779119633000, flags: TRANSIENT, RDONLYGUEST
Name: /VirtualBox/GuestInfo/OS/Release, value: 3.13.0-29-generic, timestamp: 1402485749624971000, flags:
Name: /VirtualBox/GuestAdd/HostVerLastChecked, value: 4.3.12, timestamp: 1402485781945719000, flags:


My workaround is to start the client with the VBox GUI, log in and type ifconfig to get the address, shut it down, and start it again headless, but I'd prefer to avoid that. How can I get the network address from a headless Trusty VirtualBox client?


More From » networking

 Answers
1

This seems to be caused by the machine starting and waiting at the GNU GRUB screen (visible in the Preview). Starting it via the GUI once (to get the login screen), stopping it, and starting it headless seems to work.



I'm guessing it waits at GRUB after a kernel or Guest Additions update. (But I'm not sure.)


[#24660] Monday, June 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fulerio

Total Points: 172
Total Questions: 124
Total Answers: 109

Location: Hungary
Member since Thu, Aug 6, 2020
4 Years ago
;