I have a system configuration script that I run on any Linux VM.
The script knows on which vm it is running ( by reading a specific file on the vm or reading the uuid of the swap file, .....).
A vm (*.vdi) can be installed on any Linux guests (real hardware computer).
My problem is that my script for some actions needs to know on which real computer it is running.
For testing my program, by reading the result of
Code: Select all
cat /proc/cpuinfo | uniq
Then the value of the identifier tell which is the host.
This is possible because I test using three different brand of laptop.But this is not relevant in real life where there are too many equivalent computers.
On the guest, Is there a way to identify the hardware on which the guest is running?
Any help is welcome.