Here are my instructions. Lines with # are comments meant to add some context to the commands.
Hopefully it will help people to start off. Definitely should do some reading on the iohyve github page (
https://github.com/pr1ntf/iohyve) for further knowledge and tweaking.
Code:
# This documentation was built on iohyve version "iohyve v0.7 2015/10/27 Im Here for the Party Edition"
# Commands might have changed in newer iohyve version
# See if the kernel modules are loaded. Need to look for vmm.ko and nmdm.ko
kldstat
# load the missing module
# I have read that people should be adding a tunables for these modules to be loaded by default at boot.
# The disclaimer on the tunables doc says it is for advanced usages and can break things so i hesitate to do that.
# I still manually load all these at boot.
kldload vmm
kldload nmdm
# use iohyve to setup storage pool
# Your pool name might be different so please make sure to change that
# I was not able to get the iohyve script to recognize nested pools so i just used the root pool.
# ie if my zfs structure looks like DATASTORE/VirtualMachines, pool=DATASTORE would work
# but pool=DATASTORE/VirtualMachines would not work.
# I did not care where iohyve puts it's content so i did not open ticket on it.
iohyve setup pool=DATASTORE
# confirm iohyve created zfs pool
# My structure looked like this
# DATASTORE/iohyve 1.06T 4.39T 192K /mnt/iohyve
# DATASTORE/iohyve/Firmware 192K 4.39T 192K /mnt/iohyve/Firmware
# DATASTORE/iohyve/ISO 580M 4.39T 192K /mnt/iohyve/ISO
# DATASTORE/iohyve/ISO/ubuntu-14.04.4-server-amd64.iso 580M 4.39T 580M /mnt/iohyve/ISO/ubuntu-14.04.4-server-amd64.iso
# DATASTORE/iohyve/zoneminder001 567G 4.39T 200K /mnt/iohyve/zoneminder001
# DATASTORE/iohyve/zoneminder001/disk0 51.6G 4.43T 6.26G -
# DATASTORE/iohyve/zoneminder001/disk1 516G 4.88T 16.0G -
# DATASTORE/iohyve/zoneminderdb001 516G 4.39T 200K /mnt/iohyve/zoneminderdb001
# DATASTORE/iohyve/zoneminderdb001/disk0 516G 4.87T 20.4G -
zfs list
# In it's current iteration, iohyve script only works with storage mounted in /iohyve.
# So the workaround is to create a symbolic link:
ln -s /mnt/iohyve /iohyve
# Create the volume for the VM
iohyve create zoneminder001 50G
# Set various VM variables
# Your settings might be different so do not just copy and paste.
iohyve set zoneminder001 loader=grub-bhyve
iohyve set zoneminder001 os=debian
iohyve set zoneminder001 ram=4096M
iohyve set zoneminder001 cpu=4
iohyve set zoneminder001 net=igb1
# If you want to add another volume. I usually separate out my data into its own volume
# Totally optional.
# You will need to follow the ubuntu documentation on how to mount this volume into filesystem
iohyve add zoneminder001 500G DATASTORE
# Check if there is a bridge0 interface
ifconfig
# If you do not have the bridge0 interface then create it
ifconfig bridge0 create
# Add your main network interface to the bridge0
# Replace ##PRIMARYINTERFACE## with your interface name (ie igb1 etc)
ifconfig bridge0 addm ##PRIMARYINTERFACE##
# Each VM will create a tap interface.
# You will need to manually add the tap interface to the bridge
ifconfig bridge0 addm tap0
# If you had to manually create the bridge interface now is the time to bring it up
ifconfig bridge0 up
# Then bring up the tap interface in question
# I have read there is a tunable to make sure all tap interfaces are auto enabled.
# I havent tested that yet but will look into implementing that soon
ifconfig tap0 up
# You will need to put the guest iso into local filesystem
# In my case i scped the iso from my laptop to the server and ran cpiso
# iohyve also has documentation for the iohyve fetch command which can pull down the iso directly onto the server
iohyve cpiso ./ubuntu-14.04.4-server-amd64.iso
# Install command
iohyve install zoneminder001 ubuntu-14.04.4-server-amd64.iso
# connect into console and run through the installation steps
iohyve console zoneminder001
# I still do not know the difference between destroy and stop a VM
iohyve destroy zoneminder001
# Start the VM
iohyve start zoneminder001
# Confirm VM is running
# Guest VMM? Running? rcboot? Description
# zoneminder001 YES YES NO Fri_Apr__8_11:43:29_PDT_2016
# zoneminder001 YES YES NO Fri_Apr__8_11:43:29_PDT_2016
# zoneminderdb001 YES YES NO Fri_Apr__8_20:34:51_PDT_2016
iohyve list
# Log into the VM
iohyve console zoneminder001
Hi,
i went step by step, but instead of debian im trying to install ubuntu-server ubuntu-16.04-server-amd64.iso.
Installation went fine, i installed it with full drive encryption (lvm).
After reboot, i tried to destroy and start machine... but its not starting anymore
[root@freenas ~]# iohyve start ubuntu_universe
Starting ubuntu_universe... (Takes 15 seconds for FreeBSD guests)
[root@freenas ~]# iohyve list
Guest VMM? Running rcboot? Description
ubuntu-server YES NO NO Thu May 12 01:26:08 CEST 2016
ubuntu_universe YES NO NO Thu May 12 01:46:21 CEST 2016
So i connected to the console and all what is there is grub prompt : grub >
grub> ls
(hd0) (hd0,msdos5) (hd0,msdos1) (cd0) (cd0,msdos5) (cd0,msdos1) (host)
grub>
no idea what should i do?
Also im wondering where are stored the virtual drives inside my pool?
du -hs /iohyve/ubuntu_universe/
7.5K
but i created drive as 20G image.
Im running freenas 10.3
iohyve v0.7.3 2016/01/08 Bear in a Datacenter Edition
Thanks!