Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init error #199

Closed
heshriti opened this issue Feb 12, 2018 · 13 comments
Closed

init error #199

heshriti opened this issue Feb 12, 2018 · 13 comments

Comments

@heshriti
Copy link

when I initialize, using : vm init
I get this:

/usr/local/sbin/vm: ERROR: unable to load vmm.ko!

I tried many things, including rebooting the machine. No luck.

Can you suggest what I can do to resolve?

thank you very much.

@heshriti
Copy link
Author

hi, any thoughts on this? thanks in advance.

@handcode
Copy link
Contributor

what's the output if you try to load the vmm module without vm?

kldload vmm

@heshriti
Copy link
Author

$ sudo kldload vmm
kldload: can't load vmm: module already loaded or in kernel

@handcode
Copy link
Contributor

If the module is already loaded, kldstat has to return an error, see: util::load_module

what's the output of:
kldstat -v -m vmm && echo "kldstat returned success" || echo "kldstat returned error"

@heshriti
Copy link
Author

The kldstat does not recognize vmm:

$ kldstat -v -m vmm && echo "kldstat returned success" || echo "kldstat returned error"
kldstat: can't find module vmm: No such file or directory
kldstat returned error

@heshriti
Copy link
Author

But plain kldstat seems to show that vmm is loaded, as follows

$ kldstat

Id Refs Address Size Name
8 1 ... .... vmm.ko

@heshriti
Copy link
Author

sorry, so what's the solution for this?

@handcode
Copy link
Contributor

then I guess the error occurs when initializing the module. try unload/load the module and search for error in dmesg.

kldunload vmm
kldload vmm

if you see a error like this in dmesg, your CPU is not supported

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

see: https://www.freebsd.org/doc/handbook/virtualization-host-bhyve.html , https://wiki.freebsd.org/bhyve#Troubleshooting

@heshriti
Copy link
Author

heshriti commented Feb 14, 2018 via email

@heshriti
Copy link
Author

here are the logs:
Feb 14 18:02:42: initialising network device tap0
Feb 14 18:02:42: adding tap0 -> bridge0 (public)
Feb 14 18:02:42: booting
..
Feb 14 18:02:42: /usr/local/sbin/grub-bhyve -m /tmp/ubuntu/device.map -M 2G
-r cd0 ubuntu
Feb 14 18:02:42: fatal; loader returned error 1
Feb 14 18:02:42: destroying network device tap0
Feb 14 18:02:42: stopped
~

@handcode
Copy link
Contributor

I recommended that you unload/load the module and look for errors in dmesg or /var/log/messages.

Obviously the module is loaded but not initialized correctly.

That's why I still guess that your CPU is not supported or EPT is not activated in BIOS and therefore it doesn't make any sense to try to start a VM because this can't work without a correctly initialized vmm module

@0mp
Copy link
Contributor

0mp commented Apr 30, 2018

Related: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227880

It looks like kldstat -m vmm does not work while kldstat -n vmm does.

@churchers
Copy link
Owner

This appears to be due to issues loading the vmm module, most likely due to missing hardware support.

Either way this doesn't seem to be an issue with vm-bhyve, and if the module can be loaded, which is obviously required, then both kldstat -n & kldstat -m should work. In fact as per the bug above, the current -n method needs to be used as -m may return true if some parts of vmm.ko are loaded (ppt and ivhd), but not the vmm module we actually need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants