How to retrieve IP Address from a VM that can't have Guest Adiitions Installed












1















I am trying to Automate the build and deploy process of a piece of server software we make, this software runs on ubuntu 12.04 but doesn't allow "apt-get" for security reasons.



I have gotten as far as installing the VM using VBoxManage however to run our automated test suit I need the IPV4 Address of said server.



Is there a way to get an IP without using Guest additions eg



VBoxManage guestproperty get <VMNAME> "/VirtualBox/GuestInfo/Net/V4/IP"


Thanks



EDIT: the use of guestcontrol was suggested as it doesn't need guest additions, however the run subcommand (or execute for pre VirtualBox 5) does require GA installed to function. Using the execute sub command returns



VBoxManage: error: The guest execution service is not ready (yet)










share|improve this question

























  • how about VBoxManage guestproperty enumerate VM_NAME | grep "Net.*V4.*IP"?

    – ostendali
    Dec 21 '15 at 15:27













  • I tried that earlier, returns nothing. The full enumerate only shows 4 "HostInfo" lines

    – tim
    Dec 21 '15 at 15:29


















1















I am trying to Automate the build and deploy process of a piece of server software we make, this software runs on ubuntu 12.04 but doesn't allow "apt-get" for security reasons.



I have gotten as far as installing the VM using VBoxManage however to run our automated test suit I need the IPV4 Address of said server.



Is there a way to get an IP without using Guest additions eg



VBoxManage guestproperty get <VMNAME> "/VirtualBox/GuestInfo/Net/V4/IP"


Thanks



EDIT: the use of guestcontrol was suggested as it doesn't need guest additions, however the run subcommand (or execute for pre VirtualBox 5) does require GA installed to function. Using the execute sub command returns



VBoxManage: error: The guest execution service is not ready (yet)










share|improve this question

























  • how about VBoxManage guestproperty enumerate VM_NAME | grep "Net.*V4.*IP"?

    – ostendali
    Dec 21 '15 at 15:27













  • I tried that earlier, returns nothing. The full enumerate only shows 4 "HostInfo" lines

    – tim
    Dec 21 '15 at 15:29
















1












1








1








I am trying to Automate the build and deploy process of a piece of server software we make, this software runs on ubuntu 12.04 but doesn't allow "apt-get" for security reasons.



I have gotten as far as installing the VM using VBoxManage however to run our automated test suit I need the IPV4 Address of said server.



Is there a way to get an IP without using Guest additions eg



VBoxManage guestproperty get <VMNAME> "/VirtualBox/GuestInfo/Net/V4/IP"


Thanks



EDIT: the use of guestcontrol was suggested as it doesn't need guest additions, however the run subcommand (or execute for pre VirtualBox 5) does require GA installed to function. Using the execute sub command returns



VBoxManage: error: The guest execution service is not ready (yet)










share|improve this question
















I am trying to Automate the build and deploy process of a piece of server software we make, this software runs on ubuntu 12.04 but doesn't allow "apt-get" for security reasons.



I have gotten as far as installing the VM using VBoxManage however to run our automated test suit I need the IPV4 Address of said server.



Is there a way to get an IP without using Guest additions eg



VBoxManage guestproperty get <VMNAME> "/VirtualBox/GuestInfo/Net/V4/IP"


Thanks



EDIT: the use of guestcontrol was suggested as it doesn't need guest additions, however the run subcommand (or execute for pre VirtualBox 5) does require GA installed to function. Using the execute sub command returns



VBoxManage: error: The guest execution service is not ready (yet)







12.04 virtualbox automation guest-additions






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 22 '15 at 10:37







tim

















asked Dec 21 '15 at 15:20









timtim

2616




2616













  • how about VBoxManage guestproperty enumerate VM_NAME | grep "Net.*V4.*IP"?

    – ostendali
    Dec 21 '15 at 15:27













  • I tried that earlier, returns nothing. The full enumerate only shows 4 "HostInfo" lines

    – tim
    Dec 21 '15 at 15:29





















  • how about VBoxManage guestproperty enumerate VM_NAME | grep "Net.*V4.*IP"?

    – ostendali
    Dec 21 '15 at 15:27













  • I tried that earlier, returns nothing. The full enumerate only shows 4 "HostInfo" lines

    – tim
    Dec 21 '15 at 15:29



















how about VBoxManage guestproperty enumerate VM_NAME | grep "Net.*V4.*IP"?

– ostendali
Dec 21 '15 at 15:27







how about VBoxManage guestproperty enumerate VM_NAME | grep "Net.*V4.*IP"?

– ostendali
Dec 21 '15 at 15:27















I tried that earlier, returns nothing. The full enumerate only shows 4 "HostInfo" lines

– tim
Dec 21 '15 at 15:29







I tried that earlier, returns nothing. The full enumerate only shows 4 "HostInfo" lines

– tim
Dec 21 '15 at 15:29












1 Answer
1






active

oldest

votes


















0














If you're able to log into the guest, just run ifconfig.



If that isn't possible, try arp -a.






share|improve this answer
























  • As this is part of an automation mannually logging in and entering a command wont work for me. The goal is to get the IP address from a command line that can >> the result of said command to a text file to be read for the automated test suite

    – tim
    Dec 21 '15 at 15:48






  • 2





    Can you give some more information on this automation process then? Also, did you try running arp -a on the machine that hosts said VM?

    – Service Manager
    Dec 21 '15 at 15:51











  • using buildbot we create an ISO image of our product, then using a script and VBoxManage I create a custom VM and mount the ISO image which is then installed on the VM. Running arp -a returns the IP but with a "?" for a name rather than a server.domain.com, will that be consistant enough to safely use grep to search for "?" and the IP next to it?

    – tim
    Dec 21 '15 at 15:54











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f712001%2fhow-to-retrieve-ip-address-from-a-vm-that-cant-have-guest-adiitions-installed%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














If you're able to log into the guest, just run ifconfig.



If that isn't possible, try arp -a.






share|improve this answer
























  • As this is part of an automation mannually logging in and entering a command wont work for me. The goal is to get the IP address from a command line that can >> the result of said command to a text file to be read for the automated test suite

    – tim
    Dec 21 '15 at 15:48






  • 2





    Can you give some more information on this automation process then? Also, did you try running arp -a on the machine that hosts said VM?

    – Service Manager
    Dec 21 '15 at 15:51











  • using buildbot we create an ISO image of our product, then using a script and VBoxManage I create a custom VM and mount the ISO image which is then installed on the VM. Running arp -a returns the IP but with a "?" for a name rather than a server.domain.com, will that be consistant enough to safely use grep to search for "?" and the IP next to it?

    – tim
    Dec 21 '15 at 15:54
















0














If you're able to log into the guest, just run ifconfig.



If that isn't possible, try arp -a.






share|improve this answer
























  • As this is part of an automation mannually logging in and entering a command wont work for me. The goal is to get the IP address from a command line that can >> the result of said command to a text file to be read for the automated test suite

    – tim
    Dec 21 '15 at 15:48






  • 2





    Can you give some more information on this automation process then? Also, did you try running arp -a on the machine that hosts said VM?

    – Service Manager
    Dec 21 '15 at 15:51











  • using buildbot we create an ISO image of our product, then using a script and VBoxManage I create a custom VM and mount the ISO image which is then installed on the VM. Running arp -a returns the IP but with a "?" for a name rather than a server.domain.com, will that be consistant enough to safely use grep to search for "?" and the IP next to it?

    – tim
    Dec 21 '15 at 15:54














0












0








0







If you're able to log into the guest, just run ifconfig.



If that isn't possible, try arp -a.






share|improve this answer













If you're able to log into the guest, just run ifconfig.



If that isn't possible, try arp -a.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 21 '15 at 15:46









Service ManagerService Manager

22229




22229













  • As this is part of an automation mannually logging in and entering a command wont work for me. The goal is to get the IP address from a command line that can >> the result of said command to a text file to be read for the automated test suite

    – tim
    Dec 21 '15 at 15:48






  • 2





    Can you give some more information on this automation process then? Also, did you try running arp -a on the machine that hosts said VM?

    – Service Manager
    Dec 21 '15 at 15:51











  • using buildbot we create an ISO image of our product, then using a script and VBoxManage I create a custom VM and mount the ISO image which is then installed on the VM. Running arp -a returns the IP but with a "?" for a name rather than a server.domain.com, will that be consistant enough to safely use grep to search for "?" and the IP next to it?

    – tim
    Dec 21 '15 at 15:54



















  • As this is part of an automation mannually logging in and entering a command wont work for me. The goal is to get the IP address from a command line that can >> the result of said command to a text file to be read for the automated test suite

    – tim
    Dec 21 '15 at 15:48






  • 2





    Can you give some more information on this automation process then? Also, did you try running arp -a on the machine that hosts said VM?

    – Service Manager
    Dec 21 '15 at 15:51











  • using buildbot we create an ISO image of our product, then using a script and VBoxManage I create a custom VM and mount the ISO image which is then installed on the VM. Running arp -a returns the IP but with a "?" for a name rather than a server.domain.com, will that be consistant enough to safely use grep to search for "?" and the IP next to it?

    – tim
    Dec 21 '15 at 15:54

















As this is part of an automation mannually logging in and entering a command wont work for me. The goal is to get the IP address from a command line that can >> the result of said command to a text file to be read for the automated test suite

– tim
Dec 21 '15 at 15:48





As this is part of an automation mannually logging in and entering a command wont work for me. The goal is to get the IP address from a command line that can >> the result of said command to a text file to be read for the automated test suite

– tim
Dec 21 '15 at 15:48




2




2





Can you give some more information on this automation process then? Also, did you try running arp -a on the machine that hosts said VM?

– Service Manager
Dec 21 '15 at 15:51





Can you give some more information on this automation process then? Also, did you try running arp -a on the machine that hosts said VM?

– Service Manager
Dec 21 '15 at 15:51













using buildbot we create an ISO image of our product, then using a script and VBoxManage I create a custom VM and mount the ISO image which is then installed on the VM. Running arp -a returns the IP but with a "?" for a name rather than a server.domain.com, will that be consistant enough to safely use grep to search for "?" and the IP next to it?

– tim
Dec 21 '15 at 15:54





using buildbot we create an ISO image of our product, then using a script and VBoxManage I create a custom VM and mount the ISO image which is then installed on the VM. Running arp -a returns the IP but with a "?" for a name rather than a server.domain.com, will that be consistant enough to safely use grep to search for "?" and the IP next to it?

– tim
Dec 21 '15 at 15:54


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f712001%2fhow-to-retrieve-ip-address-from-a-vm-that-cant-have-guest-adiitions-installed%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How did Captain America manage to do this?

迪纳利

南乌拉尔铁路局