{"id":19750896,"url":"https://github.com/sheepla/go-hyperv","last_synced_at":"2025-07-01T12:03:58.486Z","repository":{"id":104298159,"uuid":"597520366","full_name":"sheepla/go-hyperv","owner":"sheepla","description":"🖥️ A go module to get Microsoft Hyper-V VM status","archived":false,"fork":false,"pushed_at":"2023-02-05T07:02:37.000Z","size":13,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T08:32:04.711Z","etag":null,"topics":["go-hyperv","go-module","hyper-v","hyperv","vm-management"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sheepla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-04T19:55:05.000Z","updated_at":"2024-06-06T15:50:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c3ed9f4-9015-4773-ad36-097ace42ce57","html_url":"https://github.com/sheepla/go-hyperv","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sheepla/go-hyperv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2Fgo-hyperv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2Fgo-hyperv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2Fgo-hyperv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2Fgo-hyperv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheepla","download_url":"https://codeload.github.com/sheepla/go-hyperv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheepla%2Fgo-hyperv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262959562,"owners_count":23391057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go-hyperv","go-module","hyper-v","hyperv","vm-management"],"created_at":"2024-11-12T02:40:31.823Z","updated_at":"2025-07-01T12:03:58.458Z","avatar_url":"https://github.com/sheepla.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-hyperv\n\nA Go module to get Microsoft Hyper-V VM informations and status via [WMI: Windows Management Instrumentation](https://learn.microsoft.com/en-us/windows/win32/wmisdk/about-wmi)\n\n## Usage\n\nTo get virtual machines summary informations and status, just call `GetVMList()`.\n\n```go\npackage main\n\nimport (\n        \"fmt\"\n        \"os\"\n\n        \"github.com/sheepla/hyperv\"\n)\n\nfunc main() {\n        vms, err := hyperv.GetVMList()\n        if err != nil {\n                fmt.Fprintln(os.Stderr, err)\n        }\n\n        for _, vm := range *vms {\n                fmt.Printf(\n                        \"----------------------\\n%v %v [%v]\\n\"+\n                                \"\\tProcessors:\\t%v\\n\"+\n                                \"\\tMemory:\\t\\tusage=%v available=%v buffer=%v\\n\"+\n                                \"\\tUptime:\\t\\t%v\\n\"+\n                                \"\\tvSwitch:\\t%v\\n\",\n                        vm.ID, vm.Name, vm.State,\n                        vm.NumberOfProcessors,\n                        vm.MemoryUsage, vm.MemoryAvailable, vm.AvailableMemoryBuffer,\n                        vm.UpTime,\n                        vm.VirtualSwitchNames,\n                )\n        }\n}\n```\n\n\u003cdetails\u003e\n\n\u003csummary\u003eOutput:\u003c/summary\u003e\n\n```\n----------------------\n354054C8-AE69-4ECB-BC42-7A63BA2688A4 Rocky [enabled but offline]\n        Processors:     1\n        Memory: usage=0 available=2147483647 buffer=2147483647\n        Uptime: 0\n        vSwitch:        [ExternalSwitch]\n----------------------\n782EC864-9404-4AFD-B5C7-58AA6EEBBC24 WS2022 [enabled but offline]\n        Processors:     1\n        Memory: usage=0 available=2147483647 buffer=2147483647\n        Uptime: 0\n        vSwitch:        [ExternalSwitch]\n----------------------\n96948A58-D987-4A71-9DCC-4E125BA48A4E Debian [running]\n        Processors:     1\n        Memory: usage=1024 available=26 buffer=180\n        Uptime: 47863518\n        vSwitch:        [ExternalSwitch]\n----------------------\nE25CD86E-9F94-43CD-B182-33B7CC74E957 ArchLinux [enabled but offline]\n        Processors:     4\n        Memory: usage=0 available=2147483647 buffer=2147483647\n        Uptime: 0\n        vSwitch:        [ExternalSwitch]\n----------------------\nEDF2EDF5-61A4-4AC2-8A2B-BDE67DE4FD12 WS2022Desktop [running]\n        Processors:     1\n        Memory: usage=4096 available=71 buffer=1236\n        Uptime: 38991448\n        vSwitch:        [ExternalSwitch]\n```\n\n\u003c/details\u003e\n\n## Installation\n\nThis module only supports windows/amd64 with Hyper-V enabled. Please see Hyper-V system requirements:\n[Hyper-V System Requiments](https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/hyper-v-requirements)\n\n```cmd\ngo get github.com/sheepla/hyperv@latest\n```\n\n## License\n\nMIT\n\n## Contributing\n\nWelcome any bug fixing, typo fixing, advicements.\n\n## Author\n\n[Sheepla](https://github.com/sheepla)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheepla%2Fgo-hyperv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheepla%2Fgo-hyperv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheepla%2Fgo-hyperv/lists"}