Problem install linux VM with iohyve

Status
Not open for further replies.

vIC

Dabbler
Joined
Jan 5, 2017
Messages
17
Hi all,
I am following the steps on https://github.com/pr1ntf/iohyve to setup a Linux VM on my FreeNAS box version 9.10.2
However, having this issue which issue the
Code:
 iohyve install
command
Code:
iohyve install debserver debian8.iso
Installing debserver...
vm_create: Device not configured
[root@freenas] ~# vm_create: Device not configured


The step I did not follow and just try my luck is "install grub2-bhyve". Apparently, I could not install this directly on FreeNAS. How should I proceed with the installation? Can I start a jail and install grub2-bhyve to it? Then how can I use it as it is in a jail? Is the jailed stuff accessible in FreeNAS?

sorry for the newbie question, really new to both FreeNAS and FreeBSD.

Thanks!
 
Last edited:

vIC

Dabbler
Joined
Jan 5, 2017
Messages
17
Tried both of the links. The poster of the 2 links did not seem to have my problem at all. Which I understand in the first one, it was installing a freebsd VM guest which did not use grub (correct me if I am wrong). In the second link, the youtube video, it look like magic when the loader=grub-bhyve just worked out-of-the-box. If my case, it does not even install. which I understand, because FreeNAS does not like user to mess with its OS by installing other components. But how can I install this grub2-bhyve package? In a jail? How to invoke then?
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
I am the creator of the videos. In the example, I use Debian, not FreeBSD as the guest OS. You do not need to install any other packages, as grub-bhyve is already included in the FreeNAS base OS.
 

vIC

Dabbler
Joined
Jan 5, 2017
Messages
17
I am the creator of the videos. In the example, I use Debian, not FreeBSD as the guest OS. You do not need to install any other packages, as grub-bhyve is already included in the FreeNAS base OS.
Hey there, my thanks first of all.
I know you were installing debian in your video, that's why I was also trying with debian8 (my favourite distribution is centos) :)
In this case, I guess it's some other problem than the grub-bhyve. I got this impression because in the GitHub step-by-step tutorial it was emphasising that "to install Linux, you need grub, so install grub2-bhyve".

The actual error message I got is:
Code:
iohyve install debserver debian8.iso
Installing debserver...
vm_create: Device not configured
[root@freenas] ~# vm_create: Device not configured

when I run iohyve list I get
Code:
[root@freenas] ~# iohyve list
Guest	  VMM?  Running  rcboot?  Description
debserver  NO	NO	   NO	   Fri Jan  6 15:10:18 CET 2017

result from iohyve get all debserver
Code:
[root@freenas] ~# iohyve getall debserver

Getting debserver iohyve properties...

bargs		  -A_-H_-P

boot		   0

con			nmdm0

cpu			1

description	Fri Jan  6 15:10:18 CET 2017

install		yes

loader		 bhyveload

name		   debserver

os			 default

persist		1

ram			1G

size		   20G

tap			tap0

template	   NO

vnc			NO

vnc_h		  600

vnc_ip		 127.0.0.1

vnc_tablet	 NO

vnc_w		  800

vnc_wait	   NO


any suggestion?
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
It appears you're not understanding the documentation or videos provided. Here's an example:

Code:
iohyve create debguest 8G
iohyve set debguest ram=512M
iohyve set debguest cpu=1
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
 

vIC

Dabbler
Joined
Jan 5, 2017
Messages
17
It appears you're not understanding the documentation or videos provided. Here's an example:

Code:
iohyve create debguest 8G
iohyve set debguest ram=512M
iohyve set debguest cpu=1
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
Why is that? I have created a VM name is debserver , disk size 20G
Code:
iohyve create debserver 20G
iohyve set debserver ram=1G cpu=1 loader=grub-bhyve os=debian
iohyve install debserver debian8.iso
{Error message after this command:
installing debserver...
vm_create: Device not configured...
}
iohyve console debserver

Starting console on debserver...

~~. to escape console [uses cu(1) for console]

Connected

~

[EOT]
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
OK, think I understand what's going on.

Your processor likely does not support Intel VT-x with Extended Page Tables (EPT).

https://wiki.freebsd.org/bhyve

Troubleshooting


Q: What will I see if my CPU does not support EPT?

# kldload vmm
vmx_init: processor does not support VMX operation
module_register_init: MOD_LOAD (vmm, 0xffffffff81e17169, 0) error 6


Q: What will I see if EPT is disabled in BIOS?

# sh /usr/share/examples/bhyve/vmrun.sh ...
Launching virtual machine "...
vm_create: Device not configured
 
  • Like
Reactions: vIC

vIC

Dabbler
Joined
Jan 5, 2017
Messages
17

Martin Bauer

Dabbler
Joined
Nov 13, 2013
Messages
26
Just curious vIC - were you able to make an adjustment to the Bios for this ?? - I might want to do this but the server ( SuperMicro ) is about two hours away and I would need to travel - thanks in advance for your follow up here -
 

vIC

Dabbler
Joined
Jan 5, 2017
Messages
17
In my case the CPU supports VT-x but it was not enabled by default in the BIOS. After the option was enabled, the iobhyve worked well WITH LINUX guest. I could not get Windows VM running as cannot get VGA session. Linux can be installed in text mode, but windows does not have text mode. The windows VM only works in corral and later. Hope this is useful to you.
 

Martin Bauer

Dabbler
Joined
Nov 13, 2013
Messages
26
Thanks Again vIC - I'll make the trip and turn VT-x on then - thanks for that info -

Now my options are:
  1. Try to fix the current setup - ( something is wrong with my CGI setup & Nginx )
  2. Reinstall again - fingers crossed
  3. Drive / Bios change / iohyve ubuntu on there or something - only problem is that this machine is in production -
 

vIC

Dabbler
Joined
Jan 5, 2017
Messages
17
Go with option 4, install nginx in a freebsd jail. ;)

Biggest reason is: though not recommended, if you want to hack production server, playing around in a jail is much safer than installing a hypervisor.

Not sure what you are trying to do, but in general better not mess up the setup on freenas. if you need CGI or Nginx, startup a jail. In the FreeBSD jail, you can have nginx installed as easy as pkg install nginx.

If you only want to install Ubuntu (not windows or something else), you probably do not have to run iohyve. Everything you want Ubuntu to do, a freebsd jail can do.
 

Martin Bauer

Dabbler
Joined
Nov 13, 2013
Messages
26
Yes - option 4 sounds good too. I should have replied in the wee hours of the morning vIC, as I saw your message come through, but I was determined to retry my efforts and come back with a win...... ( **loud buzzer sound** ) not happening. I am still getting a broken image placeholder when I click on the camera monitor under ZoneMinder. arghhh - I am frustrated because I am sure this is something simple -

Here is what I am trying to do exactly:

Run ZoneMinder on Freenas

system: Build FreeNAS-9.10.2-U1 (86c7ef5)
Platform Intel(R) Xeon(R) CPU 5110 @ 1.60GHz
Memory 8161MB
Load Average 0.88, 0.76, 0.69

  1. I built the jail from the FN console - nothing special /
  2. I did NOT add Storage using the FN Jail Gui as others have suggested here ( post 194 from joshua Parker Ruehlig on 7/2/2016)
  3. I followed the pkg install instructions to the letter from here:
  4. Zoneminder 1.30 FreeBSD Installation and configuration - (links to a PDF on google drive)
    Version: 1.02 dated 6/23/2016 ( * thanks Melloa * )
  5. I did NOT modify FSTAB as recommended on page 12 of Melloa's Doc. - FSTAB / tmpfs /tmp tmpfs rw,nosuid,mode=01777 0 0 ( becasue fstab was empty )
  6. I did correct the path as recommended by other posts - ZM web Gui / Options / Paths - PATH_ZMS = /zm/cgi-bin/nph-zms

The Good News
  • ZM is up and running ( just like the first build ) - I have the web front end and can add CAMS
  • The Cams work in ZM - capturing / motion detection / etc
  • I can save images on an alert as is designed - I can download them in a zip file

The Bad News
  • When clicking on a Cam I still get a broken image placeholder and the error log shows :
  • getCmdResponse stream error: Socket /var/run/zm/zms-898367s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en...-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()
Somewhere someone said something about CGI not working correctly - a path issue ?

And here it is 8 am EST and I am still scratching my head -

Thanks in advance for anyones help
 

Martin Bauer

Dabbler
Joined
Nov 13, 2013
Messages
26
Yes - option 4 sounds good too. I should have replied in the wee hours of the morning vIC, as I saw your message come through, but I was determined to retry my efforts and come back with a win...... ( **loud buzzer sound** ) not happening. I am still getting a broken image placeholder when I click on the camera monitor under ZoneMinder. arghhh - I am frustrated because I am sure this is something simple -

Here is what I am trying to do exactly:

Run ZoneMinder on Freenas

system: Build FreeNAS-9.10.2-U1 (86c7ef5)
Platform Intel(R) Xeon(R) CPU 5110 @ 1.60GHz
Memory 8161MB
Load Average 0.88, 0.76, 0.69

  1. I built the jail from the FN console - nothing special /
  2. I did NOT add Storage using the FN Jail Gui as others have suggested here ( post 194 from joshua Parker Ruehlig on 7/2/2016)
  3. I followed the pkg install instructions to the letter from here:
  4. Zoneminder 1.30 FreeBSD Installation and configuration - (links to a PDF on google drive)
    Version: 1.02 dated 6/23/2016 ( * thanks Melloa * )
  5. I did NOT modify FSTAB as recommended on page 12 of Melloa's Doc. - FSTAB / tmpfs /tmp tmpfs rw,nosuid,mode=01777 0 0 ( becasue fstab was empty )
  6. I did correct the path as recommended by other posts - ZM web Gui / Options / Paths - PATH_ZMS = /zm/cgi-bin/nph-zms

The Good News
  • ZM is up and running ( just like the first build ) - I have the web front end and can add CAMS
  • The Cams work in ZM - capturing / motion detection / etc
  • I can save images on an alert as is designed - I can download them in a zip file

The Bad News
  • When clicking on a Cam I still get a broken image placeholder and the error log shows :
  • getCmdResponse stream error: Socket /var/run/zm/zms-898367s.sock does not exist. This file is created by zms, and since it does not exist, either zms did not run, or zms exited early. Please check your zms logs and ensure that CGI is enabled in apache and check that the PATH_ZMS is set correctly. Make sure that ZM is actually recording. If you are trying to view a live stream and the capture process (zmc) is not running then zms will exit. Please go to http://zoneminder.readthedocs.io/en...-when-i-can-see-stills-in-the-zone-window-etc for more information. - checkStreamForErrors()
Somewhere someone said something about CGI not working correctly - a path issue ?

And here it is 8 am EST and I am still scratching my head -

Thanks in advance for anyones help
bump
 
Status
Not open for further replies.
Top