{"id":14235871,"url":"https://github.com/pr1ntf/iohyve","last_synced_at":"2025-08-11T00:33:05.321Z","repository":{"id":31633770,"uuid":"35198947","full_name":"pr1ntf/iohyve","owner":"pr1ntf","description":"FreeBSD bhyve manager utilizing ZFS","archived":false,"fork":false,"pushed_at":"2024-07-30T20:11:00.000Z","size":493,"stargazers_count":303,"open_issues_count":30,"forks_count":44,"subscribers_count":37,"default_branch":"master","last_synced_at":"2024-08-21T21:27:51.243Z","etag":null,"topics":["bhyve","bsd-license","freebsd","shell","virtualization","zfs"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"RJGrunau/Udacity_calendar_team","license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pr1ntf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-07T04:37:51.000Z","updated_at":"2024-08-09T08:36:15.000Z","dependencies_parsed_at":"2022-07-20T14:47:49.520Z","dependency_job_id":null,"html_url":"https://github.com/pr1ntf/iohyve","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pr1ntf%2Fiohyve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pr1ntf%2Fiohyve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pr1ntf%2Fiohyve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pr1ntf%2Fiohyve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pr1ntf","download_url":"https://codeload.github.com/pr1ntf/iohyve/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229478742,"owners_count":18079376,"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":["bhyve","bsd-license","freebsd","shell","virtualization","zfs"],"created_at":"2024-08-20T21:02:26.580Z","updated_at":"2024-12-13T01:30:50.489Z","avatar_url":"https://github.com/pr1ntf.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# iohyve v0.7.9\n\"I Believe in You, You Can Do the Thing Edition\"\n\nFreeBSD bhyve manager utilizing ZFS and other FreeBSD tools.\n*Everything is fine.*\n\niohyve creates, stores, manages, and launches bhyve guests utilizing built in FreeBSD features.\nThe idea is based on iocage, a jail manager utilizing some of the same principles.\n\n\nDO YOU EVEN MAN PAGE?\n````\nman iohyve\t\t\t# Installs with 'make install'\n\ncat iohyve.8.txt | less\t\t# Quick and dirty txt file\n````\n\n**Pre-Flight Checklist**\n\nAs of v0.7 `iohyve` takes care of setting up your machine if you let it.\nOnce you have created your ZFS pool named 'tank' you can run:\n````\niohyve setup pool=tank\n````\nIf you want `iohyve` to take care of networking, so you don't have to set up `rc.conf` you can do the following:\n````\niohyve setup net=em0\t\t# 'em0' is the interface I want bridge0 attached to.\n````\nYou can even have `iohyve` load the required kernel modules:\n````\niohyve setup kmod=1\n````\nYou can also do all of the above at once:\n````\niohyve setup pool=tank kmod=1 net=em0\n````\nIf you want `iohyve` to set up the kernel modules and bridge0 every time you boot, add these lines to `/etc/rc.conf`:\n````\niohyve_enable=\"YES\"\niohyve_flags=\"kmod=1 net=em0\"\n````\nIf you want more control over your setup, feel free to read the [handbook](https://www.freebsd.org/doc/en/books/handbook/virtualization-host-bhyve.html).\n\n**GRUB Guests**\n\nIn order to boot guests using GRUB, you must install the [sysutils/grub2-bhyve](https://www.freshports.org/sysutils/grub2-bhyve/) port. You can also just run `pkg install grub2-bhyve` if you'd like.\n\n**NOTE**\n\nIf you are using [FreeNAS](http://doc.freenas.org/9.10/freenas_jails.html#using-iohyve), you must also have this link so your datasets are called correctly. This should be done by `iohyve setup pool=poolname` but here is the command just in case:\n```\nln -s /mnt/iohyve /iohyve\n```\nYou may also want to check out the FreeNAS [tunables](http://doc.freenas.org/9.10/freenas_system.html?highlight=persist#tunables) section of their handbook\nso you can add `iohyve_enable=\"YES\"` and `iohyve_flags=\"kmod=1 net=[iface]\"` thus setting up the kernel modules and iohyve networking at boot time on your FreeNAS install.\n\n**Usage**\n\n```\niohyve  \n\nversion\nsetup \u003cpool=poolname\u003e [kmod=0|1] [net=iface]\nlist [-l]\ninfo [-vsdl]\nisolist\nfwlist\nfetchiso \u003cURL\u003e\ncpiso \u003cpath\u003e\nrenameiso \u003cISO\u003e \u003cnewname\u003e\nrmiso \u003cISO\u003e\nfetchfw \u003cURL\u003e\ncpfw \u003cpath\u003e\nrenamefw \u003cfirmware\u003e \u003cnewname\u003e\nrmfw \u003cfirmware\u003e\ncreate \u003cname\u003e \u003csize\u003e [pool]\ninstall \u003cname\u003e \u003cISO\u003e\nload \u003cname\u003e \u003cpath/to/bootdisk\u003e\nboot \u003cname\u003e [runmode] [pcidevices]\nstart \u003cname\u003e [-s | -a]\nstop \u003cname\u003e\nforcekill \u003cname\u003e\nscram\ndestroy \u003cname\u003e\nrename \u003cname\u003e \u003cnewname\u003e\ndelete [-f] \u003cname\u003e\nset \u003cname\u003e \u003cproperty=value\u003e ...\nget \u003cname\u003e \u003cprop\u003e\nrmprop [-f] \u003cname\u003e \u003cproperty\u003e\ngetall \u003cname\u003e\nadd \u003cname\u003e \u003csize\u003e\nremove [-f] \u003cname\u003e \u003cdiskN\u003e\nresize \u003cname\u003e \u003cdiskN\u003e \u003csize\u003e\ndisks \u003cname\u003e\nsnap \u003cname\u003e@\u003csnap\u003e\nroll \u003cname\u003e@\u003csnap\u003e\nrmsnap [-f] \u003cname\u003e@\u003csnap\u003e\nclone [-r] \u003cname\u003e \u003cclonename\u003e\nexport \u003cname\u003e\nsnaplist\ntaplist\ntapadd \u003cname\u003e [iface]\ntapdel \u003cname\u003e \u003ctap\u003e\nactivetaps\nconlist\nconsole \u003cname\u003e\nconreset\nhelp\n```\n\n**General Usage**\n\nList all guests created with:\n```\niohyve list\n```\nYou can change guest properties by using set:\n```\niohyve set bsdguest ram=512M                 #set ram to 512 Megabytes\niohyve set bsdguest cpu=1                    #set cpus to 1 core\niohyve set bsdguest pcidev:1=passthru,2/0/0  #pass through a pci device\n```\nYou can also set more than one property at once:\n```\niohyve set bsdguest tap=tap0 con=nmdm0\t\t#set tap0 and nmdm0\n```\nYou can also set a description that can be a double quoted (\") string with no equals sign (=).\nAt guest creation, the description is the output of `date`\n````\niohyve set bsdguest description=\"This is my string\"\n````\nIt's always prudent to `destroy` a guest before changing settings that may affect a running guest.\nIt's also a good idea to `destroy` a guest after your installation phase has completed.\nDestroying a guest does not `delete` a guest from the host, it `destroys` the guest in `VMM`.\n```\niohyve destroy bsdguest\n```\n\nGet a specific guest property:\n```\niohyve get bsdguest ram\n```\nGet all guest properties:\n```\niohyve getall bsdguest\n```\nDo cool ZFS stuff to a guest:\n````\n# Take a snapshot of a guest.\niohyve snap bsdguest@beforeupdate  #take snapshot\niohyve snaplist                    #list snapshots\niohyve roll bsdguest@beforeupdate  #rollback to snapshot\n\n# Make an independent clone of a guest\n# This is not a zfs clone, but a true copy of a dataset\niohyve clone bsdguest dolly\t   #make a clone of bsdguest to dolly\n````\n**Creating guest templates**\n\nYou can lock a guest from being reinstalled, started, renamed, or deleted by making it a template.\nTo set a guest as a template, you must set the `template` property to `YES`. The `YES` must be in all caps.\nEX:\n```\niohyve set bsdguest template=YES\n```\n**Use a custom bhyve path**\n\nIf you are testing a bhyve binary that is not in base, you can specify it's full path as a property, and iohyve will use it to launch the guest. This comes in handy when testing new features branches of bhyve. \n```\niohyve set bsdguest bhyve_path=/path/to/custom/bhyve\n```\n**FreeBSD Guests**\n\nFetch FreeBSD install ISO for later:\n```\niohyve fetchiso ftp://ftp.freebsd.org/.../10.1/FreeBSD-10.1-RELEASE-amd64-bootonly.iso\n```\nRename the ISO if you would like:\n```\niohyve renameiso FreeBSD-10.1-RELEASE-amd64-bootonly.iso fbsd10.iso\n```\nCreate a new FreeBSD guest named bsdguest with an 8Gigabyte virtual HDD:\n```\niohyve create bsdguest 8G\n```\nList ISO's:\n```\niohyve isolist\n```\nInstall the FreeBSD guest bsdguest:\n```\niohyve install bsdguest FreeBSD-10.1-RELEASE-amd64-bootonly.iso\n```\nConsole into the installation:\n```\niohyve console bsdguest\n```\nOnce installation is done, exit console (~~.) and stop guest:\n```\niohyve stop bsdguest\n```\nNow that the guest is installed, it can be started like usual:\n```\niohyve start bsdguest\n```\nSome guest os's can be gracefully stopped:\n```\niohyve stop bsdguest\n```\nIf you are having problems with a guest that is unresponsive you can forcekill it as a last resort.\nUSE THIS WITH CAUTION, IT WILL KILL ALL PROCESSES THAT MATCH THE NAME OF THE GUEST.\n```\niohyve forcekill grubguest\n```\n**Other BSDs:**\n\nTry out OpenBSD:\n````\niohyve set obsdguest loader=grub-bhyve os=openbsd58\niohyve install obsdguest install58.iso\niohyve console obsdguest\n````\nTry out NetBSD:\n````\niohyve set nbsdguest loader=grub-bhyve\niohyve set nbsdguest os=netbsd\niohyve install nbsdguest NetBSD-6.1.5-amd64.iso\niohyve console nbsdguest\n````\n**Linux flavors:**\n\nTry out Debian or Ubuntu _(note LVM installs should work with os=d8lvm)_:\n````\niohyve set debguest loader=grub-bhyve\niohyve set debguest os=debian\niohyve install debguest debian-8.2.0-amd64-i386-netinst.iso\niohyve console debguest\n````\nTry out ArchLinux:\n````\niohyve set archguest loader=grub-bhyve\niohyve set archguest os=arch\niohyve install archguest archlinux-2015.10.01-dual.iso\niohyve console archguest\n````\nTry out CentOS or RHEL _(note version 6 would use os=centos6)_:\n\n_Note: CentOS7 will no longer work without custom partitioning on the guest. `grub2-bhyve` cannot boot from the new CentOS7 default XFS. Please see the [wiki](https://github.com/pr1ntf/iohyve/wiki/Installing-CentOS-7-on-FreeNAS) for information on how to use custom partitioning in a CentOS kickstart file._\n````\niohyve set centosguest loader=grub-bhyve\niohyve set centosguest os=centos7\niohyve install centosguest CentOS-7-x86_64-Everything-1511.iso\niohyve console centosguest\n````\n##### Use your own custom `grub.cfg` and `device.map` files\n\nIf you don't want iohyve to take care of the `grub.cfg` and `device.map` files, you can now \"roll your own\" and place them in the guests dataset (`/iohyve/guestname/`).\nOf course, you must set the guest properties `loader=grub-bhyve` and `os=custom`.\nFor instance, if you have an OpenBSD guest located in `/iohyve/obsd59/` and an install ISO in `/iohyve/ISO/install59.iso/` and your pool is `zroot`, your files will look like this:\n\n`device.map` file:\n```\n(hd0) /dev/zvol/zroot/iohyve/obsd59/disk0\n(cd0) /iohyve/ISO/install59.iso/install59.iso\n```\n`grub.cfg` file for installation:\n```\nkopenbsd -h com0 (cd0)/5.9/amd64/bsd.rd\nboot\n```\n`grub.cfg` file after installation is complete:\n```\nkopenbsd -h com0 -r sd0a (hd0,openbsd1)/bsd\nboot\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpr1ntf%2Fiohyve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpr1ntf%2Fiohyve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpr1ntf%2Fiohyve/lists"}