pr1ntf / iohyve Goto Github PK
View Code? Open in Web Editor NEWFreeBSD bhyve manager utilizing ZFS
License: BSD 2-Clause "Simplified" License
FreeBSD bhyve manager utilizing ZFS
License: BSD 2-Clause "Simplified" License
Running iohyve disks
without a guest name will list all volumes in iohyve, which is what iohyve info
should be doing. iohyve disks guestname
should be for one disk, and probably give more information.
Reference #65
Right now, running:
iohyve conlist
Will return consoles that are active, not ones that are attached to guests not running.
I have an old bhyve linux guest that I would like to run in iohyve. This guest was set up using the instructions at https://www.freebsd.org/doc/handbook/virtualization-host-bhyve.html
This means that I have a linux-guest.img file which was made available to the guest using the virtio-blk option. Is there any way to add this file to an iohyve guest which already has one disk configured (as /zvol/dev/iohyve/$name/disk0). I would like to add in the .img file and transfer data over to the new disk.
Sometimes ISO's come zipped up, like pfSense, and will need to be unzipped and renamed.
Also provide documentation.
It would be cool to have a neat little GUI for PC-BSD and xorg builds.
Persist will persist, but sometimes even after running:
iohyve stop bsdguest
Happened after reorganizing the loops in fixing empty variables.
Need to re-tweak stuff in the start function.
Hi
I needed my virtual machines to bind to 2 different networks on 2 different NICs. looking at the code it seems like iohyve only supports bridge0 with that being hard coded in the script.
Since in this case I needed both bridge0 and bridge1, I changed __prepare_guest to attempt to read a bridge value, if it finds it, it will use it else everything works as expected in the application. Itβs a bit of a hack as it expects any bridge other than bridge0 to be up and ready to go.
Please feel free to use this code if you find it useful.
Git diff attached
iohyve.txt
It would be seriously awesome if you would allow for a description of the VM to be stored in ZFS properties. And to be displayed with "iohyve running" and "iohyve list".
Running iohyve start guestname
when the guest is already running produces some awesome behavior and errors.
Need to add a simple loop so that after a bhyve guest closes, 'bhyvectl --destroy' will automatically run when 'iohyve start guest' is ran.
I don't know whether or not it's worth it to have it as an option, but there should be a way to pass -u
to bhyve
so that guests have a UTC clock.
Create better VNET documentation with examples in the README.md
No need to put more crap in the man page.
Document how to set up Debian based distros like Debian 8 Jessie or Ubuntu 14.04 Trusty.
There is support for it:
https://github.com/pr1ntf/iohyve/blob/dev/iohyve#L260
iohyve vmmlist
is pretty broken
Let's just redo that function, shall we?
Instead of a QT GUI or web interface, why not have a terminal based GUI much like pfSense?
Ability to rename machines or use tags/UUIDs?
What will it be?
Allow the use of cloning guests so a new guest with the same properties (and even disk images at the time of cloning) can be created. If a disk image is also cloned, the properties will change, as to keep from multiple guests utilizing one tap or nmdm.
Snapshotting can also utilize this with a revert function as well.
If you mistype an iohyve start
command, or try to start a guest that does not exist, bad things happen.
Right now imags/zvols are named "zroot/iohyve/$name/$name-0.img"
Including the name twice seems redundant. With zvol the default one can argue it's no longer an image and hence dropping the img suffix would make sense.
I suggest the zvols be renamed to "zroot/iohyve/$name/diskN" where N starts with 0 as it would provide a cleaner look
Line 798 of iohyve:
Currently:
iohyve FreeBSD-10.1-RELEASE-amd64-bootonly.iso freebsd10.iso
Change:
iohyve rename FreeBSD-10.1-RELEASE-amd64-bootonly.iso freebsd10.iso
Hello all.
I did try to install FreeBSD-10.2 from the bootonly.iso as a guest and with the installer select ZFS.
The reason I want ZFS inside the virtual machine is because I would like to snapshot some data when i need to update some stuff. I know I can snapshot the whole machine, but that is more painful when i need to rollback.
If I select zfs on root when istalling, the installer errors out with a out of swap message.
Then after a reboot of the guest, it can not boot!, and is also almost unkillable.
Is this a bhyve thing or something else.
I can foresee a situation in which the shutdown process will eventually SIGKILL the bhyve processes because they're taking too much time to shutdown; perhaps either iohyve scram
or just service iohyve stop
should wait for the VMs to be done with their shutdown?
Error in dmesg:
/usr/local/sbin/iohyve: grub-bhyve: not found
Make destroy() kill processes before issuing bhyvectl --destroy.
Also should take out the con killer and make a separate function for con reset (like conreset).
Pre-Flight Section of the README.md file is wrong.
There should be:
kldload vmm
kldload nmdm
Under the kernel module documentation.
Hi, is it possible to pass a usb device to a VM?
Using the pcidev property stuff, we can now support multiple disks. This is awesome and should be utilized.
The intro sucks.
Document how to load and boot operating systems not supported by iohyve's built in start feature.
See here:
https://github.com/pr1ntf/iohyve/blob/dev/iohyve#L194
And here:
https://github.com/pr1ntf/iohyve/blob/dev/iohyve#L219
I installed Debian 8.2 using the instructions:
iohyve set debguest loader=grub-bhyve
iohyve set debguest os=debian
iohyve install debguest debian-8.2.0-amd64-i386-netinst.iso
iohyve console debguest
When I try to start the guest with 'iohyve stary debguest' I get an unusable prompt. I see my regular prompt and below that it says "grub>"
Anything that I type does not get echoed and I am unable to get the guest to boot.
Running:
service iohyve start
Will run just fine.
However, iohvye will not start at boot.
Instead we must add:
REQUIRE: SOMETHING
To the script in order for the iohyve rc.d script to run at boot.
Add the ability to grow zvols.
Running iohyve disks guestname
will return the disks and how much the zvol takes up with snapshots and all, instead of using the volsize
property.
Utilize achi-hd over virtio-blk for HDD emultion.
This could help with the use of root on ZFS builds (FreeBSD and TrueOS) and Linux LVM setups.
Running:
iohyve delete preciousvm
Will just delete the whole dataset without asking.
Having a simple [Y/N] option can help with this.
Bhyve makes it possible to set the MAC address for a virtio-tap interface instead of just randomly generating one. "-s ,virtio-net,tap2,mac=xxxx:xx:xx:xx:xx"
This should be possible to configure per guest using zfs properties
To better keep track of the tap interfaces, make iohyve create tap interfaces when the tap setting is anything other than "tap0."
ifconfig tap1 create
ifconfig bridge0 addm tap1
This will eliminate the continous editing of /etc/rc.conf when adding new tap interfaces.
I think iohyve needs a better way to manage harware that needs to begin in the 'create' stages.
Support for multiple disks, NICs, and more. (ahci-hd/virtio-blk, zvol/emptyfile, hostbridge emulation, passthrough devices, etc...)
Even though most of these things aren't implemented or not a priority, if iohyve grows, it would be nice to standardize now. See 'bhyve slot emulation' in the bhyve man page.
Need to clean up empty value errors.
[: =: unexpected operator
Please excuse me while I newb all over your system.
Running iohyve list
with iohyve guests that have more than one disk attached will show up more than once in the list.
Reference #65
Get 'iohyve start' support for OpenBSD and NetBSD guests.
Hi. Is it possible for an iohyve guest to share the internet connection of a wireless interface on the host? I have read that this is possible by creating a NAT, but it is beyond my experience as to how I would set this up. It would be a nice feature for iohyve to have an inbuilt option for this e.g., for people using laptops as the host to test VMs on the move.
Enable the choice and use of amd_hostbridge in the starting of bhyve guests.
Allow for guests to gracefully stop on host shutdown, and start again upon host boot.
(Meaning we need an /etc/rc.d/iohyve file)
grub-bhyve will sit and wait for a console to connect before it will boot the operating system.
Ran into similar issue when getting linux guests to start thus the ' > /dev/null '
https://github.com/pr1ntf/iohyve/blob/master/iohyve#L316
and
https://github.com/pr1ntf/iohyve/blob/master/iohyve#L321
iohyve currently does not handle deleting of properties for things such as pcidev.
ioh-$UUID
If there is nothing in VMM or if there is nothing running, tell the user.
Document how to get CentOS 6 guests installed.
There is support for it:
https://github.com/pr1ntf/iohyve/blob/dev/iohyve#L256
When running iohyve set obsdguest os=openbsd
it hard codes grub-bhyve
to look for 5.7
not the latest 5.8
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.