Index: head/lib/libvmmapi/vmmapi.c =================================================================== --- head/lib/libvmmapi/vmmapi.c +++ head/lib/libvmmapi/vmmapi.c @@ -34,7 +34,9 @@ #include #include #include +#include #include +#include #include #include @@ -103,7 +105,11 @@ int vm_create(const char *name) { - + /* Try to load vmm(4) module before creating a guest. */ + if (modfind("vmm") < 0) { + if (modfind("vmm") < 0) + kldload("vmm"); + } return (CREATE((char *)name)); }