Re: How to unload the vmm.ko module while FreeBSD is running...

From: Rob Wing <rob.fx907_at_gmail.com>
Date: Tue, 02 Jul 2024 18:08:37 UTC
Do you have any vm's that have been created but not destroyed?

check if there any device files living under /dev/vmm

On Tuesday, July 2, 2024, Mario Marietto <marietto2008@gmail.com> wrote:

> Hello.
>
> I'm trying to unload the vmm kernel module,but it fails :
>
> [root@marietto /bhyve]==> kldunload -fv vmm
> Unloading vmm.ko, id=13
> kldunload: can't unload file: Device busy
>
> I don't understand why it fails,since I don't have any bhyve vm currently
> running :
>
> [root@marietto /bhyve]==> ps ax | grep bhyve
> 6645  4  RL+     0:00,00 grep bhyve (ggrep)
>
> and yes,the vmm module is loaded in memory :
>
> root@marietto /bhyve]==> kldstat | grep vmm
> 13    1 0xffffffff827ac000   37c9e8 vmm.ko
>
> how has it been loaded inside the memory ? Using /boot/loader.conf :
>
> vmm_load="YES"
>
> and it is located inside the directory /boot/kernel and it is called vmm.ko
>
> Is there a way to unload it and reload it while FreeBSD is running,without
> rebooting the system ? thanks.
>
> --
> Mario.
>