Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect xhyve/bhyve guest #47

Open
Hipska opened this issue Oct 19, 2016 · 11 comments
Open

Detect xhyve/bhyve guest #47

Hipska opened this issue Oct 19, 2016 · 11 comments

Comments

@Hipska
Copy link

Hipska commented Oct 19, 2016

Linfo detects guest of xhyve and bhyve as being QEMU/KVM.

This seems to be a generic problem as I have found tickets for Salt and Puppet/facter that state the same also.

@jrgp
Copy link
Owner

jrgp commented Oct 19, 2016

This makes sense as these two new hypervisors use libvirt like qemu does. It'd be easiest of they loaded a custom kernel module that I could look for but I don't think they do.

I'm open to suggestions. Maybe there's a secret file in /sys or /proc that could be informative here.

@Hipska
Copy link
Author

Hipska commented Oct 19, 2016

Does this makes some sense?

root@ee2f73bc1f20:/# grep -ri hyve /sys/devices/virtual/dmi/id
/sys/devices/virtual/dmi/id/product_name:BHYVE
/sys/devices/virtual/dmi/id/modalias:dmi:bvnBHYVE:bvr1.00:bd03/14/2014:svn:pnBHYVE:pvr1.0:cvn:ct2:cvr1.0:
/sys/devices/virtual/dmi/id/bios_vendor:BHYVE
/sys/devices/virtual/dmi/id/uevent:MODALIAS=dmi:bvnBHYVE:bvr1.00:bd03/14/2014:svn:pnBHYVE:pvr1.0:cvn:ct2:cvr1.0:

@jrgp
Copy link
Owner

jrgp commented Oct 19, 2016

Yes, checking if that one of those files exists and has the name of the hypervisor in it would definitely make sense.

@Hipska
Copy link
Author

Hipska commented Oct 19, 2016

Yeah, but it doesn't seem good enough as this is taken from an xhyve Guest. (actually it is on a container from Docker for mac)

@jrgp
Copy link
Owner

jrgp commented Oct 19, 2016

Yeah I recall a PR on the xhyve project to make it identify itself as xhyve not bhyve

@jrgp
Copy link
Owner

jrgp commented Oct 20, 2016

Maybe see if xhyve is written anywhere

@Hipska
Copy link
Author

Hipska commented Oct 20, 2016

At least not in /sys, but you could identify them as bhyve/xhyve guest and use this logo for example: bhyve logo http://bhyve.org/static/bhyve.png

@jrgp
Copy link
Owner

jrgp commented Oct 21, 2016

That makes sense. Would you be able to make a PR for this?

@jrgp
Copy link
Owner

jrgp commented Dec 18, 2016

^

@jrgp
Copy link
Owner

jrgp commented Feb 17, 2018

^

@Hipska
Copy link
Author

Hipska commented Feb 19, 2018

Hi sorry for late comment, but I think you could guess that yourself already that I currently have no time to spend on this. Could you please do it yourself? It doesn't seem a lot of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants