I'm wondering if there is any way for a linux guest to use the VBox additions to determine what the Host Operating system is? I'd like to have a dynamic configuration in the guest that only activates certain services if the host is windows. If the host is linux, those particular services aren't needed. Is there a way to determine this with a command line, etc?
Thanks!
Way to determine what the Host OS is?
-
HubTou
- Posts: 93
- Joined: 24. Nov 2009, 11:01
- Primary OS: FreeBSD
- VBox Version: OSE other
- Guest OSses: FreeBSD, OpenSolaris, and several Linuxes
Re: Way to determine what the Host OS is?
Hello,
I don't think it would be feasible from the Guest Additions.
Doing it with network fingerprinting techniques (nmap...) could be tricky, depending of the kind of network used (bridged, nated, etc.) and the ability to identify the host address.
Why not have the host "tell it" to the guest?
You'd have to use some information passed from the host to the guest.
The cleanest way might be to pass it through BIOS DMI information.
See "§9.10 Configuring the BIOS DMI information" in the user manual.
Under Linux, you would access this information through dmidecode.
Under Windows, you might use a dmidecode port:
http://gnuwin32.sourceforge.net/packages/dmidecode.htm
Under FreeBSD, you have a dmidecode in the port tree:
http://www.freshports.org/sysutils/dmidecode/
Best regards,
Hubert
I don't think it would be feasible from the Guest Additions.
| Edit: In fact it is! See "§4.6 Guest properties" in the user manual. I quote "Arbitrary string data can be exchanged between guest and host. This works in both directions". |
Why not have the host "tell it" to the guest?
You'd have to use some information passed from the host to the guest.
The cleanest way might be to pass it through BIOS DMI information.
See "§9.10 Configuring the BIOS DMI information" in the user manual.
Under Linux, you would access this information through dmidecode.
Under Windows, you might use a dmidecode port:
http://gnuwin32.sourceforge.net/packages/dmidecode.htm
Under FreeBSD, you have a dmidecode in the port tree:
http://www.freshports.org/sysutils/dmidecode/
Best regards,
Hubert