Ramakrishna
Ramakrishna

Reputation: 426

How to find the machine details, where virtual box is running

i am using windows pc and running SUSE Linux on virtual box. i can get processor id and other hardware details of virtual machine (SUSE).

Is there any possibilities(commands or using languages like java) to get hardware details of the machine (Windows), using virtual box (SUSE)?

EDIT :

my requirement is to restrict virtual machine to run on a single machine. if user copy or clone the virtual machine to some other machine it should not work or i need to kill a process. is there any possibilities to achieve this?

Upvotes: 2

Views: 1975

Answers (1)

jmiserez
jmiserez

Reputation: 3109

Short answer: No.

However, there is some info you can gather:

  • The CPU information is usually passed into the guest 1:1, so a simple cat /proc/cpuinfo should show the actual CPU type most of the time. The number of cores may be wrong however.
  • If you are behind a NAT and the host also has internet access, you can use something like curl http://icanhazip.com/ to get the public IP address of your machine.
  • The MAC address is not guaranteed to be the same, as you can set it to whatever you want in the VirtualBox settings.

Other than that, there is not much more information you can get from within a typical VirtualBox instance.

There is a related question on SuperUser that describes the more general case and focuses on VMWare.

Upvotes: 1

Related Questions