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

fix: [1.31] Report correct guest UUID, when VM Generation 2 is used #422

Draft
wants to merge 1 commit into
base: virt-who-1.31
Choose a base branch
from

Conversation

jirihnidek
Copy link
Collaborator

* Card ID: CCT-676
* Backport to 1.31 branch
* When VM is created as Generation 2 in the setup wizard of
  Hyper-V hypervisor, then hypervisor reports UUID of given
  VM using little-endian. Thus it is not necessary to
  convert this UUID as we do for Generation 1.
* We solve this issue by extending SQL query. We also ask
  for VirtualSystemSubType, which contains version of VM
  generation ("Microsoft:Hyper-V:SubType:1" or
  "Microsoft:Hyper-V:SubType:2"). When VM is generation 1,
  then we convert UUID from big-endian to little-endian
  as we have did it in the past. When generation is 2, then
  we do nothing with guest UUID.
* Changed code around little bit, because there was variable
  uuid used for different purpose and it was confusing.
* TODO: hyperv.py deserves more refactoring
* More information about generation 1 or 2 on Hyper-V could be
  found e.g. here:
  * https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/get-started/create-a-virtual-machine-in-hyper-v
  * https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/plan/should-i-create-a-generation-1-or-2-virtual-machine-in-hyper-v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant