Skip to content

More complete Hyper-V integration for CMK #835

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Yogibaer75
Copy link
Contributor

@Yogibaer75 Yogibaer75 commented Jul 6, 2025

General information

Hyper-V integration for cluster and VM status like vSphere or Nutanix

Missing files inside the PR

  • cee agent bakery files - nothing special only with 1-2 comments in my last version
def get_hyperv_files(conf: Dict[str, Any]) -> FileGenerator:
    if not conf.get("deploy"):
        return

    # the hyperv_host_csv_io.ps1 will be obsolete in the future
    # as this data is not available anymore on S2D clusters i think
    yield Plugin(base_os=OS.WINDOWS, source=Path("hyperv_cluster.ps1"))
    yield Plugin(base_os=OS.WINDOWS, source=Path("hyperv_host_csv_io.ps1"))


register.bakery_plugin(
    name="hyperv_cluster",
    files_function=get_hyperv_files,
)

and

def get_hyperv_vms_guestinfos_files(conf: Dict[str, Any]) -> FileGenerator:
    if not conf.get("deploy"):
        return

    # here is would be nice to have a configuration option to
    # enable/disable sections inside the hyperv_host.ps1 script
    yield Plugin(base_os=OS.WINDOWS, source=Path("hyperv_host.ps1"))


register.bakery_plugin(
    name="hyperv_vm_info",
    files_function=get_hyperv_vms_guestinfos_files,
)

For the agent plugins itself it would be good that the data is directly outputed as JSON or some other structured data like table. not this "key/value" style that it is now. It is only in this way as i was building the scripts like the original one included in CMK.

Something like i do it in my other Windows Powershell scripts would be already an improvement.

Write-Host('<<<windows_patch_day:sep(124)>>>')
$result | ForEach-Object { Write-Host($_.title + '|' + $_.date + '|' + $_.resultcode) }

If there are some questions. @DavDiva can contact me also directly to discuss what needs to be changed.

I left out the already ported/existing hyperv_host.ps1 in the PR

Thanks
Andreas

Copy link

Thank you for your contribution. This pull request has been marked as stale as it has not passed the automated tests and there was no activity for the last 14 days.
Please take a look at the ‘Checks’ section for details on the test results and make the necessary changes.

This pull request will be closed due to inactivity after 60 days, if no action is taken.

@github-actions github-actions bot added the Stale Scheduled for auto-close label Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Scheduled for auto-close
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant