Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2625CC433EF for ; Sun, 27 Mar 2022 15:21:48 +0000 (UTC) Received: from localhost ([::1]:37016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYUiA-0001B1-R1 for qemu-devel@archiver.kernel.org; Sun, 27 Mar 2022 11:21:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYUga-0000U2-5a for qemu-devel@nongnu.org; Sun, 27 Mar 2022 11:20:08 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:55663) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYUgX-0003rM-RW for qemu-devel@nongnu.org; Sun, 27 Mar 2022 11:20:07 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 23E7F32009E5 for ; Sun, 27 Mar 2022 11:20:02 -0400 (EDT) Received: from imap52 ([10.202.2.102]) by compute3.internal (MEProxy); Sun, 27 Mar 2022 11:20:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to; s=fm3; bh=EHtAD h9/Kye1Ipcuhu/h7YORznVITws7GuHrs6kU84A=; b=ydINDpQYt/xThXGP5smkq YAPK7NtgchdyPqxm6So4ucIodrTC7oqLO9X7l9rGTx7XT7do1sEI6C5Tr/EuMPen bfbsfQmu1KmWY2S8y0zHFDW5ealBdh9MlME9i1/uPGyXeb4doDBcvErVdFn81Yn+ wgzXH16uf+LxKlUIo9/WtOWs+R2PorSQFUIupRzpo36CzXweomtKoGQyooyiIpa+ Rmd2RqU4DtVpAx2gljNrYRpz9T/5IVF7tAZtzBo7Uk91TknlnQzy0sxPfYZxJykE bARrcKkESWMeyzf+cWL/hoA43vmvDImWPnaAN3sx/D6/qvty593rWLKdFODSKVpO Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=EHtADh 9/Kye1Ipcuhu/h7YORznVITws7GuHrs6kU84A=; b=XY6KgSBrNsAQWrOrHNWZWp 5FQmtR7rpRvWA/L3NNHgrcTmCjystDalkVHDEL+oUh1xGgmYmQQw6SW+jg32UM9O kvffZwnQ7daF9Y3Ouv3VDbtaRYMC9em9CDGxRJ1Tx4LWrAJiGh7Bq6lPUkAboFik ZtyLBnZh5c+ejFBOPosxPLlEIhLBY1gwnL7zhyndtt//10JrqRsYwc446Q3E1qLA w/3Q3NKg30Mu8Cb3P+8RqFnnfej5AoSr6Zqb2JwwtDBAP7drWu+tDUpzqNblVYGB J3AEcsxwsinU25UWOF9JzaTtE5jYczLDzk9bjDoZwmbZXSg0BaxovZWMiS8Y+nXg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudehhedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhrhfvufgtsegrtderreerreejnecuhfhrohhmpeflohhs thgvihhnpgfmjhppnhhighhsvghnuceojhhoshhtvghinhesshgvtghurhgvrdhkjhhonh highhsvghnrdhnvghtqeenucggtffrrghtthgvrhhnpeejveefffeiieejgedtjeekjefg veethfeuhfdutedtlefggffhueejfeeuvdehhfenucffohhmrghinhepkhhjnhhighhsvg hnrdhnohenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehjohhsthgvihhnsehsvggtuhhrvgdrkhhjohhnihhgshgvnhdrnhgvth X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7C4511EA006C; Sun, 27 Mar 2022 11:20:01 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4911-g925b585eab-fm-20220323.003-g925b585e Mime-Version: 1.0 Message-Id: In-Reply-To: <0605f78f-fe90-45bd-8e5b-d48fb3b99246@www.fastmail.com> References: <0605f78f-fe90-45bd-8e5b-d48fb3b99246@www.fastmail.com> Date: Sun, 27 Mar 2022 17:19:41 +0200 From: =?UTF-8?Q?Jostein_Kj=C3=B8nigsen?= To: "QEMU Developers" Subject: Re: QEMU, UEFI and Windows with Bitlocker encryption Content-Type: multipart/alternative; boundary=579815cba12c44539e49aa401b041518 Received-SPF: pass client-ip=64.147.123.24; envelope-from=jostein@secure.kjonigsen.net; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: jostein@kjonigsen.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --579815cba12c44539e49aa401b041518 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable I didn=E2=80=99t get any response to this, but found out the solution my= self, so I just thought I=E2=80=99d share the solution for anyone with a= similar issue. Basically the root of this problem seems to have been TPM-related and no= t UEFI-related.=20 So switching from a pass through-TPM to a swtpm for my VM caused Windows= to having to reinitialize the TPM and thus bitlocker.=20 After doing this the VM boots cleanly, like expected.=20 I=E2=80=99m guessing that simply resetting the existing TPM and reinitia= lizing it in Windows would have solved the issue too, and that a similar= fix might work when shifting a BitLocker encrypted boot drive from one = system to another, VM or not.=20 Cheers! -- Vennlig hilsen Jostein Kj=C3=B8nigsen jostein@kjonigsen.net =F0=9F=8D=B5 jostein@gmail.com https://jostein.kj=C3=B8nigsen.no On Wed, Mar 9, 2022, at 17:55, Jostein Kj=C3=B8nigsen wrote: > Dear QEMU developers.=20 >=20 > I=E2=80=99m having some issues with one of my QEMU VMs. I=E2=80=99m no= t sure if the mailing list is the best place to get help, and if it=E2=80= =99s a complete miss, feel free to direct me towards more appropriate ve= nues.=20 >=20 > My case in short: I have a Windows 11 VM with BitLocker encryption whi= ch is imported from a physical volume. I run it through virt-manager, bo= oting with UEFI through OVMF, tpm pass-through and it boots just fine.=20 >=20 > What is annoying is that I have to manually enter the 48-digit BitLock= er recovery key on every boot.=20 >=20 > I would assume these keys should get stored in EFI vars or TPM somewhe= re? If so, shouldn=E2=80=99t they be persisted when the VM is rebooted o= r powered off? >=20 > Any advice on how I can resolve this situation would be greatly apprec= iated.=20 >=20 > -- > Kind regards > Jostein Kj=C3=B8nigsen >=20 > jostein@kjonigsen.net =F0=9F=8D=B5 jostein@gmail.com > https://jostein.kj=C3=B8nigsen.no >=20 --579815cba12c44539e49aa401b041518 Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
I didn=E2=80= =99t get any response to this, but found out the solution myself, so I j= ust thought I=E2=80=99d share the solution for anyone with a similar iss= ue.

Basically the root of this problem seem= s to have been TPM-related and not UEFI-related. 
So switching from a pass through-TPM to a swtpm for my VM ca= used Windows to having to reinitialize the TPM and thus bitlocker. =

After doing this the VM boots cleanly, lik= e expected. 

I=E2=80=99m guessing that= simply resetting the existing TPM and reinitializing it in Windows woul= d have solved the issue too, and that a similar fix might work when shif= ting a BitLocker encrypted boot drive from one system to another, VM or = not. 

Cheers!

=
--
Vennlig hilsen=


On Wed, Mar 9, 2022, at 17:55, Jostein Kj=C3=B8nigsen wrote:
=
Dear QEMU deve= lopers. 

I=E2=80=99m having some issue= s with one of my QEMU VMs. I=E2=80=99m not sure if the mailing list is t= he best place to get help, and if it=E2=80=99s a complete miss, feel fre= e to direct me towards more appropriate venues. 

=
My case in short: I have a Windows 11 VM with BitLocker encry= ption which is imported from a physical volume. I run it through virt-ma= nager, booting with UEFI through OVMF, tpm pass-through and it boots jus= t fine. 

What is annoying is that I ha= ve to manually enter the 48-digit BitLocker recovery key on every boot.&= nbsp;

I would assume these keys should get = stored in EFI vars or TPM somewhere? If so, shouldn=E2=80=99t they be pe= rsisted when the VM is rebooted or powered off?

=
Any advice on how I can resolve this situation would be greatly app= reciated. 

--
Kind regards
Jostein Kj=C3=B8nigsen


<= br>
--579815cba12c44539e49aa401b041518--