{"id":16836363,"url":"https://github.com/bensallen/hkmgr","last_synced_at":"2025-04-11T05:10:42.796Z","repository":{"id":64302516,"uuid":"194359934","full_name":"bensallen/hkmgr","owner":"bensallen","description":"Hkmgr is a virtual machine manager for the hyperkit macOS hypervisor.","archived":false,"fork":false,"pushed_at":"2020-03-28T22:24:49.000Z","size":196,"stargazers_count":11,"open_issues_count":9,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T07:37:23.452Z","etag":null,"topics":["golang","hyperkit","virtualization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bensallen.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}},"created_at":"2019-06-29T03:27:20.000Z","updated_at":"2023-06-15T23:59:44.000Z","dependencies_parsed_at":"2023-01-15T09:45:29.503Z","dependency_job_id":null,"html_url":"https://github.com/bensallen/hkmgr","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Fhkmgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Fhkmgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Fhkmgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bensallen%2Fhkmgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bensallen","download_url":"https://codeload.github.com/bensallen/hkmgr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345266,"owners_count":21088244,"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":["golang","hyperkit","virtualization"],"created_at":"2024-10-13T12:13:14.214Z","updated_at":"2025-04-11T05:10:42.779Z","avatar_url":"https://github.com/bensallen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hkmgr\n\nHkmgr is a virtual machine manager that makes use of the [hyperkit](https://github.com/moby/hyperkit) hypervisor. Hkmgr helps simplify running hyperkit and automates some of the network configuration on macOS.\n\n## Install\n\n```shell\nbrew tap bensallen/homebrew-hkmgr\nbrew install hkmgr\n```\n\n- For tap network support, [tuntaposx](http://tuntaposx.sourceforge.net) is required.\n\n## Example: Boot a RancherOS VM\n\n```shell\nmkdir ros-vm1\ncd ros-vm1\nwget https://github.com/rancher/os/releases/download/v1.5.4/initrd\nwget https://github.com/rancher/os/releases/download/v1.5.4/vmlinuz\n```\n\n- Create a hkmgr.toml\n\n```toml\n[network.net1.vmnet]\nbridge = \"bridge100\"\nip = \"192.168.64.1/24\"\n\n[network.net2.tap]\nbridge = \"bridge1\"\nip = \"192.168.99.1/24\"\n\n[vm.ros-vm1]\nmemory = \"4GB\"\ncores = 1\nuuid = \"9445CA7C-F976-456E-9061-B932194D8166\"\n\n[[vm.ros-vm1.network]]\ndriver = \"virtio-net\"\nmemberOf = \"net1\"\n\n[[vm.ros-vm1.network]]\nip = \"192.168.99.11/24\"\nmac = \"AA:BB:CC:DD:00:01\"\ndevice = \"tap0\"\ndriver = \"virtio-tap\"\nmemberOf = \"net2\"\n\n[vm.ros-vm1.boot.kexec]\nkernel = \"vmlinuz\"\ninitrd = \"initrd\"\ncmdline = \"console=tty0 console=ttyS0,115200 earlyprintk=serial rancher.autologin=ttyS0 rancher.network.interfaces.eth1.address=192.168.99.11/24\"\n```\n\n- Boot the VM\n\n```shell\n$ sudo hkmgr up\nPassword:\nBooting VM: 9445CA7C-F976-456E-9061-B932194D8166\ncmd: hyperkit -U 9445CA7C-F976-456E-9061-B932194D8166 -c 4 -m 4GB -A -s 0:0,hostbridge -s 31,lpc -s 1,virtio-rnd -l com1,autopty=/Users/ballen/Demo/.run/vm/ros-vm1/tty,asl -s 2:0,virtio-net,, -s 2:1,virtio-tap,tap0,mac=AA:BB:CC:DD:00:01 -f kexec,/Users/ballen/Demo/vmlinuz,/Users/ballen/Demo/initrd,console=tty0 console=ttyS0,115200 earlyprintk=serial rancher.autologin=ttyS0 rancher.network.interfaces.eth1.address=192.168.99.11/24\nadding member tap0 to network net2 for vm 9445CA7C-F976-456E-9061-B932194D8166\nConfiguring Network: \"net1\"\nConfiguring Network: \"net2\"\ncmd: ifconfig bridge1 addm tap0\ncmd: ifconfig bridge1 up\n```\n\n- Access the serial console\n\n```shell\nsudo screen .run/vm/ros-vm1/tty\n```\n\n## Hkmgr CLI\n\n```\n$ hkmgr -h\nhkmgr - VM manager for hyperkit\nhttp://github.com/bensallen/hkmgr\n\n  Usage:\n    hkmgr [up|down|status]\n\n  Subcommands:\n    up - Start VMs\n    down - Stop VMs\n    status - Display status of VMs\n\n  Flags:\n       --version  Displays the program version string.\n    -h --help  Displays help with available flag, subcommand, and positional value parameters.\n    -c --config  Path to configuration TOML file\n    -d --debug  Enable debug output\n    -n --dry-run  Don't execute any commands that affect change, just show what will be run\n```\n\n```\n$ hkmgr up -h\nup - Start VMs\n\n  Usage:\n    up [name]\n\n  Positional Variables:\n    name - Specify a VM, otherwise all VMs will be run\n  Flags:\n       --version  Displays the program version string.\n    -h --help  Displays help with available flag, subcommand, and positional value parameters.\n    -c --config  Path to configuration TOML file\n    -d --debug  Enable debug output\n    -n --dry-run  Don't execute any commands that affect change, just show what will be run\n```\n\n```\n$ hkmgr status -h\nstatus - Display status of VMs\n\n  Usage:\n    status [name]\n\n  Positional Variables:\n    name - Specify a VM\n  Flags:\n       --version  Displays the program version string.\n    -h --help  Displays help with available flag, subcommand, and positional value parameters.\n    -c --config  Path to configuration TOML file\n    -d --debug  Enable debug output\n    -n --dry-run  Don't execute any commands that affect change, just show what will be run\n```\n\n```\n$ hkmgr down -h\ndown - Stop VMs\n\n  Usage:\n    down [name]\n\n  Positional Variables:\n    name - Specify a VM, otherwise all VMs will be stopped\n  Flags:\n       --version  Displays the program version string.\n    -h --help  Displays help with available flag, subcommand, and positional value parameters.\n    -s --signal  Signal to send to VM\n    -c --config  Path to configuration TOML file\n    -d --debug  Enable debug output\n    -n --dry-run  Don't execute any commands that affect change, just show what will be run\n```\n\n## Build\n\n```shell\ngit clone https://github.com/bensallen/hkmgr.git\ncd hkmgr\ngo build -o hkmgr cmd/hkmgr/main.go\n```\n\n## Contribute\n\nIssues and PRs as welcome at https://github.com/bensallen/hkmgr.\n\nCheck GitHub issues or [TODO.md](TODO.md) for features that are outstanding.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensallen%2Fhkmgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbensallen%2Fhkmgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbensallen%2Fhkmgr/lists"}