From nobody Fri Nov 28 08:07:11 2025 X-Original-To: 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 4dHm9Y6bzrz6JMwg for ; Fri, 28 Nov 2025 08:07:13 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.netfence.it (mailserver.netfence.it [78.134.96.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mailserver.netfence.it", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dHm9Y3QTNz3vbN for ; Fri, 28 Nov 2025 08:07:13 +0000 (UTC) (envelope-from ml@netfence.it) Authentication-Results: mx1.freebsd.org; none Received: from [10.1.2.18] (alamar.local.netfence.it [10.1.2.18]) (authenticated bits=0) by soth.netfence.it (8.18.1/8.17.2) with ESMTPSA id 5AS87BvR040563 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 28 Nov 2025 09:07:11 +0100 (CET) (envelope-from ml@netfence.it) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfence.it; s=202510; t=1764317231; bh=6qh3Jg5F06xPzSKn/gbZHbXoTxFQ8kAUhjOxP5mvrwk=; h=Date:Subject:To:References:From:In-Reply-To; b=V1Htg2FDwjY22jiZddsvpnvUYu3q6IvgRzreILEnrzYrROgDCIhwHvVO1s8WZvm+B 6BrRoBnZnttBJRke44o2yrHcwhGC6EtnvsY6SP1QVRFHR91CyQCaWTnkuQSff7gnU/ DonoP+khbny43J2FJC4dSs8UqX7LkEIYYPjNT05E= X-Authentication-Warning: soth.netfence.it: Host alamar.local.netfence.it [10.1.2.18] claimed to be [10.1.2.18] Message-ID: Date: Fri, 28 Nov 2025 09:07:11 +0100 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 User-Agent: Mozilla Thunderbird Subject: Re: bhyve + swtpm + W11 Content-Language: en-US To: infoomatic , virtualization@freebsd.org References: <031fe2e6-eae6-4d4a-8bce-cd7eadd0b5a6@netfence.it> From: Andrea Venturoli In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:35612, ipnet:78.134.0.0/17, country:IT] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dHm9Y3QTNz3vbN On 11/27/25 23:57, infoomatic wrote: > Hi, > > I could not get it to work on an already installed windows VM - I am not > sure this is a FreeBSD/swtpm issue. > > On a fresh install I have had no issue. > > my config: > bhyve_options="-l tpm,swtpm,/tmp/.bhyve.tpm.win11.sock" > prestart="tpm.sh" > > and with tpm.sh: > #!/bin/sh > > SOCKET="/tmp/.bhyve.tpm.win11.sock" > > if [ ! -S "$SOCKET" ]; then > nohup swtpm socket --tpmstate backend-uri=file:///evo/vms/win11/ > tpm.state --server type=unixio,path="$SOCKET" --tpm2 --flags not-need- > init & > fi It works! Thanks a lot! My W10 VM now says TPM is OK. I guess I can now upgrade it to W11. I've had no time to check why your setup works and the standard swtpm's rc script doesn't, but I'll try and report. bye av.