# Bhyve error



## stream (Feb 15, 2018)

Hi folks,

I have been trying to install Ubuntu 16 on FreeBSD 11 host, following the steps outlined in https://www.freebsd.org/doc/handbook/virtualization-host-bhyve.html

Unfortunately, the process fails at this grub install step.

```
$ sudo grub-bhyve -m device.map -r cd0 -M 1024M linuxguest
Could not create VM linuxguest
Error in initializing VM
```
One other thread mentioned it maybe due to VT-x. I enable VT in the BIOS, but that didn't change anything. Same error.

Can you kindly suggest a few things I can try.

Thank you in advance.


----------



## Eric A. Borisch (Feb 15, 2018)

What does your device.map look like?
`uname -a`,  `kldstat`, and `ls /dev/vmm` output?


----------



## SirDice (Feb 15, 2018)

I can highly recommend using sysutils/vm-bhyve instead of creating VMs by hand. It makes it much, much easier to work with.


----------



## leebrown66 (Feb 16, 2018)

Also check /var/log/messages for something like this indicating your processor isn't compatible.  The kernel module will still be loaded, so that's a bit of a red herring IMHO.



			
				/var/log/messages said:
			
		

> Feb 15 17:45:20 <kern.crit> apron kernel: vmx_init: processor does not support desired primary processor-based controls
> Feb 15 17:45:20 <kern.crit> apron kernel: module_register_init: MOD_LOAD (vmm, 0xffffffff82d0f620, 0) error 22


----------



## stream (Feb 17, 2018)

Thank you all for your help, and pointing me in the right direction.
Now the VM works.

It turns out that the problem was indeed VT-x; *dmesg | grep VT  *did not show VT-x enabled. 
I had to enable this flag in multiple places in the BIOS for it to take effect.


----------

