[vbox-dev] vm detection
Stéphane Charette
stephanecharette at gmail.com
Wed Dec 30 12:41:18 PST 2009
On Wed, Dec 30, 2009 at 12:09, Larry Finger <Larry.Finger at lwfinger.net> wrote:
> For my edification, why does it matter?
>
Some extra installation steps we have to run when our appliance is
deployed in a virtual environment. I was hoping to have a single
easy-to-run check which can help determine between native and
virtualized environments.
Unless someone has an easier solution, I've decided to run
/usr/sbin/dmidecode and grep for certain keywords to tell the
difference. There are two problems I know about with doing it this
way:
1) greping for text strings isn't as "deterministic" as I'd like it to
be; running some instructions or calling some sort of API (if such a
solution existed) would make me feel a bit better
2) vboxmanage can be used to customize the dmi strings, meaning that
"innotek GmgH" and "VirtualBox" may not even appear in the dmidecode
output; in my opinion, this solution is about on-par with checking the
organizational unique identifier in the MAC address
Stéphane Charette
More information about the vbox-dev
mailing list