* BUG - Optimize WSL2 VHDX file using DiskPart
@ 2024-10-23 16:03 Johannes Deivard
[not found] ` < <PAXP251MB02258F3DDEC28194AE141371DF4D2@PAXP251MB0225.EURP251.PROD.OUTLOOK.COM>
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Deivard @ 2024-10-23 16:03 UTC (permalink / raw)
To: docs@lists.yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 792 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 4033 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: < <PAXP251MB02258F3DDEC28194AE141371DF4D2@PAXP251MB0225.EURP251.PROD.OUTLOOK.COM>]
* Re: [docs] BUG - Optimize WSL2 VHDX file using DiskPart [not found] ` < <PAXP251MB02258F3DDEC28194AE141371DF4D2@PAXP251MB0225.EURP251.PROD.OUTLOOK.COM> @ 2024-10-24 14:58 ` Antonin Godard 0 siblings, 0 replies; 2+ messages in thread From: Antonin Godard @ 2024-10-24 14:58 UTC (permalink / raw) To: Johannes Deivard, docs@lists.yoctoproject.org 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-24 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [docs] " Antonin Godard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox