From nobody Mon Sep 15 16:55:08 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 4cQWNr4spZz67cmt for ; Mon, 15 Sep 2025 16:55:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cQWNr4DQTz3mkw for ; Mon, 15 Sep 2025 16:55:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757955308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aQva1YbluyhFzof2fNLIn1Q4ncbSHzItCTbkib1MxSc=; b=jF3z0v6rGGtq21LVQ9IlQfP/kzexh1AzdpAFCh0mgpx0HWvaSc/gXb1wALMvtSkxvjXTUs DZawCKw1WZ2S4S6NpFiv9tyXzZmFyXZVH4MJI5eiR4Dmo7XYSB/89WGTA54QYJ1sZtH8gJ 3HVhIRzX3gOxW+gtlnLAFkAiN+sRTvtLdwDA0prDUEdnjLrFr5eTj4HRbO9ncW/b8KgvLc RZqKD9Yb2schE7H4Dw4Gng9gdpDhq1de51iAQY0AhNJIvNo3BFFF1qO2qmk5hsUiV6vW2t GVZXTcWK5E4qWR9cHPiHp0+OhRIGVycajvMue5IBwySSva1QrCGHvClbZxGM4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757955308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aQva1YbluyhFzof2fNLIn1Q4ncbSHzItCTbkib1MxSc=; b=JzPUEqCYRyPvu3oPAIm8POBANELDRRqfeQrZlWX2cYa9pXFGafN9x9/eZ6/zZdsQTeG1Ju mYaM+eibXNqtmVoSpvDY0eaot+CgUwSjKAKPTLNCPaj4h7LUWQkODwpwLjWM0wJZd7wr3n v4U5O9YvCRE5hX/xONMcbMKZ1IDJAET+eWdVoRMXmhQ9VZsq5ZiJsgTEjs0f+oG4xn19Fi nFFwHrcAVTTROLUI+vjOwzT9xMXpyytwkHx6D1/wNj8CTL+kYhXvkiuU4IFVxxVOYIgZ+p lgXL7XXYrUHt8RbzXdoGndZuIFNDRiv7lJjpxsgzhXdI2NH29/RWsbeU0GWzKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757955308; a=rsa-sha256; cv=none; b=LteA/c0GyXfu1wYIcfA4mZDxxHXtUy2dOC8vx67YpBdGCdLOiY6uHfGWfkDH/1ZNNH+EiQ /yjGptub2sNXkMLroJGoGecwj/zuiLl28fyC/uUikcTVoPQ1BlzcJTSMrxACh1rXTo7C90 dPmH3lbBClO0tK6OJThAF8rwtoD6KFGk6VXOhO6rGApt834H2hdwlPpno91Npau03dnxTc CI6eEB52orrN9gK3LyOa1tcSEOFlmRJNH1k0P01mArkjs4LCdXi87Jo9E9IbcOsiW1d6pd tdcZZ4477Za/FvISo8xfpGbc/NFk8AiwOr+Q5pLlGpuaMPfQ0jexRxFhH1Bt/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cQWNr3nd8z13B9 for ; Mon, 15 Sep 2025 16:55:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 58FGt8xq026597 for ; Mon, 15 Sep 2025 16:55:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 58FGt8jU026596 for virtualization@FreeBSD.org; Mon, 15 Sep 2025 16:55:08 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 287326] bhyve: Ubuntu guest doesn't boot with TPM emulation enabled Date: Mon, 15 Sep 2025 16:55:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: novel@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D287326 --- Comment #3 from Roman Bogorodskiy --- (In reply to Corvin K=C3=B6hne from comment #2) > If I get it correctly, a FreeBSD guest works fine while an Ubuntu guest f= ails to boot? I would try the following: Yes, that's correct. > 1. Enable boot logs of the Ubuntu guest and check them. Any specifics on what could I enable? In the meantime, I've been experimenting with that for a bit, and I think I= get new details. What I do: 1. sudo swtpm socket --tpmstate backend-uri=3Dfile:////var/run/swtpm/tpm.st= ate --tpm2 --server type=3Dunixio,path=3D/var/run/swtpm/tpm --log file=3D/tmp/s= wtmp.log --flags not-need-init --daemon 2. sudo bhyve -c 2 -m 4096 -A -I -u -H -P -s 0:0,hostbridge -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -s 1:0,lpc -s 3:0,ahci,hd:/data/img/ubuntu.img -s 5:0,fbuf,tcp=3D127.0.0.1:5905 -l com1,s= tdio -l tpm,swtpm,/var/run/swtpm/tpm ubuntu I get: --- BdsDxe: loading Boot0001 "UEFI BHYVE SATA DISK BHYVE-3609-D803-384E" from PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0) BdsDxe: starting Boot0001 "UEFI BHYVE SATA DISK BHYVE-3609-D803-384E" from PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0) Reset System --- Exit code is 0. 3. I run exactly the same command for the second time: sudo bhyve -c 2 -m 4096 -A -I -u -H -P -s 0:0,hostbridge -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -s 1:0,lpc -s 3:0,ahci,hd:/data/img/ubuntu.img -s 5:0,fbuf,tcp=3D127.0.0.1:5905 -l com1,s= tdio -l tpm,swtpm,/var/run/swtpm/tpm ubuntu System boots fine. TPM device is visible inside of the VM.=20 > 2. Use a hardware TPM if possible to make sure it's not swtpm related. Unfortunately, I don't have hardware TPM. --=20 You are receiving this mail because: You are the assignee for the bug.=