Detect Hyper-V host
Bug #1087185 reported by
Thomas Herve
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Released
|
Medium
|
Thomas Herve |
Bug Description
We need to be able to know if a machine is a guest of a Hyper-V host, to give the proper VM license to it.
Related branches
lp:~therve/landscape-client/hyper-v-detection
- Alberto Donato (community): Approve
- Geoff Teale (community): Approve
-
Diff: 42 lines (+17/-1)2 files modifiedlandscape/lib/tests/test_vm_info.py (+15/-1)
landscape/lib/vm_info.py (+2/-0)
tags: | removed: kanban |
Changed in landscape-client: | |
status: | New → In Progress |
Changed in landscape-client: | |
status: | In Progress → Fix Committed |
Changed in landscape-client: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Just for the record, so we can find this if we ever need it again.
The official MSFT position on Hyper-V visibility from Linux, straight from the guy that wrote Hyper-V support into the kernel:
---
Good to hear from you. I am still in NJ although I may be moving to Redmond shortly! Lscpu shows the hypervisor (in this case Hyper-V). Looking at /proc/cpuinfo, I see the hypervisor flag is set but it does not parse the Hypervisor type information. This is really a Linux kernel issue and not the hypervisor issue. The cupid information presented to the guest has all the necessary information about the hypervisor; this is what lscpu is using.
---
Looks like lscpu would be preferred for flag & type detection. Haven't tested anywhere, I shut off all my VMs after wrapping this with Thomas earlier.