public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Johannes Deivard" <jdeivard@outlook.com>,
	"docs@lists.yoctoproject.org" <docs@lists.yoctoproject.org>
Subject: Re: [docs] BUG - Optimize WSL2 VHDX file using DiskPart
Date: Thu, 24 Oct 2024 16:58:19 +0200	[thread overview]
Message-ID: <D544IAIYE5R3.2JGI2N1SZZ4TC@bootlin.com> (raw)
In-Reply-To: < <PAXP251MB02258F3DDEC28194AE141371DF4D2@PAXP251MB0225.EURP251.PROD.OUTLOOK.COM>

Hi Johannes,

On Wed Oct 23, 2024 at 6:03 PM CEST, Johannes Deivard wrote:
> Hi,
>
> I would like to report that one crucial step is missing in the instructions "2b. Optimize your VHDX file using DiskPart<https://docs.yoctoproject.org/dev-manual/start.html?highlight=wsl2#:~:text=2b.%20Optimize%20your%20VHDX%20file%20using%20DiskPart%3A>".
>
> The attached vdisk must be detached before diskpart is exitted, or you wont be able to start WSL2 again since the VHDX file "is being used by another process."
>
> The instructions for this subsection should be as follows (detach vdisk instruction added before exit):
>
> C:\WINDOWS\system32> wsl --shutdown
> C:\WINDOWS\system32> diskpart
>
> DISKPART> select vdisk file="<path_to_VHDX_file>"
> DISKPART> attach vdisk readonly
> DISKPART> compact vdisk
> DISKPART> detach vdisk
> DISKPART> exit
>
> Best regards,
> Johannes Deivard

Thank you for reporting this.

Although I haven't been able to reproduce the problem you describe (on a Windows
VM with a sample vhdx file), I've had no issue running "detach vdisk" before
running "exit", and I think it is indeed a better practice anyway.

Would you be able to add that line to the documentation? You can see
instructions on how to do that at the following link:
https://git.yoctoproject.org/yocto-docs/tree/README

Cheers,
Antonin

--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      parent reply	other threads:[~2024-10-24 14:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 16:03 BUG - Optimize WSL2 VHDX file using DiskPart Johannes Deivard
     [not found] ` < <PAXP251MB02258F3DDEC28194AE141371DF4D2@PAXP251MB0225.EURP251.PROD.OUTLOOK.COM>
2024-10-24 14:58   ` Antonin Godard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D544IAIYE5R3.2JGI2N1SZZ4TC@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=jdeivard@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox