Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jul 2024 19:21:36 +0200
From:      Mario Marietto <marietto2008@gmail.com>
To:        FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Subject:   How to unload the vmm.ko module while FreeBSD is running...
Message-ID:  <CA%2B1FSijyH2EmUx95q8uudmYw-weAY4p480TKtancaRF3zdbvqA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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.

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

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSijyH2EmUx95q8uudmYw-weAY4p480TKtancaRF3zdbvqA>