From nobody Tue Jul 2 18:08:37 2024 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WD9rm4Y7Cz5NwmB for ; Tue, 02 Jul 2024 18:08:40 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WD9rm2h5Wz4Tfc for ; Tue, 2 Jul 2024 18:08:40 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-58bd8cce3e8so126735a12.2 for ; Tue, 02 Jul 2024 11:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719943719; x=1720548519; darn=freebsd.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZLFW+iR2rg1H/upjQ1CV7KT4rZdTRlKilG21zzWO/Ok=; b=YUCjIYHi8MbGn5mPXMhigXIUbAqpR40kys32Mxyya7rUwT48arOWjQyznQhg00//77 zi/sn8xJvx6dudXtmudmCcVBV0lf9mqwrL+3upCuiWEeoFNWBdqHbFFTRZmBp1J2SoFn 3Ev1bGiYLseMlJI28C0KglFkxZgMHj71QY8JRbFEI7aEw2BUorGlOv8PcsqJy0tDC7Af s1T/T1lqZ4y5P4wrF3xGwKTUzVr7NfCc2GuPy5LV3t3lPZluSMtOCG9IlHbr/+6H0wyd XuVjxotjsRCVh9OVvt1VCTj4XxrvOQTYgvwJfHqyPt3o64kcvbctSoOQtVq3CFScaz+i iK+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719943719; x=1720548519; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZLFW+iR2rg1H/upjQ1CV7KT4rZdTRlKilG21zzWO/Ok=; b=UgOWPXrAQPxtaEpHImzQAonEQwTSjkcJXb5Q5IatwKy5vmwkyG9FnSiRJdrJY+Hhm6 d3iDIC8M4Ocs+ZBA64h2waEXkgnk7fJyBUezfJB7EE5zVtuWzN4snRvHQzb5+N/Wr8PZ 9WabBvsWtVV8W6E1VB7iC+7A5axtWfzA+B0ToB5w0eI/PMBtkLONz0UFVWQ66r8Q6s1B KIXo/CaAdZvA2jNkpvvxGgL81AdlPpCw9Uwz+MrAaHPO2DA3lr4ut/xcY4niwAd9K4b9 sHqXkxnnSZ71gyILs6w8HnqvToR5bmmwBa+1XaVWl1XIBwM67Wb5NVeYJusdvW6L3xgf 5kcA== X-Gm-Message-State: AOJu0YzEOVsaKFgxzJGSGibqKwdfY68vG3kRwiOB9u3ChAXKMxIjKqCq ATqVBnhmupn31dptBpgv8tdIkcCEMd4tiFVG1wifq4xCvnKr6OSxpW2uhHprvf3uzIOrIlwpY31 fz6HB+T6bTI7svBb/EkmE3FtX7+hfyw== X-Google-Smtp-Source: AGHT+IEp+xiYpyoZUKqHGLDT48aT+owLv4BwNOKSmgZsBwDCLQYLflAIr1gxMJZCERi8Po/sl9YG8ANZPZYOt+d4xhQ= X-Received: by 2002:a17:907:6e87:b0:a6f:c73f:b5be with SMTP id a640c23a62f3a-a75144fb3e7mr717878866b.2.1719943718849; Tue, 02 Jul 2024 11:08:38 -0700 (PDT) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 Received: by 2002:a17:906:2b4b:b0:a72:6fd1:4512 with HTTP; Tue, 2 Jul 2024 11:08:37 -0700 (PDT) In-Reply-To: References: From: Rob Wing Date: Tue, 2 Jul 2024 10:08:37 -0800 Message-ID: Subject: Re: How to unload the vmm.ko module while FreeBSD is running... To: Mario Marietto Cc: FreeBSD virtualization Content-Type: multipart/alternative; boundary="0000000000006553a3061c479aef" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4WD9rm2h5Wz4Tfc --0000000000006553a3061c479aef Content-Type: text/plain; charset="UTF-8" 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 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. > --0000000000006553a3061c479aef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 tr= ying to unload the vmm kernel module,but it fails :

[root@marietto /bhyve]=3D=3D> kldunload -fv vmm
Unloading vmm= .ko, id=3D13
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@mariet= to /bhyve]=3D=3D> ps ax | grep bhyve
6645 =C2=A04 =C2=A0RL+ =C2=A0 = =C2=A0 0:00,00 grep bhyve (ggrep)

and yes,the vmm = module is loaded in memory :

root@marietto /bhyve]= =3D=3D> kldstat | grep vmm
13 =C2=A0 =C2=A01 0xffffffff827ac000 =C2= =A0 37c9e8 vmm.ko

how has it been loaded inside the mem= ory ? Using /boot/loader.conf :

vmm_load=3D&qu= ot;YES"

and it is located inside the director= y /boot/kernel and it is called vmm.ko

Is there a = way to unload it and reload it while FreeBSD is running,without rebooting t= he system ? thanks.

--
Mario.
--0000000000006553a3061c479aef--